aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-11-30 11:38:16 +0000
committerKeir Fraser <keir@xen.org>2010-11-30 11:38:16 +0000
commit8d4f58459ccd828a0dc58a47bb95503fd9381836 (patch)
tree0e960aa2851d613533994dfc54da5c786a0d42bb
parent5cd5950df7aa96a48aa7f7125c4a69480f862eeb (diff)
downloadxen-8d4f58459ccd828a0dc58a47bb95503fd9381836.tar.gz
xen-8d4f58459ccd828a0dc58a47bb95503fd9381836.tar.bz2
xen-8d4f58459ccd828a0dc58a47bb95503fd9381836.zip
x86 hvm: Do not overwrite boot-cpu capability data on VMX/SVM startup.
Apparently required back in the earliest days of Xen, we now properly initialise CPU capabilities early during bootstrap. Re-writing capability data later now causes problems if specific features have been deliberately masked out. Thanks to Weidong Han at Intel for finding such a bug where XSAVE feature is masked out by default, but then erroneously written back during VMX initialisation. This would cause memory corruption problems during boot for XSAVE-capable systems. Signed-off-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 22451:8420b82c22c2 xen-unstable date: Tue Nov 30 11:34:08 2010 +0000
-rw-r--r--xen/arch/x86/hvm/svm/svm.c3
-rw-r--r--xen/arch/x86/hvm/vmx/vmx.c3
2 files changed, 0 insertions, 6 deletions
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index f262cca5aa..a77639f064 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -889,9 +889,6 @@ void start_svm(struct cpuinfo_x86 *c)
return;
}
- /* Xen does not fill x86_capability words except 0. */
- boot_cpu_data.x86_capability[5] = cpuid_ecx(0x80000001);
-
if ( !test_bit(X86_FEATURE_SVME, &boot_cpu_data.x86_capability) )
return;
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 98b95d4b46..30ed7b2fc1 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1433,9 +1433,6 @@ void start_vmx(void)
return;
}
- /* Xen does not fill x86_capability words except 0. */
- boot_cpu_data.x86_capability[4] = cpuid_ecx(1);
-
if ( !test_bit(X86_FEATURE_VMXE, &boot_cpu_data.x86_capability) )
return;