All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] x86/lbr: handle lack of model-specific LBRs
@ 2022-05-20 13:37 Roger Pau Monne
  2022-05-20 13:37 ` [PATCH 1/5] x86/ler: use feature flag to check if option is enabled Roger Pau Monne
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Roger Pau Monne @ 2022-05-20 13:37 UTC (permalink / raw)
  To: xen-devel
  Cc: Roger Pau Monne, Jan Beulich, Andrew Cooper, Wei Liu,
	Jun Nakajima, Kevin Tian

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(-)

-- 
2.36.0



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-07-06  7:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 13:37 [PATCH 0/5] x86/lbr: handle lack of model-specific LBRs Roger Pau Monne
2022-05-20 13:37 ` [PATCH 1/5] x86/ler: use feature flag to check if option is enabled Roger Pau Monne
2022-05-30 15:00   ` Jan Beulich
2022-05-20 13:37 ` [PATCH 2/5] x86/lbr: enable hypervisor LER with arch LBR Roger Pau Monne
2022-05-30 15:31   ` Jan Beulich
2022-07-01 15:39     ` Roger Pau Monné
2022-07-04  6:15       ` Jan Beulich
2022-07-04  8:23         ` Roger Pau Monné
2022-05-20 13:37 ` [PATCH 3/5] x86/perf: expose LBR format in PERF_CAPABILITIES Roger Pau Monne
2022-05-20 14:10   ` Andrew Cooper
2022-05-20 14:19     ` Jan Beulich
2022-05-20 14:58       ` Andrew Cooper
2022-05-23  8:04         ` Roger Pau Monné
2022-05-23  8:12         ` Jan Beulich
2022-05-23  9:53           ` Roger Pau Monné
2022-05-20 14:52     ` Roger Pau Monné
2022-05-20 13:37 ` [PATCH 4/5] x86/vmx: handle no model-specific LBR presence Roger Pau Monne
2022-05-30 16:02   ` Jan Beulich
2022-05-20 13:37 ` [PATCH 5/5] x86/vmx: fix indentation of LBR Roger Pau Monne
2022-06-29  6:40   ` Tian, Kevin
2022-06-17  3:24 ` [PATCH 0/5] x86/lbr: handle lack of model-specific LBRs Henry Wang
2022-07-06  7:30 ` Henry Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.