aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_resume.c
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2007-09-19 17:44:23 +0100
committerTim Deegan <Tim.Deegan@xensource.com>2007-09-19 17:44:23 +0100
commit120bafda14496fe7dcf046bb6446b79cb0e8fa80 (patch)
tree38510701848bf039a0bca1ee01901d193de2cec3 /tools/libxc/xc_resume.c
parent72f379b5b2a00489b5cbd10277ab4b7f7e9d0b71 (diff)
downloadxen-120bafda14496fe7dcf046bb6446b79cb0e8fa80.tar.gz
xen-120bafda14496fe7dcf046bb6446b79cb0e8fa80.tar.bz2
xen-120bafda14496fe7dcf046bb6446b79cb0e8fa80.zip
[TOOLS] Make xc_domain_{save, restore} understand compat guests
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Diffstat (limited to 'tools/libxc/xc_resume.c')
-rw-r--r--tools/libxc/xc_resume.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c
index df48fa3dff..3ce213e1f7 100644
--- a/tools/libxc/xc_resume.c
+++ b/tools/libxc/xc_resume.c
@@ -8,13 +8,8 @@
#include <xen/foreign/x86_64.h>
#include <xen/hvm/params.h>
-/* Need to provide the right flavour of vcpu context for Xen */
-typedef union
-{
- vcpu_guest_context_x86_64_t c64;
- vcpu_guest_context_x86_32_t c32;
- vcpu_guest_context_t c;
-} vcpu_guest_context_either_t;
+/* Don't yet support cross-address-size uncooperative resume */
+#define guest_width (sizeof (unsigned long))
static int modify_returncode(int xc_handle, uint32_t domid)
{
@@ -50,9 +45,9 @@ static int modify_returncode(int xc_handle, uint32_t domid)
if ( !info.hvm )
ctxt.c.user_regs.eax = 1;
else if ( strstr(caps, "x86_64") )
- ctxt.c64.user_regs.eax = 1;
+ ctxt.x64.user_regs.eax = 1;
else
- ctxt.c32.user_regs.eax = 1;
+ ctxt.x32.user_regs.eax = 1;
if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt.c)) != 0 )
return rc;