libxc: Initialize vcpu context for 64-bit PVH VCPUs
PATCH 1/1 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.
---
Once again, with correctly spelled list address.
tools/libxc/xc_dom_x86.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
tools/libxc/xc_dom_x86.c +11 -11
@@ -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 )
Signature · 1 line
1.7.1
El 15/10/15 a les 16.44, Boris Ostrovsky ha escrit:
Quoted 4 lines
Commit
5b921b49f08("libxc: rework BSP initialization") forgot to callxc_vcpu_setcontext()for 64-bit PVH VCPUs.Signed-off-by Boris Ostrovsky <[email protected]>
Ouch, my bad:
32bit seem to be fine though.
Quoted 11 lines · Roger Pau Monné
El 15/10/15 a les 16.44, Boris Ostrovsky ha escrit:
Quoted 4 lines
Commit
5b921b49f08("libxc: rework BSP initialization") forgot to callxc_vcpu_setcontext()for 64-bit PVH VCPUs.Signed-off-by Boris Ostrovsky <[email protected]>Ouch, my bad:
Acked-by Roger Pau Monné <[email protected]>32bit seem to be fine though.
I haven't tested it but it does look OK.
-boris
Quoted 4 lines · Boris Ostrovsky
Commit
5b921b49f08("libxc: rework BSP initialization") forgot to callxc_vcpu_setcontext()for 64-bit PVH VCPUs.Signed-off-by Boris Ostrovsky <[email protected]>
Quoted 7 lines · Wei Liu
Quoted 4 lines · Boris Ostrovsky
Commit
5b921b49f08("libxc: rework BSP initialization") forgot to callxc_vcpu_setcontext()for 64-bit PVH VCPUs.Signed-off-by Boris Ostrovsky <[email protected]>Acked-by Wei Liu <[email protected]>
Applied w/ this + Roger's ack.