| Date | Thu, 11 Apr 2024 13:57:22 -0700 | Subject | Re: [RFC PATCH 12/41] KVM: x86/pmu: Plumb through passthrough PMU to vcpu for Intel CPUs | From | Sean Christopherson <> |
| |
On Fri, Jan 26, 2024, Xiong Zhang wrote: > From: Mingwei Zhang <mizhang@google.com> > > Plumb through passthrough PMU setting from kvm->arch into kvm_pmu on each > vcpu created. Note that enabling PMU is decided by VMM when it sets the > CPUID bits exposed to guest VM. So plumb through the enabling for each pmu > in intel_pmu_refresh().
As stated in the previous patch, even the most naive implementation can be:
static inline bool is_passthrough_pmu_enabled(struct kvm_vcpu *vcpu) { return enable_passthrough_pmu && vcpu_to_pmu(vcpu)->version; }
|