Skip to content

Enable legacy LBR support for guest

Yang Weijiang kvm qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesIn review
  2. v42 patches 2 repliesSuperseded

Changes in v5 from the cover letter

1. This patchset is rebased on tip : 6621441db5
2. No functional change since v4.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qdev-properties: Add a new macro with bitmask check for uint64_t propertyhw/core/qdev-properties.c include/hw/qdev-properties.h+31 -00 replies
2/2target/i386: Add lbr-fmt vPMU option to support guest LBRtarget/i386/cpu.c target/i386/cpu.h+50 -00 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/2] Enable legacy LBR support for guest

KVM legacy LBR patches have been merged in kernel 5.12, this patchset is to expose the feature to guest from the perf capability MSR. Qemu can add LBR format in cpu option to achieve it, e.g., -cpu host,lbr-fmt=0x5, the format should match host value in IA32_PERF_CAPABILITIES.

Note, KVM legacy LBR solution accelerates guest perf performace by LBR MSR passthrough so it requires guest cpu model matches that of host's, i.e., only -cpu host is supported.

Change in v5:
1. This patchset is rebased on tip : 6621441db5
2. No functional change since v4.

Yang Weijiang (2):
qdev-properties: Add a new macro with bitmask check for uint64_t
property
target/i386: Add lbr-fmt vPMU option to support guest LBR

 hw/core/qdev-properties.c    | 19 +++++++++++++++++
 include/hw/qdev-properties.h | 12 +++++++++++
 target/i386/cpu.c            | 40 ++++++++++++++++++++++++++++++++++++
 target/i386/cpu.h            | 10 +++++++++
 4 files changed, 81 insertions(+)
Signature · 1 line
2.27.0