Subject: Re: [PATCH kvmtool 9/9] arm64: Add support for KVM_ARM_VCPU_PMU_V3_SET_PMU

From: Marc Zyngier <[email-masked]>
Date: Tue, 04 Jan 2022 14:39:59 +0000

On Mon, 15 Nov 2021 16:57:05 +0000,
Alexandru Elisei <[email-masked]> wrote:
> 
> The KVM_ARM_VCPU_PMU_V3_CTRL(KVM_ARM_VCPU_PMU_V3_SET_PMU) VCPU ioctl is
> used to assign a physical PMU to the events that KVM creates when emulating
> the PMU for that VCPU. This is useful on heterogeneous systems, when there
> is more than one hardware PMU present.
> 
> The assumption that is made in the implementation is that the user will
> pin the kvmtool process on a set of CPUs that share the same PMU. This
> allows kvmtool to set the same PMU for all VCPUs from the main thread,
> instead of in the individual VCPU threads.

May I suggest a slightly different use model? Ideally, you'd be able
to run the vcpu threads on the CPUs matching the PMU affinity, and
leave all the other threads to roam on other CPUs.

With your implementation, the whole of kvmtool gets stuck to a given
CPU type, which can be problematic.

Thanks,

	M.

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

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel