All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Support Perf Extensions on AMD KVM guests
@ 2018-01-30 17:32 Janakarajan Natarajan
  2018-01-30 17:32 ` [PATCH v4 1/3] x86/msr: Add AMD Core Perf Extension MSRs Janakarajan Natarajan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Janakarajan Natarajan @ 2018-01-30 17:32 UTC (permalink / raw)
  To: kvm, x86, linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Paolo Bonzini,
	Radim Krcmar, Len Brown, Kyle Huey, Tom Lendacky,
	Borislav Petkov, Grzegorz Andrejczuk, Kan Liang,
	Janakarajan Natarajan

This patchset adds support for Perf Extension on AMD KVM guests.

When perf runs on a guest with family = 15h || 17h, the MSRs that are
accessed, when the Perf Extension flag is made available, differ from
the existing K7 MSRs. The accesses are to the AMD Core Performance
Extension counters which provide 2 extra counters and new MSRs for both
the event select and counter registers.

Since the new event select and counter MSRs are interleaved and K7 MSRs
are contiguous, the logic to map them to the gp_counters[] is changed.

This patchset has been tested with Family 17h and Opteron G1 guests.

v1->v2:
* Rearranged MSR #defines based on Boris's suggestion.

v2->v3:
* Changed the logic of mapping MSR to gp_counters[] index based on
  Boris's feedback.
* Removed use of family checks based on Radim's feedback.
* Removed KVM bugfix patch since it is already applied.

v3->v4:
* Rebased to latest KVM tree.

Janakarajan Natarajan (3):
  x86/msr: Add AMD Core Perf Extension MSRs
  x86/kvm: Add support for AMD Core Perf Extension in guest
  x86/kvm: Expose AMD Core Perf Extension flag to guests

 arch/x86/include/asm/msr-index.h |  14 ++++
 arch/x86/kvm/cpuid.c             |   8 ++-
 arch/x86/kvm/pmu_amd.c           | 140 +++++++++++++++++++++++++++++++++++----
 arch/x86/kvm/x86.c               |   1 +
 4 files changed, 148 insertions(+), 15 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2018-02-05 17:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 17:32 [PATCH v4 0/3] Support Perf Extensions on AMD KVM guests Janakarajan Natarajan
2018-01-30 17:32 ` [PATCH v4 1/3] x86/msr: Add AMD Core Perf Extension MSRs Janakarajan Natarajan
2018-01-30 17:32 ` [PATCH v4 2/3] x86/kvm: Add support for AMD Core Perf Extension in guest Janakarajan Natarajan
2018-01-30 17:32 ` [PATCH v4 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests Janakarajan Natarajan
2018-02-02 20:03   ` kbuild test robot
2018-02-02 23:26     ` Natarajan, Janakarajan
2018-02-02 20:03   ` [RFC PATCH] x86/kvm: perf_ext_supported() can be static kbuild test robot
2018-02-05 13:43   ` [PATCH v4 3/3] x86/kvm: Expose AMD Core Perf Extension flag to guests Radim Krcmar
2018-02-05 17:48     ` Natarajan, Janakarajan

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.