Re: [PATCH 2/8] um: Check for missing AVX and AVX-512 xstate bits
From: Eric Biggers
Date: Fri Jun 26 2026 - 16:59:58 EST
On Fri, Jun 26, 2026 at 11:49:57AM +0100, David Laight wrote:
> > UML is just another userland application from this perspective, so
> > there is no reason for it to behave any different from the rest of
> > the userland.
Which is why it should do the XCR0 check that the vast majority of
userspace programs do, right? It has always been part of the documented
way to detect AVX and AVX-512 support.
(I think this helps explain why LLMs notice this too. They've been
trained on lots of code that does it correctly.)
That being said, it does seem likely that it's basically obsolete now.
So maybe we could take a shortcut and omit it.
The important thing is really that we make a definitive decision *once*
for each of UML and native x86. The status quo is that the decision is
instead punted to every individual AVX optimized function in the kernel,
which isn't working well.
- Eric