[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxc: Initialize vcpu context for 64-bit PVH VCPUs



Commit 5b921b49f08 ("libxc: rework BSP initialization") forgot to call
xc_vcpu_setcontext() for 64-bit PVH VCPUs.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
---

Once again, with correctly spelled list address.


 tools/libxc/xc_dom_x86.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
index 034abe0..4c4182f 100644
--- a/tools/libxc/xc_dom_x86.c
+++ b/tools/libxc/xc_dom_x86.c
@@ -810,18 +810,18 @@ static int vcpu_x86_64(struct xc_dom_image *dom)
     DOMPRINTF("%s: cr3: pfn 0x%" PRIpfn " mfn 0x%" PRIpfn "",
               __FUNCTION__, dom->pgtables_seg.pfn, cr3_pfn);
 
-    if ( dom->pvh_enabled )
-        return 0;
-
-    ctxt->user_regs.ds = FLAT_KERNEL_DS_X86_64;
-    ctxt->user_regs.es = FLAT_KERNEL_DS_X86_64;
-    ctxt->user_regs.fs = FLAT_KERNEL_DS_X86_64;
-    ctxt->user_regs.gs = FLAT_KERNEL_DS_X86_64;
-    ctxt->user_regs.ss = FLAT_KERNEL_SS_X86_64;
-    ctxt->user_regs.cs = FLAT_KERNEL_CS_X86_64;
+    if ( !dom->pvh_enabled )
+    {
+        ctxt->user_regs.ds = FLAT_KERNEL_DS_X86_64;
+        ctxt->user_regs.es = FLAT_KERNEL_DS_X86_64;
+        ctxt->user_regs.fs = FLAT_KERNEL_DS_X86_64;
+        ctxt->user_regs.gs = FLAT_KERNEL_DS_X86_64;
+        ctxt->user_regs.ss = FLAT_KERNEL_SS_X86_64;
+        ctxt->user_regs.cs = FLAT_KERNEL_CS_X86_64;
 
-    ctxt->kernel_ss = ctxt->user_regs.ss;
-    ctxt->kernel_sp = ctxt->user_regs.esp;
+        ctxt->kernel_ss = ctxt->user_regs.ss;
+        ctxt->kernel_sp = ctxt->user_regs.esp;
+    }
 
     rc = xc_vcpu_setcontext(dom->xch, dom->guest_domid, 0, &any_ctx);
     if ( rc != 0 )
-- 
1.7.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.