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

[Xen-changelog] [xen-unstable] x86: Fix 32-bit build.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1243436129 -3600
# Node ID fe68405201d25decd2454879d18f3c17716dcf75
# Parent  326b24bfa9f92b805f7da8fc369af8e721cf707a
x86: Fix 32-bit build.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c             |   29 -----------------------------
 xen/arch/x86/x86_emulate/x86_emulate.c |   12 +++++++-----
 2 files changed, 7 insertions(+), 34 deletions(-)

diff -r 326b24bfa9f9 -r fe68405201d2 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Wed May 27 14:03:09 2009 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Wed May 27 15:55:29 2009 +0100
@@ -1186,34 +1186,6 @@ static void svm_vmexit_do_rdtsc(struct c
     hvm_rdtsc_intercept(regs);
 }
 
-static void svm_dump_regs(const char *from, struct cpu_user_regs *regs)
-{
-    printk("Dumping guest's current registers at %s...\n", from);
-    printk("Size of regs = 0x%lx, address = %p\n",
-           sizeof(struct cpu_user_regs), regs);
-
-    printk("r15 = 0x%016"PRIx64", r14 = 0x%016"PRIx64"\n",
-           regs->r15, regs->r14);
-    printk("r13 = 0x%016"PRIx64", r12 = 0x%016"PRIx64"\n",
-           regs->r13, regs->r12);
-    printk("rbp = 0x%016"PRIx64", rbx = 0x%016"PRIx64"\n",
-           regs->rbp, regs->rbx);
-    printk("r11 = 0x%016"PRIx64", r10 = 0x%016"PRIx64"\n",
-           regs->r11, regs->r10);
-    printk("r9  = 0x%016"PRIx64", r8  = 0x%016"PRIx64"\n",
-           regs->r9, regs->r8);
-    printk("rax = 0x%016"PRIx64", rcx = 0x%016"PRIx64"\n",
-           regs->rax, regs->rcx);
-    printk("rdx = 0x%016"PRIx64", rsi = 0x%016"PRIx64"\n",
-           regs->rdx, regs->rsi);
-    printk("rdi = 0x%016"PRIx64", rsp = 0x%016"PRIx64"\n",
-           regs->rdi, regs->rsp);
-    printk("error code = 0x%08"PRIx32", entry_vector = 0x%08"PRIx32"\n",
-           regs->error_code, regs->entry_vector);
-    printk("rip = 0x%016"PRIx64", rflags = 0x%016"PRIx64"\n",
-           regs->rip, regs->rflags);
-}
-
 static void svm_vmexit_ud_intercept(struct cpu_user_regs *regs)
 {
     struct hvm_emulate_ctxt ctxt;
@@ -1310,7 +1282,6 @@ asmlinkage void svm_vmexit_handler(struc
     if ( unlikely(exit_reason == VMEXIT_INVALID) )
     {
         svm_dump_vmcb(__func__, vmcb);
-        svm_dump_regs(__func__, regs);
         goto exit_and_crash;
     }
 
diff -r 326b24bfa9f9 -r fe68405201d2 xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c    Wed May 27 14:03:09 2009 +0100
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c    Wed May 27 15:55:29 2009 +0100
@@ -3599,6 +3599,7 @@ x86_emulate(
         cs.attr.bytes = 0xc9b; /* G+DB+P+S+Code */
         ss.attr.bytes = 0xc93; /* G+DB+P+S+Data */
 
+#ifdef __x86_64__
         if ( in_longmode(ctxt, ops) )
         {
             cs.attr.fields.db = 0;
@@ -3618,11 +3619,12 @@ x86_emulate(
             _regs.eflags &= ~(msr_content | EFLG_RF);
         }
         else
+#endif
         {
             rc = ops->read_msr(MSR_STAR, &msr_content, ctxt);
             fail_if(rc != 0);
 
-            _regs.rcx = _regs.rip;
+            _regs.ecx = _regs.eip;
             _regs.eip = (uint32_t)msr_content;
             _regs.eflags &= ~(EFLG_VM | EFLG_IF | EFLG_RF);
         }
@@ -3783,11 +3785,11 @@ x86_emulate(
 
         rc = ops->read_msr(MSR_SYSENTER_EIP, &msr_content, ctxt);
         fail_if(rc != 0);
-        _regs.rip = msr_content;
+        _regs.eip = msr_content;
 
         rc = ops->read_msr(MSR_SYSENTER_ESP, &msr_content, ctxt);
         fail_if(rc != 0);
-        _regs.rsp = msr_content;
+        _regs.esp = msr_content;
 
         break;
     }
@@ -3846,8 +3848,8 @@ x86_emulate(
         rc = ops->write_segment(x86_seg_ss, &ss, ctxt);
         fail_if(rc != 0);
 
-        _regs.rip = _regs.rdx;
-        _regs.rsp = _regs.rcx;
+        _regs.eip = _regs.edx;
+        _regs.esp = _regs.ecx;
         break;
     }
 

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