Skip to content

Enable LBR for the guest

Wei Wang kvm lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM/vmx: re-write the msr auto switch featurearch/x86/kvm/vmx.c+63 -95 replies
1/4KVM/vmx: re-write the msr auto switch featurearch/x86/kvm/vmx.c+63 -90 replies
2/4KVM/vmx: auto switch MSR_IA32_DEBUGCTLMSRarch/x86/kvm/vmx.c+4 -92 replies
3/4perf/x86: add a function to get the lbr stackarch/x86/events/intel/lbr.c arch/x86/include/asm/perf_event.h+37 -00 replies
3/4perf/x86: add a function to get the lbr stackarch/x86/events/intel/lbr.c arch/x86/include/asm/perf_event.h+37 -00 replies
4/4KVM/vmx: enable lbr for the guestarch/x86/kvm/vmx.c+50 -011 replies
4/4KVM/vmx: enable lbr for the guestarch/x86/kvm/vmx.c+50 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] Enable LBR for the guest

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(-)
Signature · 1 line
2.7.4