* Patch "kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL" has been added to the 4.4-stable tree
@ 2016-01-25 0:00 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-01-25 0:00 UTC (permalink / raw)
To: huaitong.han, gregkh, pbonzini, zkaspar82; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL
to the 4.4-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-x86-fix-vmwrite-to-secondary_vm_exec_control.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 45bdbcfdf241149642fb6c25ab0c209d59c371b7 Mon Sep 17 00:00:00 2001
From: Huaitong Han <huaitong.han@intel.com>
Date: Tue, 12 Jan 2016 16:04:20 +0800
Subject: kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL
From: Huaitong Han <huaitong.han@intel.com>
commit 45bdbcfdf241149642fb6c25ab0c209d59c371b7 upstream.
vmx_cpuid_tries to update SECONDARY_VM_EXEC_CONTROL in the VMCS, but
it will cause a vmwrite error on older CPUs because the code does not
check for the presence of CPU_BASED_ACTIVATE_SECONDARY_CONTROLS.
This will get rid of the following trace on e.g. Core2 6600:
vmwrite error: reg 401e value 10 (err 12)
Call Trace:
[<ffffffff8116e2b9>] dump_stack+0x40/0x57
[<ffffffffa020b88d>] vmx_cpuid_update+0x5d/0x150 [kvm_intel]
[<ffffffffa01d8fdc>] kvm_vcpu_ioctl_set_cpuid2+0x4c/0x70 [kvm]
[<ffffffffa01b8363>] kvm_arch_vcpu_ioctl+0x903/0xfa0 [kvm]
Fixes: feda805fe7c4ed9cf78158e73b1218752e3b4314
Reported-by: Zdenek Kaspar <zkaspar82@gmail.com>
Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kvm/vmx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8932,7 +8932,8 @@ static void vmx_cpuid_update(struct kvm_
best->ebx &= ~bit(X86_FEATURE_INVPCID);
}
- vmcs_set_secondary_exec_control(secondary_exec_ctl);
+ if (cpu_has_secondary_exec_ctrls())
+ vmcs_set_secondary_exec_control(secondary_exec_ctl);
if (static_cpu_has(X86_FEATURE_PCOMMIT) && nested) {
if (guest_cpuid_has_pcommit(vcpu))
Patches currently in stable-queue which might be from huaitong.han@intel.com are
queue-4.4/kvm-x86-fix-vmwrite-to-secondary_vm_exec_control.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-25 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 0:00 Patch "kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).