[PATCH 0/6] x86/alternatives: Adjust all insn-relative fields

Andrew Cooper posted 6 patches 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240422181434.3463252-1-andrew.cooper3@citrix.com
xen/arch/x86/alternative.c               | 210 +++++++++++++------
xen/arch/x86/hvm/vmx/entry.S             |  12 +-
xen/arch/x86/include/asm/spec_ctrl_asm.h |  43 ++--
xen/arch/x86/x86_emulate/Makefile        |   1 +
xen/arch/x86/x86_emulate/decode-lite.c   | 245 +++++++++++++++++++++++
xen/arch/x86/x86_emulate/private.h       |   2 +
xen/arch/x86/x86_emulate/x86_emulate.h   |  17 ++
7 files changed, 445 insertions(+), 85 deletions(-)
create mode 100644 xen/arch/x86/x86_emulate/decode-lite.c
[PATCH 0/6] x86/alternatives: Adjust all insn-relative fields
Posted by Andrew Cooper 1 week, 6 days ago
Alternatives have had a reasonably severe restriction since their
introduction.  This has been the source of several bugs, and several
inefficiencies particularly in the speculative safety paths, and I've finally
gotten bored enough to fixing it.

Introduce the new infrastructure, and adjust the BHB scrubbing logic to use
it.

Andrew Cooper (6):
  x86: Introduce x86_decode_lite()
  x86/alternative: Walk all replacements in debug builds
  x86/alternative: Intend the relocation logic
  x86/alternative: Replace a continue with a goto
  x86/alternative: Relocate all insn-relative fields
  x86/spec-ctrl: Introduce and use DO_COND_BHB_SEQ

 xen/arch/x86/alternative.c               | 210 +++++++++++++------
 xen/arch/x86/hvm/vmx/entry.S             |  12 +-
 xen/arch/x86/include/asm/spec_ctrl_asm.h |  43 ++--
 xen/arch/x86/x86_emulate/Makefile        |   1 +
 xen/arch/x86/x86_emulate/decode-lite.c   | 245 +++++++++++++++++++++++
 xen/arch/x86/x86_emulate/private.h       |   2 +
 xen/arch/x86/x86_emulate/x86_emulate.h   |  17 ++
 7 files changed, 445 insertions(+), 85 deletions(-)
 create mode 100644 xen/arch/x86/x86_emulate/decode-lite.c

-- 
2.30.2