[PATCH v2 0/4] kvm: x86/pmu: Introduce and test masked events

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

 



This series introduces the concept of masked events to the pmu event
filter. Masked events can help reduce the number of events needed in the
events field of a pmu_event_filter by allowing a more generic matching
method to be used for the unit mask when filtering guest events in the
pmu.  With masked events, if an eventsel should be restricted from the
guest, instead of having to add a new eventsel for every unit mask, one
encoded event can be added that matches all possible unit masks.

v1 -> v2
 - Made has_invalid_event() static to fix warning.
 - Fixed checkpatch.pl errors and warnings.
 - Updated to account for KVM_X86_PMU_OP().

Aaron Lewis (4):
  kvm: x86/pmu: Introduce masked events to the pmu event filter
  selftests: kvm/x86: Add flags when creating a pmu event filter
  selftests: kvm/x86: Add testing for masked events
  selftests: kvm/x86: Add testing for KVM_SET_PMU_EVENT_FILTER

 Documentation/virt/kvm/api.rst                |  46 +++++-
 arch/x86/include/asm/kvm-x86-pmu-ops.h        |   1 +
 arch/x86/include/uapi/asm/kvm.h               |   8 +
 arch/x86/kvm/pmu.c                            | 128 +++++++++++++--
 arch/x86/kvm/pmu.h                            |   1 +
 arch/x86/kvm/svm/pmu.c                        |  12 ++
 arch/x86/kvm/vmx/pmu_intel.c                  |  12 ++
 .../kvm/x86_64/pmu_event_filter_test.c        | 147 +++++++++++++++++-
 8 files changed, 333 insertions(+), 22 deletions(-)

-- 
2.36.1.255.ge46751e96f-goog




[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