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

[Xen-changelog] [xen master] libxc: Initialize vcpu context for 64-bit PVH VCPUs



commit c7e21966e6fe1e8640a4d1cb452118c43e27356d
Author:     Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
AuthorDate: Thu Oct 15 10:44:26 2015 -0400
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Oct 15 15:52:31 2015 +0100

    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>
    Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 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 )
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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