All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lewis <aaronlewis@google.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, jmattson@google.com, seanjc@google.com,
	Aaron Lewis <aaronlewis@google.com>
Subject: [PATCH v2 0/4] kvm: x86/pmu: Introduce and test masked events
Date: Mon,  6 Jun 2022 17:52:45 +0000	[thread overview]
Message-ID: <20220606175248.1884041-1-aaronlewis@google.com> (raw)

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


             reply	other threads:[~2022-06-06 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 17:52 Aaron Lewis [this message]
2022-06-06 17:52 ` [PATCH v2 1/4] kvm: x86/pmu: Introduce masked events to the pmu event filter Aaron Lewis
2022-07-01 23:43   ` Jim Mattson
2022-07-06 16:11     ` Aaron Lewis
2022-07-06 17:23       ` Jim Mattson
2022-07-09  1:15         ` Aaron Lewis
2022-07-04  6:36   ` kernel test robot
2022-06-06 17:52 ` [PATCH v2 2/4] selftests: kvm/x86: Add flags when creating a " Aaron Lewis
2022-06-06 17:52 ` [PATCH v2 3/4] selftests: kvm/x86: Add testing for masked events Aaron Lewis
2022-06-06 17:52 ` [PATCH v2 4/4] selftests: kvm/x86: Add testing for KVM_SET_PMU_EVENT_FILTER Aaron Lewis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220606175248.1884041-1-aaronlewis@google.com \
    --to=aaronlewis@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.