Skip to content

x86/lbr: handle lack of model-specific LBRs

Roger Pau Monne xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5x86/ler: use feature flag to check if option is enabledxen/arch/x86/x86_64/traps.c+1 -11 reply
2/5x86/lbr: enable hypervisor LER with arch LBRxen/arch/x86/include/asm/msr-index.h xen/arch/x86/traps.c xen/include/public/arch-x86/cpufeatureset.h+45 -34 replies
3/5x86/perf: expose LBR format in PERF_CAPABILITIESxen/arch/x86/msr.c xen/include/public/arch-x86/cpufeatureset.h+10 -17 replies
4/5x86/vmx: handle no model-specific LBR presencexen/arch/x86/hvm/vmx/vmx.c+23 -01 reply
5/5x86/vmx: fix indentation of LBRxen/arch/x86/hvm/vmx/vmx.c+19 -191 reply

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchJan BeulichKevin Tian
1/5A-b
2/5
3/5
4/5
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] x86/lbr: handle lack of model-specific LBRs

Hello,

Intel Sapphire Rapids CPUs doesn't have model-specific MSRs, and hence only architectural LBRs are available.

Firstly implement some changes so Xen knows how to enable arch LBRs so that the ler option can also work in such scenario (first two patches).

The lack of model-specific LBRs also affects guests, as setting DEBUGCTLMSR.LBR is now ignored (value hardwired to 0, writes ignored) by the hardware due to the lack of model-specific LBRs. The LBR format reported in PERF_CAPABILITIES also need to be exposed, as that's a way for guests to detect lack of model-specific LBRs presence (patches 3 and 4).

Patch 5 is an indentation fix that can be merged into patch 4: done separately to help readability of patch 4.

Thanks, Roger.

Roger Pau Monne (5):
x86/ler: use feature flag to check if option is enabled x86/lbr: enable hypervisor LER with arch LBR x86/perf: expose LBR format in PERF_CAPABILITIES x86/vmx: handle no model-specific LBR presence x86/vmx: fix indentation of LBR

 xen/arch/x86/hvm/vmx/vmx.c                  | 59 ++++++++++++++-------
 xen/arch/x86/include/asm/msr-index.h        | 18 +++++++
 xen/arch/x86/msr.c                          |  9 ++++
 xen/arch/x86/traps.c                        | 29 ++++++++--
 xen/arch/x86/x86_64/traps.c                 |  2 +-
 xen/include/public/arch-x86/cpufeatureset.h |  3 +-
 6 files changed, 97 insertions(+), 23 deletions(-)
Signature · 1 line
2.36.0