Thanks Sean. On Wed, Jan 19, 2022 at 5:15 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > I'm not necessarily opposed to this capability, but can't userspace get the same > result by using MSR filtering to inject #GP on the PMU MSRs? Yes. It is possible for each userspace to inject #GP on Intel and ignore on AMD. But I think it is less error prone to handle it once in KVM in the same way we handle the module parameter. No extra complexity in KVM but it reduces the complexity in clients. > Probably worth adding a #define in uapi/.../kvm.h for bit 0. > Rather than default to "true", just capture the global "enable_pmu" and then all > the sites that check "enable_pmu" in VM context can check _only_ kvm->arch.enable_pmu. > enable_pmu is readonly, so there's no danger of it being toggled after the VM is > created. Thanks for the feedback. I'll incorporate both of these in v2. Dave Dunn