diff options
Diffstat (limited to 'tools/libxc/xc_linux_build.c')
-rw-r--r-- | tools/libxc/xc_linux_build.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c index abf427f87f..364453190d 100644 --- a/tools/libxc/xc_linux_build.c +++ b/tools/libxc/xc_linux_build.c @@ -356,14 +356,19 @@ int xc_linux_build(int xc_handle, op.cmd = DOM0_GETDOMAININFO; op.u.getdomaininfo.domain = (domid_t)domid; - op.u.getdomaininfo.exec_domain = 0; - op.u.getdomaininfo.ctxt = ctxt; if ( (do_dom0_op(xc_handle, &op) < 0) || ((u16)op.u.getdomaininfo.domain != domid) ) { PERROR("Could not get info on domain"); goto error_out; } + + if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) ) + { + PERROR("Could not get vcpu context"); + goto error_out; + } + if ( !(op.u.getdomaininfo.flags & DOMFLAGS_PAUSED) || (ctxt->pt_base != 0) ) { @@ -409,7 +414,7 @@ int xc_linux_build(int xc_handle, ctxt->user_regs.eip = vkern_entry; ctxt->user_regs.esp = vstartinfo_start + 2*PAGE_SIZE; ctxt->user_regs.esi = vstartinfo_start; - ctxt->user_regs.eflags = (1<<9) | (1<<2); + ctxt->user_regs.eflags = 1 << 9; /* Interrupt Enable */ /* FPU is set up to default initial state. */ memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt)); |