[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vmx: Set HOST_FS and HOST_GS to unusable on vmexit.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1194978647 0
# Node ID ab516ca6e984156fcc0498b135542a9e687aa626
# Parent  5e4d4934a5d74ec08931d8b7ff0f686877cdacaa
vmx: Set HOST_FS and HOST_GS to unusable on vmexit.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmcs.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff -r 5e4d4934a5d7 -r ab516ca6e984 xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Tue Nov 13 17:57:22 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Tue Nov 13 18:30:47 2007 +0000
@@ -493,18 +493,10 @@ static int construct_vmcs(struct vcpu *v
     __vmwrite(HOST_SS_SELECTOR, __HYPERVISOR_DS);
     __vmwrite(HOST_DS_SELECTOR, __HYPERVISOR_DS);
     __vmwrite(HOST_ES_SELECTOR, __HYPERVISOR_DS);
-#if defined(__i386__)
-    __vmwrite(HOST_FS_SELECTOR, __HYPERVISOR_DS);
-    __vmwrite(HOST_GS_SELECTOR, __HYPERVISOR_DS);
+    __vmwrite(HOST_FS_SELECTOR, 0);
+    __vmwrite(HOST_GS_SELECTOR, 0);
     __vmwrite(HOST_FS_BASE, 0);
     __vmwrite(HOST_GS_BASE, 0);
-#elif defined(__x86_64__)
-    {
-        unsigned long msr;
-        rdmsrl(MSR_FS_BASE, msr); __vmwrite(HOST_FS_BASE, msr);
-        rdmsrl(MSR_GS_BASE, msr); __vmwrite(HOST_GS_BASE, msr);
-    }
-#endif
 
     /* Host control registers. */
     __vmwrite(HOST_CR0, read_cr0() | X86_CR0_TS);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.