Skip to content

target/i386: Misc PMU fixes and enabling

Zide Chen kvm qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 3 repliesIn review
  2. v313 patches 15 repliesSuperseded
  3. v211 patches 11 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches9 repliesSuperseded

Changes in v4 from the cover letter

- Drop PEBS-related patches to reduce scope and accelerate merging.
- Drop disbale BTS support patch.
- Reorder and renumber remaining patches (now 6 total).
- Add defensive assert in kvm_init_msrs() in patch 5.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target/i386: Don't save/restore PERF_GLOBAL_OVF_CTRL MSRstarget/i386/cpu.h target/i386/kvm/kvm.c target/i386/machine.c+2 -152 replies
2/6target/i386: Gate enable_pmu on kvm_enabled()target/i386/cpu.c target/i386/kvm/kvm.c+9 -51 reply
3/6target/i386: Adjust maximum number of PMU counterstarget/i386/cpu.h target/i386/machine.c+4 -80 replies
4/6target/i386: Support full-width writes for perf counterstarget/i386/cpu.h target/i386/kvm/kvm.c+19 -20 replies
5/6target/i386: Increase MSR_BUF_SIZE and split KVM_[GET/SET]_MSRS callstarget/i386/kvm/kvm.c+92 -180 replies
6/6target/i386: Add Topdown metrics feature supporttarget/i386/cpu.c target/i386/cpu.h target/i386/kvm/kvm.c +1 more+38 -20 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchDapeng MiFabiano RosasSandipan Das
1/6R-b R-b
2/6R-b R-b
3/6R-b
4/6
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/6] target/i386: Misc PMU fixes and enabling

This series contains a set of fixes, cleanups, and improvements in target/i386 PMU and MSR handling, including Topdown metrics support.

This version drops some patches that raised more questions in earlier reviews in order to reduce scope and speed up review and integration.

Patch series overview:
Patches 1-5: Miscellaneous PMU/MSR fixes and cleanups. Patch 6: Add Topdown metrics feature support.

The KVM patch series for Topdown metrics support:
https://lore.kernel.org/kvm/[email protected]/T/#t

Changes in v4:
- Drop PEBS-related patches to reduce scope and accelerate merging.
- Drop disbale BTS support patch.
- Reorder and renumber remaining patches (now 6 total).
- Add defensive assert in kvm_init_msrs() in patch 5.

Changes in v3:
- Add new patch 13/13 to support Topdown metrics.
- Separate the adjustment of maximum PMU counters to patch 4/13, in order not to bump PMU migration version_id twice.
- Re-base on top of most recent mainline QEMU: d8a9d97317d0
- Remove MSR_AMD64_PERF_CNTR_GLOBAL_STATUS_CLR in patch 2/13.
- Do not support pebs-fmt=0.
- Fix the vmstate name of msr_ds_pebs.
- Misc fixes and cleanup.

Changes in v2:
- Add two new patches to clean up and refactor LBR format handling.
- Introduce a new pebs-fmt command-line option.
- Add a patch to avoid exposing PEBS capabilities when not enabled.
- Trivial fixes and cleanups.

v3: https://lore.kernel.org/qemu-devel/[email protected]/
v2: https://lore.kernel.org/qemu-devel/[email protected]/
v1: https://lore.kernel.org/qemu-devel/[email protected]/

Dapeng Mi (3):
target/i386: Don't save/restore PERF_GLOBAL_OVF_CTRL MSRs target/i386: Support full-width writes for perf counters target/i386: Add Topdown metrics feature support

Zide Chen (3):
target/i386: Gate enable_pmu on kvm_enabled()
target/i386: Adjust maximum number of PMU counters target/i386: Increase MSR_BUF_SIZE and split KVM_[GET/SET]_MSRS calls

 target/i386/cpu.c     |  11 ++--
 target/i386/cpu.h     |  17 +++--
 target/i386/kvm/kvm.c | 150 +++++++++++++++++++++++++++++++++---------
 target/i386/machine.c |  32 +++++++--
 4 files changed, 161 insertions(+), 49 deletions(-)
Signature · 1 line
2.54.0