public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Enable LBR for the guest
@ 2017-09-25  4:44 Wei Wang
  2017-09-25  4:44 ` [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature Wei Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Wei Wang @ 2017-09-25  4:44 UTC (permalink / raw)
  To: virtualization, kvm, linux-kernel, pbonzini, mst, rkrcmar, ak,
	mingo
  Cc: Wei Wang

This patch series enables the Last Branch Recording feature for the
guest. Instead of trapping each LBR stack MSR access, the MSRs are
passthroughed to the guest. Those MSRs are switched (i.e. load and
saved) on VMExit and VMEntry.

Test:
Try "perf record -b ./test_program" on guest.

Wei Wang (4):
  KVM/vmx: re-write the msr auto switch feature
  KVM/vmx: auto switch MSR_IA32_DEBUGCTLMSR
  perf/x86: add a function to get the lbr stack
  KVM/vmx: enable lbr for the guest

 arch/x86/events/intel/lbr.c       |  23 +++++++
 arch/x86/include/asm/perf_event.h |  14 ++++
 arch/x86/kvm/vmx.c                | 135 +++++++++++++++++++++++++++++++++-----
 3 files changed, 154 insertions(+), 18 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-09-27  1:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-25  4:44 [PATCH v1 0/4] Enable LBR for the guest Wei Wang
2017-09-25  4:44 ` [PATCH v1 1/4] KVM/vmx: re-write the msr auto switch feature Wei Wang
2017-09-25 11:54   ` Paolo Bonzini
2017-09-25 13:02     ` Wei Wang
2017-09-25 14:24       ` Paolo Bonzini
2017-09-25  4:44 ` [PATCH v1 2/4] KVM/vmx: auto switch MSR_IA32_DEBUGCTLMSR Wei Wang
2017-09-25 11:57   ` Paolo Bonzini
2017-09-25  4:44 ` [PATCH v1 3/4] perf/x86: add a function to get the lbr stack Wei Wang
2017-09-25  4:44 ` [PATCH v1 4/4] KVM/vmx: enable lbr for the guest Wei Wang
2017-09-25  9:16   ` Paolo Bonzini
2017-09-25 12:57     ` Wei Wang
2017-09-25 14:57   ` Andi Kleen
2017-09-26  8:56     ` Wei Wang
2017-09-26 16:41       ` Andi Kleen
2017-09-27  1:27         ` Wei Wang
2017-09-25 14:59 ` [PATCH v1 0/4] Enable LBR " Andi Kleen
2017-09-26  8:47   ` Wei Wang
2017-09-26 16:51     ` Andi Kleen

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