All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add Automatic IBRS support
@ 2023-05-30 13:58 Alejandro Vallejo
  2023-05-30 13:58 ` [PATCH v2 1/3] x86: Add bit definitions for Automatic IBRS Alejandro Vallejo
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alejandro Vallejo @ 2023-05-30 13:58 UTC (permalink / raw)
  To: Xen-devel
  Cc: Alejandro Vallejo, Wei Liu, Anthony PERARD, Juergen Gross,
	Jan Beulich, Andrew Cooper, Roger Pau Monné

v2:
  * Renamed AUTOMATIC to AUTO
  * Style change in xen-cpuid.c
  * Swapped patches 2 and 3
  * Modified trampoline_efer from the BSP so APs use it during boot and S3
    wakeups pick it up.
  * Avoid the delay setting AutoIBRS

Adds support for AMD's Automatic IBRS. It's a set-and-forget feature that
prevents lower privileged executions from affecting speculations of higher
privileged executions, so retpolines are not required. Furthermore, it
clears the RSB upon VMEXIT, so we can avoid doing it if the feature is
present.

Patch 1 adds the relevant bit definitions for CPUID and EFER.

Patch 2 exposes the feature to HVM guests.

Patch 3 Hooks up AutoIBRS to spec_ctrl. so it's used when IBRS is picked.
        It also tweaks the heuristics so AutoIBRS is preferred over
        retpolines as BTI mitigation. This is enough to protect Xen.

Alejandro Vallejo (3):
  x86: Add bit definitions for Automatic IBRS
  x86: Expose Automatic IBRS to guests
  x86: Add support for AMD's Automatic IBRS

 tools/libs/light/libxl_cpuid.c              |  1 +
 tools/misc/xen-cpuid.c                      |  1 +
 xen/arch/x86/hvm/hvm.c                      |  3 ++
 xen/arch/x86/include/asm/cpufeature.h       |  1 +
 xen/arch/x86/include/asm/msr-index.h        |  4 +-
 xen/arch/x86/pv/emul-priv-op.c              |  4 +-
 xen/arch/x86/spec_ctrl.c                    | 45 ++++++++++++++++-----
 xen/include/public/arch-x86/cpufeatureset.h |  1 +
 8 files changed, 46 insertions(+), 14 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2023-06-01 10:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 13:58 [PATCH v2 0/3] Add Automatic IBRS support Alejandro Vallejo
2023-05-30 13:58 ` [PATCH v2 1/3] x86: Add bit definitions for Automatic IBRS Alejandro Vallejo
2023-05-30 17:29   ` Andrew Cooper
2023-05-31  8:42     ` Alejandro Vallejo
2023-05-30 13:58 ` [PATCH v2 2/3] x86: Expose Automatic IBRS to guests Alejandro Vallejo
2023-05-30 17:31   ` Andrew Cooper
2023-05-31  9:01     ` Alejandro Vallejo
2023-05-31 12:38       ` Andrew Cooper
2023-05-30 13:58 ` [PATCH v2 3/3] x86: Add support for AMD's Automatic IBRS Alejandro Vallejo
2023-06-01 10:35   ` Jan Beulich
2023-06-01 10:36     ` Andrew Cooper

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.