public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/3] KVM: x86: Provide per VM capability for disabling PMU virtualization
@ 2022-02-09 17:29 David Dunn
  2022-02-09 17:29 ` [PATCH v6 1/3] " David Dunn
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Dunn @ 2022-02-09 17:29 UTC (permalink / raw)
  To: pbonzini; +Cc: seanjc, jmattson, like.xu.linux, kvm, David Dunn

This patch set allows usermode to disable PMU virtualization on
individual x86 VMs.  When disabled, the PMU is not advertised to
or accessible from the guest.

v5: https://lore.kernel.org/kvm/20220123184541.993212-1-daviddunn@google.com/

v5 -> v6
 * resolve minor conflicts that were queued after v5 was reviewed

v4 -> v5
 * Remove automatic CPUID adjustment when PMU disabled [Like]
 * Update documentation and changelog to reflect above.
 * Update documentation to document arg[0] and return values.  [Like].

David Dunn (3):
  KVM: x86: Provide per VM capability for disabling PMU virtualization
  KVM: selftests: Allow creation of selftest VM without vcpus
  KVM: selftests: Verify disabling PMU virtualization via
    KVM_CAP_CONFIG_PMU

 Documentation/virt/kvm/api.rst                | 22 ++++++++++++
 arch/x86/include/asm/kvm_host.h               |  1 +
 arch/x86/kvm/svm/pmu.c                        |  2 +-
 arch/x86/kvm/vmx/pmu_intel.c                  |  2 +-
 arch/x86/kvm/x86.c                            | 12 +++++++
 include/uapi/linux/kvm.h                      |  4 +++
 tools/include/uapi/linux/kvm.h                |  4 +++
 .../selftests/kvm/include/kvm_util_base.h     |  3 ++
 tools/testing/selftests/kvm/lib/kvm_util.c    | 35 +++++++++++++++----
 .../kvm/x86_64/pmu_event_filter_test.c        | 35 +++++++++++++++++++
 10 files changed, 112 insertions(+), 8 deletions(-)

-- 
2.35.0.263.gb82422642f-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-14 21:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 17:29 [PATCH v6 0/3] KVM: x86: Provide per VM capability for disabling PMU virtualization David Dunn
2022-02-09 17:29 ` [PATCH v6 1/3] " David Dunn
2022-02-14 19:53   ` Sean Christopherson
2022-02-09 17:29 ` [PATCH v6 2/3] KVM: selftests: Allow creation of selftest VM without vcpus David Dunn
2022-02-14 20:06   ` Sean Christopherson
2022-02-09 17:29 ` [PATCH v6 3/3] KVM: selftests: Verify disabling PMU virtualization via KVM_CAP_CONFIG_PMU David Dunn
2022-02-14 20:13   ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox