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

[Xen-changelog] [PATCH] libxc-x86-64-fixes.patch



ChangeSet 1.1394, 2005/03/30 09:07:28+01:00, arun.sharma@xxxxxxxxx

        [PATCH] libxc-x86-64-fixes.patch
        
        Build fixes for x86-64.
        
        Signed-off-by: Nitin Kamble <nitin.a.kamble@xxxxxxxxx>
        Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>



 xc_ptrace.c    |    4 ++--
 xc_vmx_build.c |    8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)


diff -Nru a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   2005-03-30 04:04:08 -05:00
+++ b/tools/libxc/xc_ptrace.c   2005-03-30 04:04:08 -05:00
@@ -281,9 +281,9 @@
                SET_PT_REGS(pt, ctxt.cpu_ctxt); 
                memcpy(data, &pt, sizeof(elf_gregset_t));
        } else if (request == PTRACE_GETFPREGS)
-           memcpy(data, &ctxt.fpu_ctxt, sizeof(elf_fpregset_t));
+           memcpy(data, &ctxt.fpu_ctxt, sizeof(ctxt.fpu_ctxt));
        else /*if (request == PTRACE_GETFPXREGS)*/
-           memcpy(data, &ctxt.fpu_ctxt, sizeof(elf_fpxregset_t));
+           memcpy(data, &ctxt.fpu_ctxt, sizeof(ctxt.fpu_ctxt));
        cr3 = ctxt.pt_base;
        regs_valid = 1;
        break;
diff -Nru a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
--- a/tools/libxc/xc_vmx_build.c        2005-03-30 04:04:08 -05:00
+++ b/tools/libxc/xc_vmx_build.c        2005-03-30 04:04:08 -05:00
@@ -478,10 +478,18 @@
 {
     int eax, ecx;
 
+#ifdef __i386__
     __asm__ __volatile__ ("pushl %%ebx; cpuid; popl %%ebx" 
                          : "=a" (eax), "=c" (ecx) 
                          : "0" (1) 
                          : "dx");
+#elif defined __x86_64__
+    __asm__ __volatile__ ("pushq %%rbx; cpuid; popq %%rbx"
+                          : "=a" (eax), "=c" (ecx)
+                          : "0" (1)
+                          : "dx");
+#endif
+
     if (!(ecx & VMX_FEATURE_FLAG)) {
         return -1;
     }

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