On 17/09/2019 07:17, Jan Beulich wrote:
> PCID validly depends on LM, as it can be enabled in Long Mode only.
> INVPCID, otoh, can be used not only without PCID enabled, but also
> outside of Long Mode altogether. In both cases its functionality is
> simply restricted to PCID 0, which is sort of expected as no other PCID
> can be activated there.
>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> Reviewed-by: Roger Pau Monné <roger....@citrix.com>
>
> --- a/xen/tools/gen-cpuid.py
> +++ b/xen/tools/gen-cpuid.py
> @@ -218,10 +218,6 @@ def crunch_numbers(state):
>          #
>          # SSE4_2: [POPCNT]
>  
> -        # The INVPCID instruction depends on PCID infrastructure being
> -        # available.
> -        PCID: [INVPCID],

I take it you haven't tried running a shadow guest with this change in
place.

For !EPT, we clear ENABLE_INVPCID so the instruction will #UD within the
guest.

We could in principle allow the use of INVPCID with shadow guests, but
that would involve teaching Xen how to cope with VMEXIT_REASON_INVPCID
(which is predicated on INVLPG exiting) and wire the flush back into the
shadow logic.

Perhaps the comment could be a little clearer, but it is no accident
that dependency is in place.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to