Re: [PATCH 1/3] Provide VM capability to disable PMU virtualization for individual VMs

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

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux