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
|