Re: [PATCH v5 25/28] x86/fpu/xstate: Skip writing zeros to signal frame for dynamic user states if in INIT-state
From: Dave Hansen
Date: Mon May 24 2021 - 14:29:07 EST
On 5/24/21 11:15 AM, Len Brown wrote:
> On Sun, May 23, 2021 at 11:28 PM Andy Lutomirski <luto@xxxxxxxxxx> wrote:
>> But what happens if we don't have the XGETBV1 feature? Are we making
>> AMX support depend on XGETBV1?
>
> Yes, AMX systems always have XGETBV.
XGETBV1 support is actually separate from the XGETBV instruction itself.
XGETBV1 even has its own CPUID bit.
This means that a silly hypervisor or lazy future hardware
implementation could decide to enumerate support for AMX and neglect
XGETBV1.
But, it's perfectly fine to have our AMX support depend on XGETBV1. We
even have a little dependency checker table which will clear the AMX
feature in the presence of one of those silly hypervisors.