Re: [PATCH v4 1/6] x86: move ZMM exclusion list into CPU feature flag
From: Borislav Petkov
Date: Mon Feb 10 2025 - 16:49:46 EST
On Mon, Feb 10, 2025 at 01:37:05PM -0800, Eric Biggers wrote:
> I'll also note that boot_cpu_has() is missing a comment that says it is
> deprecated (if it really is).
/*
* This is the default CPU features testing macro to use in code.
^^^^^^^^^^^^^
*
* It is for detection of features which need kernel infrastructure to be
* used. It may *not* directly test the CPU itself. Use the cpu_has() family
* if you want true runtime testing of CPU features, like in hypervisor code
* where you are supporting a possible guest feature where host support for it
* is not relevant.
*/
#define cpu_feature_enabled(bit) \
(__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : static_cpu_has(bit))
#define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit)
---
Forget what I said - we'll convert everything when the time comes.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette