WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86 hvm: Do not overwrite boot-cpu capabi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm: Do not overwrite boot-cpu capability data on VMX/SVM startup.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Dec 2010 10:10:25 -0800
Delivery-date: Tue, 07 Dec 2010 10:14:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1291116848 0
# Node ID 8420b82c22c2cad54860ffdbe8bcec21c65c86be
# Parent  d281061e6ec06bbbf8e2b0fadbeb9d1a04bc32e2
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@xxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |    3 ---
 xen/arch/x86/hvm/vmx/vmx.c |    3 ---
 2 files changed, 6 deletions(-)

diff -r d281061e6ec0 -r 8420b82c22c2 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Mon Nov 29 17:44:32 2010 +0000
+++ b/xen/arch/x86/hvm/svm/svm.c        Tue Nov 30 11:34:08 2010 +0000
@@ -885,9 +885,6 @@ static int svm_cpu_up(void)
 
 struct hvm_function_table * __init start_svm(void)
 {
-    /* 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 NULL;
 
diff -r d281061e6ec0 -r 8420b82c22c2 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Mon Nov 29 17:44:32 2010 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Nov 30 11:34:08 2010 +0000
@@ -1394,9 +1394,6 @@ static struct hvm_function_table __read_
 
 struct hvm_function_table * __init start_vmx(void)
 {
-    /* 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 NULL;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 hvm: Do not overwrite boot-cpu capability data on VMX/SVM startup., Xen patchbot-unstable <=