ia64/xen-unstable
changeset 4378:89abc2bc14bb
bitkeeper revision 1.1236.1.158 (424a5e40njyl8M4wEhCb_M060CCf-w)
[PATCH] libxc-x86-64-fixes.patch
Build fixes for x86-64.
Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
[PATCH] libxc-x86-64-fixes.patch
Build fixes for x86-64.
Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author | arun.sharma@intel.com[kaf24] |
---|---|
date | Wed Mar 30 08:07:28 2005 +0000 (2005-03-30) |
parents | 6234d6fd8618 |
children | d1595511060c ee08ac066568 |
files | tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c |
line diff
1.1 --- a/tools/libxc/xc_ptrace.c Wed Mar 30 07:57:13 2005 +0000 1.2 +++ b/tools/libxc/xc_ptrace.c Wed Mar 30 08:07:28 2005 +0000 1.3 @@ -281,9 +281,9 @@ xc_ptrace(enum __ptrace_request request, 1.4 SET_PT_REGS(pt, ctxt.cpu_ctxt); 1.5 memcpy(data, &pt, sizeof(elf_gregset_t)); 1.6 } else if (request == PTRACE_GETFPREGS) 1.7 - memcpy(data, &ctxt.fpu_ctxt, sizeof(elf_fpregset_t)); 1.8 + memcpy(data, &ctxt.fpu_ctxt, sizeof(ctxt.fpu_ctxt)); 1.9 else /*if (request == PTRACE_GETFPXREGS)*/ 1.10 - memcpy(data, &ctxt.fpu_ctxt, sizeof(elf_fpxregset_t)); 1.11 + memcpy(data, &ctxt.fpu_ctxt, sizeof(ctxt.fpu_ctxt)); 1.12 cr3 = ctxt.pt_base; 1.13 regs_valid = 1; 1.14 break;
2.1 --- a/tools/libxc/xc_vmx_build.c Wed Mar 30 07:57:13 2005 +0000 2.2 +++ b/tools/libxc/xc_vmx_build.c Wed Mar 30 08:07:28 2005 +0000 2.3 @@ -478,10 +478,18 @@ int vmx_identify(void) 2.4 { 2.5 int eax, ecx; 2.6 2.7 +#ifdef __i386__ 2.8 __asm__ __volatile__ ("pushl %%ebx; cpuid; popl %%ebx" 2.9 : "=a" (eax), "=c" (ecx) 2.10 : "0" (1) 2.11 : "dx"); 2.12 +#elif defined __x86_64__ 2.13 + __asm__ __volatile__ ("pushq %%rbx; cpuid; popq %%rbx" 2.14 + : "=a" (eax), "=c" (ecx) 2.15 + : "0" (1) 2.16 + : "dx"); 2.17 +#endif 2.18 + 2.19 if (!(ecx & VMX_FEATURE_FLAG)) { 2.20 return -1; 2.21 }