Re: [RFC PATCH 00/16] PTI support for x86-32

From: Andrew Cooper
Date: Tue Jan 16 2018 - 14:31:42 EST


On 16/01/18 18:59, Linus Torvalds wrote:
> On Tue, Jan 16, 2018 at 8:36 AM, Joerg Roedel <joro@xxxxxxxxxx> wrote:
>> One of the things that are surely broken is XEN_PV support.
>> I'd appreciate any help with testing and bugfixing on that
>> front.
> Xen PV and PTI don't work together even on x86-64 afaik, the Xen
> people apparently felt it wasn't worth it. See the
>
> if (hypervisor_is_type(X86_HYPER_XEN_PV)) {
> pti_print_if_insecure("disabled on XEN PV.");
> return;
> }

64bit PV guests under Xen already have split pagetables. It is a base
and necessary part of the ABI, because segment limits stopped working in
64bit.

32bit PV guests aren't split, but by far the most efficient way of doing
this is to introduce a new enlightenment and have Xen switch all this
stuff (and IBRS, for that matter) on behalf of the guest kernel on
context switch.

~Andrew