lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <861pvtsstf.wl-maz@kernel.org>
Date: Wed, 19 Feb 2025 18:17:00 +0000
From: Marc Zyngier <maz@...nel.org>
To: Oliver Upton <oliver.upton@...ux.dev>
Cc: kvmarm@...ts.linux.dev,
	Joey Gouly <joey.gouly@....com>,
	Suzuki K Poulose <suzuki.poulose@....com>,
	Zenghui Yu <yuzenghui@...wei.com>,
	Mingwei Zhang <mizhang@...gle.com>,
	Colton Lewis <coltonlewis@...gle.com>,
	Raghavendra Rao Ananta <rananta@...gle.com>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Janne Grunau <j@...nau.net>
Subject: Re: [PATCH v2 10/14] KVM: arm64: Move PMUVer filtering into KVM code

On Mon, 03 Feb 2025 18:31:07 +0000,
Oliver Upton <oliver.upton@...ux.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@...nau.net>
> Signed-off-by: Oliver Upton <oliver.upton@...ux.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ