WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] libxc-x86-64-fixes.patch
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Tue, 29 Mar 2005 15:33:03 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 30 Mar 2005 01:20:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Resent-date: Tue, 29 Mar 2005 17:23:03 -0800
Resent-from: adsharma@xxxxxxxxx
Resent-message-id: <20050330012303.6F2B0E13D3@xxxxxxxxxxxxxxxxxxxx>
Resent-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
Build fixes for x86-64.

Signed-off-by: Nitin Kamble <nitin.a.kamble@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

--- 1.4/tools/libxc/xc_ptrace.c 2005-03-20 07:07:46 -08:00
+++ edited/libxc/xc_ptrace.c    2005-03-29 15:18:27 -08: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;
--- 1.14/tools/libxc/xc_vmx_build.c     2005-03-20 03:53:25 -08:00
+++ edited/libxc/xc_vmx_build.c 2005-03-29 15:20:56 -08: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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>