This is a note to let you know that I've just added the patch titled
KVM: VMX: Fix delayed load of shared MSRs
to the 3.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kvm-vmx-fix-delayed-load-of-shared-msrs.patch
and it can be found in the queue-3.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From [email protected] Wed May 9 06:14:29 2012
From: Avi Kivity <[email protected]>
Date: Wed, 9 May 2012 16:10:43 +0300
Subject: KVM: VMX: Fix delayed load of shared MSRs
To: [email protected]
Cc: Marcelo Tosatti <[email protected]>, [email protected]
Message-ID: <[email protected]>
From: Avi Kivity <[email protected]>
(cherry picked from commit 9ee73970c03edb68146ceb1ba2a7033c99a5e017)
Shared MSRs (MSR_*STAR and related) are stored in both vmx->guest_msrs
and in the CPU registers, but vmx_set_msr() only updated memory. Prior
to 46199f33c2953, this didn't matter, since we called vmx_load_host_state(),
which scheduled a vmx_save_host_state(), which re-synchronized the CPU
state, but now we don't, so the CPU state will not be synchronized until
the next exit to host userspace. This mostly affects nested vmx workloads,
which play with these MSRs a lot.
Fix by loading the MSR eagerly.
Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/kvm/vmx.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2219,6 +2219,9 @@ static int vmx_set_msr(struct kvm_vcpu *
msr = find_msr_entry(vmx, msr_index);
if (msr) {
msr->data = data;
+ if (msr - vmx->guest_msrs < vmx->save_nmsrs)
+ kvm_set_shared_msr(msr->index, msr->data,
+ msr->mask);
break;
}
ret = kvm_set_msr_common(vcpu, msr_index, data);
Patches currently in stable-queue which might be from [email protected] are
queue-3.3/kvm-s390-do-store-status-after-handling-stop_on_stop-bit.patch
queue-3.3/kvm-nvmx-fix-erroneous-exception-bitmap-check.patch
queue-3.3/kvm-s390-sanitize-fpc-registers-for-kvm_set_fpu.patch
queue-3.3/kvm-x86-emulator-correctly-mask-pmc-index-bits-in-rdpmc-instruction-emulation.patch
queue-3.3/kvm-mmu_notifier-flush-tlbs-before-releasing-mmu_lock.patch
queue-3.3/kvm-vmx-fix-kvm_set_shared_msr-called-in-preemptible-context.patch
queue-3.3/kvm-vmx-vmx_set_cr0-expects-kvm-srcu-locked.patch
queue-3.3/kvm-ensure-all-vcpus-are-consistent-with-in-kernel-irqchip-settings.patch
queue-3.3/kvm-fix-write-protection-race-during-dirty-logging.patch
queue-3.3/kvm-lock-slots_lock-around-device-assignment.patch
queue-3.3/kvm-vmx-fix-delayed-load-of-shared-msrs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html