All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH] libxc-x86-64-fixes.patch
Date: Tue, 29 Mar 2005 15:33:03 -0800	[thread overview]
Message-ID: <20050329233303.GA409@intel.com> (raw)

Build fixes for x86-64.

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

--- 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;
     }

             reply	other threads:[~2005-03-29 23:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-29 23:33 Arun Sharma [this message]
2005-03-30  3:40 ` [PATCH] libxc-x86-64-fixes.patch Anthony Liguori
2005-03-30  6:26   ` Arun Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050329233303.GA409@intel.com \
    --to=arun.sharma@intel.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.