]> Pileus Git - ~andy/linux/commit
xen/pvh: Load GDT/GS in early PV bootup code for BSP.
authorMukesh Rathor <mukesh.rathor@oracle.com>
Fri, 13 Dec 2013 18:03:37 +0000 (13:03 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 6 Jan 2014 15:44:10 +0000 (10:44 -0500)
commit8d656bbe43aee6d1be6b49fcf8acbc04588472bc
treefd4e39fe2758a0c6b9542c84152c3041bed1df0e
parent4dd322bc3b25be40dfa91e8ac483b846f3e8dffc
xen/pvh: Load GDT/GS in early PV bootup code for BSP.

During early bootup we start life using the Xen provided
GDT, which means that we are running with %cs segment set
to FLAT_KERNEL_CS (FLAT_RING3_CS64 0xe033, GDT index 261).

But for PVH we want to be use HVM type mechanism for
segment operations. As such we need to switch to the HVM
one and also reload ourselves with the __KERNEL_CS:eip
to run in the proper GDT and segment.

For HVM this is usually done in 'secondary_startup_64' in
(head_64.S) but since we are not taking that bootup
path (we start in PV - xen_start_kernel) we need to do
that in the early PV bootup paths.

For good measure we also zero out the %fs, %ds, and %es
(not strictly needed as Xen has already cleared them
for us). The %gs is loaded by 'switch_to_new_gdt'.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
arch/x86/xen/enlighten.c