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
| ||
|
Message-ID: <86iko4m5i4.wl-maz@kernel.org> Date: Thu, 20 Mar 2025 09:10:59 +0000 From: Marc Zyngier <maz@...nel.org> To: Akihiko Odaki <akihiko.odaki@...nix.com> Cc: Oliver Upton <oliver.upton@...ux.dev>, Joey Gouly <joey.gouly@....com>, Suzuki K Poulose <suzuki.poulose@....com>, Zenghui Yu <yuzenghui@...wei.com>, Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>, Kees Cook <kees@...nel.org>, "Gustavo A. R. Silva" <gustavoars@...nel.org>, linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org, devel@...nix.com Subject: Re: [PATCH RFC] KVM: arm64: PMU: Use multiple host PMUs On Thu, 20 Mar 2025 06:03:35 +0000, Akihiko Odaki <akihiko.odaki@...nix.com> wrote: > > On 2025/03/20 3:51, Oliver Upton wrote: > > On Wed, Mar 19, 2025 at 06:38:38PM +0000, Marc Zyngier wrote: > >> On Wed, 19 Mar 2025 11:51:21 +0000, Akihiko Odaki <akihiko.odaki@...nix.com> wrote: > >>> What about setting the flag automatically when a user fails to pin > >>> vCPUs to CPUs that are covered by one PMU? There would be no change if > >>> a user correctly pins vCPUs as it is. Otherwise, they will see a > >>> correct feature set advertised to the guest and the cycle counter > >>> working. > >> > >> How do you know that the affinity is "correct"? VCPU affinity can be > >> changed at any time. I, for one, do not want my VMs to change > >> behaviour because I let the vcpus bounce around as the scheduler sees > >> fit. > > Checking the affinity when picking the default PMU; the vCPU affinity > is the only thing that rules the choice of the default PMU even now. > > Perhaps we may model the API as follows: introduce another "composite" > PMU that works on any core but only exposes the cycle counter. Robust > VMMs will choose it or one of hardware PMUs with > KVM_ARM_VCPU_PMU_V3_SET_PMU. KVM will choose the default PMU according > to the vCPU affinity at the point of KVM_ARM_VCPU_INIT otherwise. If > the affinity is covered by one hardware PMU, that PMU will be chosen > as the default. The "composite" PMU will be the default otherwise. This makes no sense to me. A VCPU is always affine to a PMU, because we do not support configurations where only some CPUs have a PMU. This is an all-or-nothing situation. More importantly, you keep suggesting the same "new default", and I keep saying NO. My position is clear: if you want a *new* behaviour, you *must* add a new flag that the VMM explicitly provides to enable this CC-only PMU. No change in default behaviour at all. I'm not going to move from that. M. -- Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists