[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.9] xen/pv: Construct d0v0's GDT properly
commit 57205c489dd66bc0a2f01a64eb6e416e37cd5a0d Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Wed Dec 20 15:55:17 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Dec 20 15:55:17 2017 +0100 xen/pv: Construct d0v0's GDT properly c/s cf6d39f8199 "x86/PV: properly populate descriptor tables" changed the GDT to reference zero_page for intermediate frames between the guest and Xen frames. Because dom0_construct_pv() doesn't call arch_set_info_guest(), some bits of initialisation are missed, including the pv_destroy_gdt() which initially fills the references to zero_page. In practice, this means there is a window between starting and the first call to HYPERCALL_set_gdt() were lar/lsl/verr/verw suffer non-architectural behaviour. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> master commit: 08f27f4468eedbeccaac9fdda4ef732247efd74e master date: 2017-12-01 19:03:26 +0000 --- xen/arch/x86/pv/dom0_build.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index 18c19a2..52aea4d 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -870,6 +870,13 @@ int __init dom0_construct_pv(struct domain *d, regs->rsi = vstartinfo_start; regs->eflags = X86_EFLAGS_IF; + /* + * We don't call arch_set_info_guest(), so some initialisation needs doing + * by hand: + * - Reset the GDT to reference zero_page + */ + destroy_gdt(v); + if ( test_bit(XENFEAT_supervisor_mode_kernel, parms.f_required) ) panic("Dom0 requires supervisor-mode execution"); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.9 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |