[PATCH v2 3/4] KVM: arm64: Add KVM_ARM_VCPU_PMU_V3_SET_PMU attribute

Marc Zyngier maz at kernel.org
Wed Dec 8 08:21:43 PST 2021


On Wed, 08 Dec 2021 16:11:13 +0000,
Alexandru Elisei <alexandru.elisei at arm.com> wrote:
> 
> > On the contrary, I am *very* happy to limit a VM to a single PMU (and
> > thus CPU) type on these systems. Really.
> 
> Ok, so any kind of asymmetry is unacceptable.
> 
> Accepted behaviour:
> 
> 1. If userspace sets PMU for one VCPU, then *all* other VCPUs must
> have a PMU set, and furthermore, it must be the same PMU as the
> first VCPU,
> 
> or
> 
> 2. If userspace has initialized a PMU (via
> KVM_ARM_VCPU_PMU_V3_CTRL(KVM_ARM_VCPU_PMU_V3_INIT)) without setting
> a PMU, then it is forbidden for userspace to set a PMU for the other
> VCPUs.
> 
> Is that what you had in mind?

Exactly. This sidesteps any sort of odd behaviour by forcing userspace
to pick a side.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list