forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM changes from Paolo Bonzini: "These are the x86, MIPS and s390 changes; PPC and ARM will come in a few days. MIPS and s390 have little going on this release; just bugfixes, some small, some larger. The highlights for x86 are nested VMX improvements (Jan Kiszka), optimizations for old processor (up to Nehalem, by me and Bandan Das), and a lot of x86 emulator bugfixes (Nadav Amit). Stephen Rothwell reported a trivial conflict with the tracing branch" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (104 commits) x86/kvm: Resolve shadow warnings in macro expansion KVM: s390: rework broken SIGP STOP interrupt handling KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table KVM: vmx: remove duplicate vmx_mpx_supported() prototype KVM: s390: Fix memory leak on busy SIGP stop x86/kvm: Resolve shadow warning from min macro kvm: Resolve missing-field-initializers warnings Replace NR_VMX_MSR with its definition KVM: x86: Assertions to check no overrun in MSR lists KVM: x86: set rflags.rf during fault injection KVM: x86: Setting rflags.rf during rep-string emulation KVM: x86: DR6/7.RTM cannot be written KVM: nVMX: clean up nested_release_vmcs12 and code around it KVM: nVMX: fix lifetime issues for vmcs02 KVM: x86: Defining missing x86 vectors KVM: x86: emulator injects #DB when RFLAGS.RF is set KVM: x86: Cleanup of rflags.rf cleaning KVM: x86: Clear rflags.rf on emulated instructions KVM: x86: popf emulation should not change RF KVM: x86: Clearing rflags.rf upon skipped emulated instruction ...
- Loading branch information
Showing
47 changed files
with
1,790 additions
and
1,444 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* commpage, currently used for Virtual COP0 registers. | ||
* Mapped into the guest kernel @ 0x0. | ||
* | ||
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | ||
* Authors: Sanjay Lal <[email protected]> | ||
*/ | ||
|
||
#include <linux/errno.h> | ||
#include <linux/err.h> | ||
#include <linux/module.h> | ||
#include <linux/vmalloc.h> | ||
#include <linux/fs.h> | ||
#include <linux/bootmem.h> | ||
#include <asm/page.h> | ||
#include <asm/cacheflush.h> | ||
#include <asm/mmu_context.h> | ||
|
||
#include <linux/kvm_host.h> | ||
|
||
#include "commpage.h" | ||
|
||
void kvm_mips_commpage_init(struct kvm_vcpu *vcpu) | ||
{ | ||
struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage; | ||
|
||
/* Specific init values for fields */ | ||
vcpu->arch.cop0 = &page->cop0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* KVM/MIPS: commpage: mapped into get kernel space | ||
* | ||
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | ||
* Authors: Sanjay Lal <[email protected]> | ||
*/ | ||
|
||
#ifndef __KVM_MIPS_COMMPAGE_H__ | ||
#define __KVM_MIPS_COMMPAGE_H__ | ||
|
||
struct kvm_mips_commpage { | ||
/* COP0 state is mapped into Guest kernel via commpage */ | ||
struct mips_coproc cop0; | ||
}; | ||
|
||
#define KVM_MIPS_COMM_EIDI_OFFSET 0x0 | ||
|
||
extern void kvm_mips_commpage_init(struct kvm_vcpu *vcpu); | ||
|
||
#endif /* __KVM_MIPS_COMMPAGE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* KVM/MIPS: Binary Patching for privileged instructions, reduces traps. | ||
* | ||
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | ||
* Authors: Sanjay Lal <[email protected]> | ||
*/ | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* KVM/MIPS: Binary Patching for privileged instructions, reduces traps. | ||
* | ||
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | ||
* Authors: Sanjay Lal <[email protected]> | ||
*/ | ||
|
||
#include <linux/errno.h> | ||
#include <linux/err.h> | ||
|
@@ -18,7 +18,7 @@ | |
#include <linux/bootmem.h> | ||
#include <asm/cacheflush.h> | ||
|
||
#include "kvm_mips_comm.h" | ||
#include "commpage.h" | ||
|
||
#define SYNCI_TEMPLATE 0x041f0000 | ||
#define SYNCI_BASE(x) (((x) >> 21) & 0x1f) | ||
|
@@ -28,9 +28,8 @@ | |
#define CLEAR_TEMPLATE 0x00000020 | ||
#define SW_TEMPLATE 0xac000000 | ||
|
||
int | ||
kvm_mips_trans_cache_index(uint32_t inst, uint32_t *opc, | ||
struct kvm_vcpu *vcpu) | ||
int kvm_mips_trans_cache_index(uint32_t inst, uint32_t *opc, | ||
struct kvm_vcpu *vcpu) | ||
{ | ||
int result = 0; | ||
unsigned long kseg0_opc; | ||
|
@@ -47,12 +46,11 @@ kvm_mips_trans_cache_index(uint32_t inst, uint32_t *opc, | |
} | ||
|
||
/* | ||
* Address based CACHE instructions are transformed into synci(s). A little heavy | ||
* for just D-cache invalidates, but avoids an expensive trap | ||
* Address based CACHE instructions are transformed into synci(s). A little | ||
* heavy for just D-cache invalidates, but avoids an expensive trap | ||
*/ | ||
int | ||
kvm_mips_trans_cache_va(uint32_t inst, uint32_t *opc, | ||
struct kvm_vcpu *vcpu) | ||
int kvm_mips_trans_cache_va(uint32_t inst, uint32_t *opc, | ||
struct kvm_vcpu *vcpu) | ||
{ | ||
int result = 0; | ||
unsigned long kseg0_opc; | ||
|
@@ -72,8 +70,7 @@ kvm_mips_trans_cache_va(uint32_t inst, uint32_t *opc, | |
return result; | ||
} | ||
|
||
int | ||
kvm_mips_trans_mfc0(uint32_t inst, uint32_t *opc, struct kvm_vcpu *vcpu) | ||
int kvm_mips_trans_mfc0(uint32_t inst, uint32_t *opc, struct kvm_vcpu *vcpu) | ||
{ | ||
int32_t rt, rd, sel; | ||
uint32_t mfc0_inst; | ||
|
@@ -115,8 +112,7 @@ kvm_mips_trans_mfc0(uint32_t inst, uint32_t *opc, struct kvm_vcpu *vcpu) | |
return 0; | ||
} | ||
|
||
int | ||
kvm_mips_trans_mtc0(uint32_t inst, uint32_t *opc, struct kvm_vcpu *vcpu) | ||
int kvm_mips_trans_mtc0(uint32_t inst, uint32_t *opc, struct kvm_vcpu *vcpu) | ||
{ | ||
int32_t rt, rd, sel; | ||
uint32_t mtc0_inst = SW_TEMPLATE; | ||
|
Oops, something went wrong.