]> xenbits.xensource.com Git - xen.git/commit
x86/cpu: Fix IST handling during PCPU bringup
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 12 Oct 2017 12:50:31 +0000 (14:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:50:31 +0000 (14:50 +0200)
commitcc08c73c8c1f5ba5ed0f8274548db6725e1c3157
treedf3274e3f9e85efe4b6e5aae525a2339c27bd97e
parentbf2b4eadcf379d0361b38de9725ea5f7a18a5205
x86/cpu: Fix IST handling during PCPU bringup

Clear IST references in newly allocated IDTs.  Nothing good will come of
having them set before the TSS is suitably constructed (although the chances
of the CPU surviving such an IST interrupt/exception is extremely slim).

Uniformly set the IST references after the TSS is in place.  This fixes an
issue on AMD hardware, where onlining a PCPU while PCPU0 is in HVM context
will cause IST_NONE to be copied into the new IDT, making that PCPU vulnerable
to privilege escalation from PV guests until it subsequently schedules an HVM
guest.

This is XSA-244.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/smpboot.c