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

[Xen-changelog] Remove i386/x8664 differences in vmx reg store/load routines.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 72d1cf383c679e1db24c92c7d89d7816b947eabe
# Parent  8f0f24dae963f7cfe0c2915e60b6bc669f55387f
Remove i386/x8664 differences in vmx reg store/load routines.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 8f0f24dae963 -r 72d1cf383c67 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue May 02 15:46:15 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue May 02 17:17:15 2006 +0100
@@ -452,17 +452,6 @@ static void vmx_store_cpu_guest_regs(
 
     if ( regs != NULL )
     {
-#if defined (__x86_64__)
-        __vmread(GUEST_RFLAGS, &regs->rflags);
-        __vmread(GUEST_SS_SELECTOR, &regs->ss);
-        __vmread(GUEST_CS_SELECTOR, &regs->cs);
-        __vmread(GUEST_DS_SELECTOR, &regs->ds);
-        __vmread(GUEST_ES_SELECTOR, &regs->es);
-        __vmread(GUEST_GS_SELECTOR, &regs->gs);
-        __vmread(GUEST_FS_SELECTOR, &regs->fs);
-        __vmread(GUEST_RIP, &regs->rip);
-        __vmread(GUEST_RSP, &regs->rsp);
-#elif defined (__i386__)
         __vmread(GUEST_RFLAGS, &regs->eflags);
         __vmread(GUEST_SS_SELECTOR, &regs->ss);
         __vmread(GUEST_CS_SELECTOR, &regs->cs);
@@ -472,7 +461,6 @@ static void vmx_store_cpu_guest_regs(
         __vmread(GUEST_FS_SELECTOR, &regs->fs);
         __vmread(GUEST_RIP, &regs->eip);
         __vmread(GUEST_RSP, &regs->esp);
-#endif
     }
 
     if ( crs != NULL )
@@ -510,28 +498,11 @@ void vmx_load_cpu_guest_regs(struct vcpu
 
     ASSERT(v->arch.hvm_vmx.launch_cpu == smp_processor_id());
 
-#if defined (__x86_64__)
     __vmwrite(GUEST_SS_SELECTOR, regs->ss);
     __vmwrite(GUEST_DS_SELECTOR, regs->ds);
     __vmwrite(GUEST_ES_SELECTOR, regs->es);
     __vmwrite(GUEST_GS_SELECTOR, regs->gs);
     __vmwrite(GUEST_FS_SELECTOR, regs->fs);
-    __vmwrite(GUEST_RSP, regs->rsp);
-
-    __vmwrite(GUEST_RFLAGS, regs->rflags);
-    if (regs->rflags & EF_TF)
-        __vm_set_bit(EXCEPTION_BITMAP, EXCEPTION_BITMAP_DB);
-    else
-        __vm_clear_bit(EXCEPTION_BITMAP, EXCEPTION_BITMAP_DB);
-
-    __vmwrite(GUEST_CS_SELECTOR, regs->cs);
-    __vmwrite(GUEST_RIP, regs->rip);
-#elif defined (__i386__)
-    __vmwrite(GUEST_SS_SELECTOR, regs->ss);
-    __vmwrite(GUEST_DS_SELECTOR, regs->ds);
-    __vmwrite(GUEST_ES_SELECTOR, regs->es);
-    __vmwrite(GUEST_GS_SELECTOR, regs->gs);
-    __vmwrite(GUEST_FS_SELECTOR, regs->fs);
 
     __vmwrite(GUEST_RSP, regs->esp);
 
@@ -543,7 +514,6 @@ void vmx_load_cpu_guest_regs(struct vcpu
 
     __vmwrite(GUEST_CS_SELECTOR, regs->cs);
     __vmwrite(GUEST_RIP, regs->eip);
-#endif
 
     /* Reload current VCPU's VMCS if it was temporarily unloaded. */
     if ( (v != current) && hvm_guest(current) )

_______________________________________________
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®.