diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-07 12:53:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-07 12:53:33 -0400 |
commit | a3fac08085136fb8b56bbd290500ed03c94ee5d1 (patch) | |
tree | 849f73fd0d7d8d519735ad0eb3b4931c7c27aac4 /arch/x86 | |
parent | 664481ed45cdbda2ab853ddd3c2690b69aca9103 (diff) | |
parent | e08759215b7dcb7111e94f0f96918dd98e86ca6b (diff) |
Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull a few KVM fixes from Avi Kivity:
"A bunch of powerpc KVM fixes, a guest and a host RCU fix (unrelated),
and a small build fix."
* 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: Resolve RCU vs. async page fault problem
KVM: VMX: vmx_set_cr0 expects kvm->srcu locked
KVM: PMU: Fix integer constant is too large warning in kvm_pmu_set_msr()
KVM: PPC: Book3S: PR: Fix preemption
KVM: PPC: Save/Restore CR over vcpu_run
KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry
KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist
KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access code
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/kvm.c | 4 | ||||
-rw-r--r-- | arch/x86/kvm/pmu.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 694d801bf606..b8ba6e4a27e4 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/traps.h> | 38 | #include <asm/traps.h> |
39 | #include <asm/desc.h> | 39 | #include <asm/desc.h> |
40 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
41 | #include <asm/idle.h> | ||
41 | 42 | ||
42 | static int kvmapf = 1; | 43 | static int kvmapf = 1; |
43 | 44 | ||
@@ -253,7 +254,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
253 | kvm_async_pf_task_wait((u32)read_cr2()); | 254 | kvm_async_pf_task_wait((u32)read_cr2()); |
254 | break; | 255 | break; |
255 | case KVM_PV_REASON_PAGE_READY: | 256 | case KVM_PV_REASON_PAGE_READY: |
257 | rcu_irq_enter(); | ||
258 | exit_idle(); | ||
256 | kvm_async_pf_task_wake((u32)read_cr2()); | 259 | kvm_async_pf_task_wake((u32)read_cr2()); |
260 | rcu_irq_exit(); | ||
257 | break; | 261 | break; |
258 | } | 262 | } |
259 | } | 263 | } |
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index a73f0c104813..173df38dbda5 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c | |||
@@ -369,7 +369,7 @@ int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, u32 index, u64 data) | |||
369 | case MSR_CORE_PERF_FIXED_CTR_CTRL: | 369 | case MSR_CORE_PERF_FIXED_CTR_CTRL: |
370 | if (pmu->fixed_ctr_ctrl == data) | 370 | if (pmu->fixed_ctr_ctrl == data) |
371 | return 0; | 371 | return 0; |
372 | if (!(data & 0xfffffffffffff444)) { | 372 | if (!(data & 0xfffffffffffff444ull)) { |
373 | reprogram_fixed_counters(pmu, data); | 373 | reprogram_fixed_counters(pmu, data); |
374 | return 0; | 374 | return 0; |
375 | } | 375 | } |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 280751c84724..ad85adfef843 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3906,7 +3906,9 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) | |||
3906 | vmcs_write16(VIRTUAL_PROCESSOR_ID, vmx->vpid); | 3906 | vmcs_write16(VIRTUAL_PROCESSOR_ID, vmx->vpid); |
3907 | 3907 | ||
3908 | vmx->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; | 3908 | vmx->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; |
3909 | vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
3909 | vmx_set_cr0(&vmx->vcpu, kvm_read_cr0(vcpu)); /* enter rmode */ | 3910 | vmx_set_cr0(&vmx->vcpu, kvm_read_cr0(vcpu)); /* enter rmode */ |
3911 | srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); | ||
3910 | vmx_set_cr4(&vmx->vcpu, 0); | 3912 | vmx_set_cr4(&vmx->vcpu, 0); |
3911 | vmx_set_efer(&vmx->vcpu, 0); | 3913 | vmx_set_efer(&vmx->vcpu, 0); |
3912 | vmx_fpu_activate(&vmx->vcpu); | 3914 | vmx_fpu_activate(&vmx->vcpu); |