ia64/xen-unstable

changeset 16374:ab516ca6e984

vmx: Set HOST_FS and HOST_GS to unusable on vmexit.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Tue Nov 13 18:30:47 2007 +0000 (2007-11-13)
parents 5e4d4934a5d7
children a35586bd493b
files xen/arch/x86/hvm/vmx/vmcs.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmcs.c	Tue Nov 13 17:57:22 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmcs.c	Tue Nov 13 18:30:47 2007 +0000
     1.3 @@ -493,18 +493,10 @@ static int construct_vmcs(struct vcpu *v
     1.4      __vmwrite(HOST_SS_SELECTOR, __HYPERVISOR_DS);
     1.5      __vmwrite(HOST_DS_SELECTOR, __HYPERVISOR_DS);
     1.6      __vmwrite(HOST_ES_SELECTOR, __HYPERVISOR_DS);
     1.7 -#if defined(__i386__)
     1.8 -    __vmwrite(HOST_FS_SELECTOR, __HYPERVISOR_DS);
     1.9 -    __vmwrite(HOST_GS_SELECTOR, __HYPERVISOR_DS);
    1.10 +    __vmwrite(HOST_FS_SELECTOR, 0);
    1.11 +    __vmwrite(HOST_GS_SELECTOR, 0);
    1.12      __vmwrite(HOST_FS_BASE, 0);
    1.13      __vmwrite(HOST_GS_BASE, 0);
    1.14 -#elif defined(__x86_64__)
    1.15 -    {
    1.16 -        unsigned long msr;
    1.17 -        rdmsrl(MSR_FS_BASE, msr); __vmwrite(HOST_FS_BASE, msr);
    1.18 -        rdmsrl(MSR_GS_BASE, msr); __vmwrite(HOST_GS_BASE, msr);
    1.19 -    }
    1.20 -#endif
    1.21  
    1.22      /* Host control registers. */
    1.23      __vmwrite(HOST_CR0, read_cr0() | X86_CR0_TS);