Skip to content

x86: FRED support

Andrew Cooper xen-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest posting 2/214 patches 26 repliesIn review
  2. v4 posting 1/20 of 14 patches 0 repliesSuperseded
  3. v322 patches 24 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v223 patches32 repliesSuperseded

Patches in v4 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14x86/pv: Don't assume that INT $imm8 instructions are two bytes longxen/arch/x86/include/asm/pv/traps.h xen/arch/x86/pv/emul-priv-op.c xen/arch/x86/traps.c+51 -24 replies
2/14docs/guest-guide: Describe the PV traps and entrypoints ABIdocs/glossary.rst docs/guest-guide/x86/index.rst docs/guest-guide/x86/pv-traps.rst+127 -02 replies
3/14x86/boot: Move gdt_l1e caching out of traps_init()xen/arch/x86/domain.c xen/arch/x86/smpboot.c xen/arch/x86/traps-setup.c+13 -71 reply
4/14x86/boot: Document the ordering dependency of _svm_cpu_up()xen/arch/x86/hvm/svm/svm.c xen/arch/x86/setup.c+17 -14 replies
5/14x86/traps: Move traps_init() earlier on bootxen/arch/x86/cpu/common.c xen/arch/x86/setup.c xen/arch/x86/traps-setup.c+17 -32 replies
6/14x86/traps: Don't configure Supervisor Shadow Stack tokens in FRED modexen/arch/x86/mm.c xen/arch/x86/setup.c+21 -92 replies
7/14x86/traps: Introduce FRED entrypointsxen/arch/x86/include/asm/asm_defns.h xen/arch/x86/traps.c xen/arch/x86/x86_64/Makefile +1 more+252 -00 replies
8/14x86/traps: Enable FRED when requestedxen/arch/x86/include/asm/current.h xen/arch/x86/include/asm/traps.h xen/arch/x86/traps-setup.c+130 -52 replies
9/14x86/pv: Adjust GS handling for FRED modexen/arch/x86/domain.c xen/arch/x86/pv/domain.c xen/arch/x86/pv/emul-priv-op.c +1 more+56 -221 reply
9/14x86/pv: Adjust GS handling for FRED modexen/arch/x86/domain.c xen/arch/x86/pv/domain.c xen/arch/x86/pv/emul-priv-op.c +1 more+63 -241 reply
10/14x86/pv: Guest exception handling in FRED modexen/arch/x86/traps.c xen/arch/x86/x86_64/entry-fred.S xen/arch/x86/x86_64/entry.S+92 -30 replies
11/14x86/pv: ERETU error handlingxen/arch/x86/traps.c xen/arch/x86/x86_64/entry-fred.S+128 -00 replies
12/14x86/pv: System call handling in FRED modexen/arch/x86/include/asm/domain.h xen/arch/x86/include/asm/hypercall.h xen/arch/x86/pv/traps.c +1 more+172 -22 replies
13/14x86: Clamp reserved bits in eflags more aggressivelyxen/arch/x86/domain.c xen/arch/x86/hvm/domain.c xen/arch/x86/include/asm/x86-defns.h +2 more+17 -81 reply
13/14x86: Clamp bits in eflags more aggressivelyxen/arch/x86/domain.c xen/arch/x86/hvm/domain.c xen/arch/x86/include/asm/x86-defns.h +2 more+37 -82 replies
14/14x86/traps: Use fatal_trap() for #UD and #GPxen/arch/x86/traps.c+2 -42 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchJan Beulich
1/14R-b
2/14A-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b R-b
9/14R-b R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
13/14R-b
14/14A-b A-b

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

Read the v4 thread

Cover letter [PATCH v4 00/14] x86: FRED support

This version of the series has finally run on real hardware, Intel PantherLake. Notable changes:

* Rework TSS setup, given an unpleasant discovery about VT-x.
* Fix an INT $N emulation bug in IDT mode, discovered by XTF testing to check that FRED behaved the same.
* Document aspects of the PV ABI now they've been thoroughly reverse engineered.

By the end of patch 6, PVH dom0 works.
By the end of the series, PV dom0 works.

https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2354867216

Andrew Cooper (14):
x86/pv: Don't assume that INT $imm8 instructions are two bytes long docs/guest-guide: Describe the PV traps and entrypoints ABI x86/boot: Move gdt_l1e caching out of traps_init() x86/boot: Document the ordering dependency of _svm_cpu_up() x86/traps: Move traps_init() earlier on boot
x86/traps: Don't configure Supervisor Shadow Stack tokens in FRED mode x86/traps: Introduce FRED entrypoints
x86/traps: Enable FRED when requested
x86/pv: Adjust GS handling for FRED mode
x86/pv: Guest exception handling in FRED mode
x86/pv: ERETU error handling
x86/pv: System call handling in FRED mode
x86: Clamp reserved bits in eflags more aggressively x86/traps: Use fatal_trap() for #UD and #GP

 docs/glossary.rst                    |   3 +
 docs/guest-guide/x86/index.rst       |   1 +
 docs/guest-guide/x86/pv-traps.rst    | 123 +++++++
 xen/arch/x86/cpu/common.c            |   4 +-
 xen/arch/x86/domain.c                |  22 +-
 xen/arch/x86/hvm/domain.c            |   4 +-
 xen/arch/x86/hvm/svm/svm.c           |  16 +
 xen/arch/x86/include/asm/asm_defns.h |  63 ++++
 xen/arch/x86/include/asm/current.h   |   3 +
 xen/arch/x86/include/asm/domain.h    |   2 +
 xen/arch/x86/include/asm/hypercall.h |   2 -
 xen/arch/x86/include/asm/pv/traps.h  |   2 +
 xen/arch/x86/include/asm/traps.h     |   2 +
 xen/arch/x86/include/asm/x86-defns.h |   7 +
 xen/arch/x86/mm.c                    |  14 +-
 xen/arch/x86/pv/dom0_build.c         |   2 +-
 xen/arch/x86/pv/domain.c             |  22 +-
 xen/arch/x86/pv/emul-priv-op.c       |  72 +++-
 xen/arch/x86/pv/iret.c               |   8 +-
 xen/arch/x86/pv/misc-hypercalls.c    |  16 +-
 xen/arch/x86/pv/traps.c              |  39 +++
 xen/arch/x86/setup.c                 |  20 +-
 xen/arch/x86/smpboot.c               |  11 +
 xen/arch/x86/traps-setup.c           | 147 +++++++-
 xen/arch/x86/traps.c                 | 486 ++++++++++++++++++++++++++-
 xen/arch/x86/x86_64/Makefile         |   1 +
 xen/arch/x86/x86_64/entry-fred.S     |  57 ++++
 xen/arch/x86/x86_64/entry.S          |   4 +-
 28 files changed, 1091 insertions(+), 62 deletions(-)
 create mode 100644 docs/guest-guide/x86/pv-traps.rst
 create mode 100644 xen/arch/x86/x86_64/entry-fred.S
Signature · 1 line
2.39.5