Re: [PATCH v2 1/8] x86/fpu: Check for missing AVX and AVX-512 xstate bits

Borislav Petkov <[email protected]>
Newsgroups org.infradead.lists.linux-um,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-raid
Message-ID <20260812200451.GCanzR41yxY2n_62fs@fat_crate.local>
On Wed, Aug 12, 2026 at 07:40:11PM +0000, Eric Biggers wrote:
> Interesting, so the !boot_cpu_has(X86_FEATURE_FPU) check is dead code
> since ab05214025ee ("x86/fpu: Remove MATH_EMULATION and related glue
> code").  Sure, there's no need to add anything to there then, though we
> should do a separate patch that removes it.

Sure.

> Sure, that works.  I'm not sure it's actually easier to understand than
> what I proposed; it's kind of contradictory to call
> "setup_clear_cpu_cap(X86_FEATURE_XSAVE)" when we just verified it is
> clear.  But the comment mentioning that it's actually for clearing
> dependent flags helps.  If you prefer this way, let's do this.

Yes please, that's why I added the comment. And we have this machinery in
do_clear_cpu_cap() so let's use it.

> It's functionally equivalent, but yes we can write it this way if you
> prefer.  Is it okay if I fold your diff (minus the pr_info()) into this
> patch?  (I'll also add FW_BUG to the error messages as Thomas
> requested.)

Yap, that's perfectly fine.

Thanks.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.