xen/pv: Construct d0v0's GDT properly
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 16 Oct 2017 13:20:07 +0000 (13:20 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Dec 2017 19:03:26 +0000 (19:03 +0000)
commit08f27f4468eedbeccaac9fdda4ef732247efd74e
treed1908a513f66ead024526f0910dd599ab5f512d5
parentbfa83bbc3385bab0bfee3c7f408c164c5584e688
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@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
This probably wants backporting to Xen 4.7 and later.
xen/arch/x86/pv/dom0_build.c