qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER


From: Sebastian Ott
Subject: Re: [PATCH v4] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER
Date: Fri, 15 Dec 2023 10:55:51 +0100 (CET)

On Thu, 14 Dec 2023, Eric Auger wrote:
On 12/7/23 11:36, Shaoqin Huang wrote:
+    if (kvm_vcpu_ioctl(cs, KVM_HAS_DEVICE_ATTR, &attr)) {
+        warn_report("The kernel doesn't support the PMU Event Filter!\n");
+        return;
+    }
+
+    /* The filter only needs to be initialized for 1 vcpu. */
Are you sure? This is a per vcpu device ctrl. Where is it written in the
doc that this shall not be called for each vcpu

The interface is per vcpu but the filters are actually managed per vm
(kvm->arch.pmu_filter). From (kernel) commit 6ee7fca2a ("KVM: arm64: Add KVM_ARM_VCPU_PMU_V3_SET_PMU attribute"):
 To ensure that KVM doesn't expose an asymmetric system to the guest, the
 PMU set for one VCPU will be used by all other VCPUs. Once a VCPU has run,
 the PMU cannot be changed in order to avoid changing the list of available
 events for a VCPU, or to change the semantics of existing events.

Sebastian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]