diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-19 10:28:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-19 10:28:59 -0700 |
commit | 9e01297ee1ada71e621c8b58a80a28a421a00471 (patch) | |
tree | b62959354c0b514d95b9829b8395aae12869d3e0 /arch/x86/kvm/vmx.c | |
parent | 9b7f43afd417a6feb80841d30ced4051c362eb5d (diff) | |
parent | 21a1416a1c945c5aeaeaf791b63c64926018eb77 (diff) | |
download | linux-9e01297ee1ada71e621c8b58a80a28a421a00471.tar.gz linux-9e01297ee1ada71e621c8b58a80a28a421a00471.tar.bz2 linux-9e01297ee1ada71e621c8b58a80a28a421a00471.zip |
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Marcelo Tosatti.
* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: lock slots_lock around device assignment
KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context
KVM: unmap pages from the iommu when slots are removed
KVM: PMU emulation: GLOBAL_CTRL MSR should be enabled on reset
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ad85adfef843..4ff0ab9bc3c8 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2210,9 +2210,12 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) msr = find_msr_entry(vmx, msr_index); if (msr) { msr->data = data; - if (msr - vmx->guest_msrs < vmx->save_nmsrs) + if (msr - vmx->guest_msrs < vmx->save_nmsrs) { + preempt_disable(); kvm_set_shared_msr(msr->index, msr->data, msr->mask); + preempt_enable(); + } break; } ret = kvm_set_msr_common(vcpu, msr_index, data); |