Re: [PATCH v9 12/26] x86/fpu/xstate: Use feature disable (XFD) to protect dynamic user state

Bae, Chang Seok
2021-08-18T20:44:00Z

On Aug 18, 2021, at 10:46, Borislav Petkov <bp@alien8.de> wrote:
> On Wed, Aug 18, 2021 at 10:20:58AM -0700, Thiago Macieira wrote
>> The way the API to userspace is implemented, the only way to find
>> out if the kernel supports a given state is to enable it. It's not
>> currently possible to ask "do you support AMX tile data?"
>
> Then our API needs improving. An app should be able to ask the kernel
> "Do you support AMX?" get a proper answer and act accordingly.

Maybe I’m missing something, but I wonder what’s the difference from reading
XCR0.

Thanks,
Chang