[PATCH v2 10/14] KVM: arm64: Move PMUVer filtering into KVM code
Marc Zyngier
maz at kernel.org
Wed Feb 19 10:17:00 PST 2025
On Mon, 03 Feb 2025 18:31:07 +0000,
Oliver Upton <oliver.upton at linux.dev> wrote:
>
> The supported guest PMU version on a particular platform is ultimately a
> KVM decision. Move PMUVer filtering into KVM code.
>
> Tested-by: Janne Grunau <j at jannau.net>
> Signed-off-by: Oliver Upton <oliver.upton at linux.dev>
> ---
> arch/arm64/include/asm/cpufeature.h | 23 -----------------------
> arch/arm64/kvm/pmu-emul.c | 15 +++++++++------
> 2 files changed, 9 insertions(+), 29 deletions(-)
>
> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index 0eff048848b8..c4326f1cb917 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -525,29 +525,6 @@ cpuid_feature_extract_unsigned_field(u64 features, int field)
> return cpuid_feature_extract_unsigned_field_width(features, field, 4);
> }
>
> -/*
> - * Fields that identify the version of the Performance Monitors Extension do
> - * not follow the standard ID scheme. See ARM DDI 0487E.a page D13-2825,
> - * "Alternative ID scheme used for the Performance Monitors Extension version".
> - */
> -static inline u64 __attribute_const__
> -cpuid_feature_cap_perfmon_field(u64 features, int field, u64 cap)
> -{
> - u64 val = cpuid_feature_extract_unsigned_field(features, field);
I guess this is where this idiom is coming from. I think it'd be worth
revisiting it here as well as in the last patch.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list