[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250210214913.GDZ6p0WdZL259TOMa7@fat_crate.local>
Date: Mon, 10 Feb 2025 22:49:13 +0100
From: Borislav Petkov <bp@...en8.de>
To: Eric Biggers <ebiggers@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
x86@...nel.org, linux-block@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>, Keith Busch <kbusch@...nel.org>,
Kent Overstreet <kent.overstreet@...ux.dev>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH v4 1/6] x86: move ZMM exclusion list into CPU feature flag
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
Powered by blists - more mailing lists