lkml.org 
[lkml]   [2024]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [RFC PATCH 12/41] KVM: x86/pmu: Plumb through passthrough PMU to vcpu for Intel CPUs
    From
    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;
    }

    \
     
     \ /
      Last update: 2024-05-27 16:36    [W:6.955 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site