PEBS virtualization enabling via DS
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | perf/x86/core: Support KVM to assign a dedicated counter for guest PEBSarch/ arch/ include/ +1 more | +63 | 13 replies | |
| 2/11 | perf/x86/ds: Handle guest PEBS events overflow and inject fake PMIarch/ | +59 | 0 replies | |
| 3/11 | perf/x86: Expose a function to disable auto-reloadarch/ arch/ | +16 | 0 replies | |
| 4/11 | KVM: x86/pmu: Decouple event enablement from event creationarch/ | +2 | 0 replies | |
| 5/11 | KVM: x86/pmu: Add support to reprogram PEBS event for guest countersarch/ arch/ arch/ | +70 | 1 reply | |
| 6/11 | KVM: x86/pmu: Implement is_pebs_via_ds_supported pmu opsarch/ arch/ | +19 | 0 replies | |
| 7/11 | KVM: x86/pmu: Expose CPUIDs feature bits PDCM, DS, DTES64arch/ arch/ arch/ +2 more | +39 | 0 replies | |
| 8/11 | KVM: x86/pmu: PEBS MSRs emulationarch/ arch/ arch/ +2 more | +62 | 0 replies | |
| 9/11 | KVM: x86/pmu: Expose PEBS feature to guestarch/ arch/ arch/ +1 more | +24 | 0 replies | |
| 10/11 | KVM: x86/pmu: Introduce the mask value for fixed counterarch/ arch/ | +7 | 0 replies | |
| 11/11 | KVM: x86/pmu: Adaptive PEBS virtualization enablingarch/ arch/ arch/ +2 more | +55 | 0 replies |
Reviews trailers per patch
None of the 11 patches has a Reviewed-by or Acked-by.
| Patch | Andi Kleen |
|---|---|
| 1/11 | Originally-by |
| 2/11 | Originally-by |
| 3/11 | |
| 4/11 | |
| 5/11 | Originally-by |
| 6/11 | Originally-by |
| 7/11 | Originally-by |
| 8/11 | Originally-by |
| 9/11 | Originally-by |
| 10/11 | |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 00/11] PEBS virtualization enabling via DS
The Processor Event-Based Sampling(PEBS) supported on mainstream Intel platforms can provide an architectural state of the instruction executed after the instruction that caused the event. This patchset is going to enable PEBS feature via DS on KVM for the Icelake server. Although PEBS via DS supports EPT violations feature is supported starting Skylake Server, but we have to pin DS area to avoid losing PEBS records due to some issues.
BTW:
The PEBS virtualization via Intel PT patchset V1 has been posted out and the later version will base on this patchset.
https://lkml.kernel.org/r/[email protected]/
Testing:
The guest can use PEBS feature like native. e.g.
# perf record -e instructions:ppp ./br_instr a
perf report on guest:
# Samples: 2K of event 'instructions:ppp', # Event count (approx.): 1473377250
# Overhead Command Shared Object Symbol
57.74% br_instr br_instr [.] lfsr_cond 41.40% br_instr br_instr [.] cmp_end 0.21% br_instr [kernel.kallsyms] [k] __lock_acquire
perf report on host:
# Samples: 2K of event 'instructions:ppp', # Event count (approx.): 1462721386
# Overhead Command Shared Object Symbol
57.90% br_instr br_instr [.] lfsr_cond 41.95% br_instr br_instr [.] cmp_end 0.05% br_instr [kernel.vmlinux] [k] lock_acquire
Kan Liang (4):
perf/x86/core: Support KVM to assign a dedicated counter for guest
PEBS
perf/x86/ds: Handle guest PEBS events overflow and inject fake PMI perf/x86: Expose a function to disable auto-reload
KVM: x86/pmu: Decouple event enablement from event creation
Like Xu (1):
KVM: x86/pmu: Add support to reprogram PEBS event for guest counters
Luwei Kang (6):
KVM: x86/pmu: Implement is_pebs_via_ds_supported pmu ops
KVM: x86/pmu: Expose CPUIDs feature bits PDCM, DS, DTES64
KVM: x86/pmu: PEBS MSRs emulation
KVM: x86/pmu: Expose PEBS feature to guest
KVM: x86/pmu: Introduce the mask value for fixed counter
KVM: x86/pmu: Adaptive PEBS virtualization enabling
arch/x86/events/intel/core.c | 74 +++++++++++++++++++++- arch/x86/events/intel/ds.c | 59 ++++++++++++++++++ arch/x86/events/perf_event.h | 1 + arch/x86/include/asm/kvm_host.h | 12 ++++ arch/x86/include/asm/msr-index.h | 4 ++ arch/x86/include/asm/perf_event.h | 2 + arch/x86/kvm/cpuid.c | 9 ++- arch/x86/kvm/pmu.c | 71 ++++++++++++++++++++- arch/x86/kvm/pmu.h | 2 + arch/x86/kvm/svm.c | 12 ++++ arch/x86/kvm/vmx/capabilities.h | 17 +++++ arch/x86/kvm/vmx/pmu_intel.c | 128 +++++++++++++++++++++++++++++++++++++- arch/x86/kvm/vmx/vmx.c | 6 +- arch/x86/kvm/vmx/vmx.h | 4 ++ arch/x86/kvm/x86.c | 19 +++++- include/linux/perf_event.h | 2 + kernel/events/core.c | 1 + 17 files changed, 414 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.3.1