ia64/xen-unstable

changeset 9919:72d1cf383c67

Remove i386/x8664 differences in vmx reg store/load routines.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 02 17:17:15 2006 +0100 (2006-05-02)
parents 8f0f24dae963
children decf309fb47b
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue May 02 15:46:15 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Tue May 02 17:17:15 2006 +0100
     1.3 @@ -452,17 +452,6 @@ static void vmx_store_cpu_guest_regs(
     1.4  
     1.5      if ( regs != NULL )
     1.6      {
     1.7 -#if defined (__x86_64__)
     1.8 -        __vmread(GUEST_RFLAGS, &regs->rflags);
     1.9 -        __vmread(GUEST_SS_SELECTOR, &regs->ss);
    1.10 -        __vmread(GUEST_CS_SELECTOR, &regs->cs);
    1.11 -        __vmread(GUEST_DS_SELECTOR, &regs->ds);
    1.12 -        __vmread(GUEST_ES_SELECTOR, &regs->es);
    1.13 -        __vmread(GUEST_GS_SELECTOR, &regs->gs);
    1.14 -        __vmread(GUEST_FS_SELECTOR, &regs->fs);
    1.15 -        __vmread(GUEST_RIP, &regs->rip);
    1.16 -        __vmread(GUEST_RSP, &regs->rsp);
    1.17 -#elif defined (__i386__)
    1.18          __vmread(GUEST_RFLAGS, &regs->eflags);
    1.19          __vmread(GUEST_SS_SELECTOR, &regs->ss);
    1.20          __vmread(GUEST_CS_SELECTOR, &regs->cs);
    1.21 @@ -472,7 +461,6 @@ static void vmx_store_cpu_guest_regs(
    1.22          __vmread(GUEST_FS_SELECTOR, &regs->fs);
    1.23          __vmread(GUEST_RIP, &regs->eip);
    1.24          __vmread(GUEST_RSP, &regs->esp);
    1.25 -#endif
    1.26      }
    1.27  
    1.28      if ( crs != NULL )
    1.29 @@ -510,23 +498,6 @@ void vmx_load_cpu_guest_regs(struct vcpu
    1.30  
    1.31      ASSERT(v->arch.hvm_vmx.launch_cpu == smp_processor_id());
    1.32  
    1.33 -#if defined (__x86_64__)
    1.34 -    __vmwrite(GUEST_SS_SELECTOR, regs->ss);
    1.35 -    __vmwrite(GUEST_DS_SELECTOR, regs->ds);
    1.36 -    __vmwrite(GUEST_ES_SELECTOR, regs->es);
    1.37 -    __vmwrite(GUEST_GS_SELECTOR, regs->gs);
    1.38 -    __vmwrite(GUEST_FS_SELECTOR, regs->fs);
    1.39 -    __vmwrite(GUEST_RSP, regs->rsp);
    1.40 -
    1.41 -    __vmwrite(GUEST_RFLAGS, regs->rflags);
    1.42 -    if (regs->rflags & EF_TF)
    1.43 -        __vm_set_bit(EXCEPTION_BITMAP, EXCEPTION_BITMAP_DB);
    1.44 -    else
    1.45 -        __vm_clear_bit(EXCEPTION_BITMAP, EXCEPTION_BITMAP_DB);
    1.46 -
    1.47 -    __vmwrite(GUEST_CS_SELECTOR, regs->cs);
    1.48 -    __vmwrite(GUEST_RIP, regs->rip);
    1.49 -#elif defined (__i386__)
    1.50      __vmwrite(GUEST_SS_SELECTOR, regs->ss);
    1.51      __vmwrite(GUEST_DS_SELECTOR, regs->ds);
    1.52      __vmwrite(GUEST_ES_SELECTOR, regs->es);
    1.53 @@ -543,7 +514,6 @@ void vmx_load_cpu_guest_regs(struct vcpu
    1.54  
    1.55      __vmwrite(GUEST_CS_SELECTOR, regs->cs);
    1.56      __vmwrite(GUEST_RIP, regs->eip);
    1.57 -#endif
    1.58  
    1.59      /* Reload current VCPU's VMCS if it was temporarily unloaded. */
    1.60      if ( (v != current) && hvm_guest(current) )