This is now everything to get to tech preview, except for the caveat that it's still not been tried on real hardware yet, so is staying experimental for now.
The first few patches have been seen before but the latter half of the series is new, adding support for running PV guests when Xen is using FRED. Some work here has influenced earlier patches. See patches for details. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2009286102 This series is still based on the MSR cleaup series posted previously. Andrew Cooper (23): x86: FRED enumerations x86/traps: Extend struct cpu_user_regs/cpu_info with FRED fields x86/traps: Introduce opt_fred x86/boot: Adjust CR4 handling around percpu_early_traps_init() x86/S3: Switch to using RSTORSSP to recover SSP on resume x86/traps: Set MSR_PL0_SSP in load_system_tables() x86/boot: Use RSTORSSP to establish SSP x86/traps: Alter switch_stack_and_jump() for FRED mode x86/traps: Skip Supervisor Shadow Stack tokens in FRED mode x86/traps: Make an IDT-specific #DB helper x86/traps: Make an IDT-specific #PF helper x86/fsgsbase: Make gskern accesses safe under FRED x86/traps: Introduce FRED entrypoints x86/traps: Enable FRED when requested x86/pv: Deduplicate is_canonical_address() in do_set_segment_base() x86/entry: Alter how IRET faults are recognised x86/entry: Drop the pre exception table infrastructure x86/entry: Rework the comment about SYSCALL and DF x86/pv: Adjust GS handling for FRED mode x86/pv: Exception handling in FRED mode x86/pv: ERETU error handling x86/pv: System call handling in FRED mode x86/pv: Adjust eflags handling for FRED mode docs/misc/xen-command-line.pandoc | 10 + xen/arch/x86/acpi/wakeup_prot.S | 52 +- xen/arch/x86/boot/x86_64.S | 48 +- xen/arch/x86/domain.c | 26 +- xen/arch/x86/extable.c | 14 - xen/arch/x86/hvm/domain.c | 4 +- xen/arch/x86/include/asm/asm-defns.h | 8 + xen/arch/x86/include/asm/asm_defns.h | 76 ++- xen/arch/x86/include/asm/cpu-user-regs.h | 71 ++- xen/arch/x86/include/asm/cpufeature.h | 3 + xen/arch/x86/include/asm/cpufeatures.h | 2 +- xen/arch/x86/include/asm/current.h | 9 +- xen/arch/x86/include/asm/domain.h | 5 + xen/arch/x86/include/asm/fsgsbase.h | 8 +- xen/arch/x86/include/asm/hypercall.h | 5 + xen/arch/x86/include/asm/msr-index.h | 11 + xen/arch/x86/include/asm/traps.h | 6 + xen/arch/x86/include/asm/uaccess.h | 2 - xen/arch/x86/include/asm/x86-defns.h | 8 + xen/arch/x86/mm.c | 12 +- xen/arch/x86/pv/dom0_build.c | 2 +- xen/arch/x86/pv/domain.c | 22 +- xen/arch/x86/pv/iret.c | 8 +- xen/arch/x86/pv/misc-hypercalls.c | 42 +- xen/arch/x86/pv/traps.c | 33 ++ xen/arch/x86/setup.c | 35 +- xen/arch/x86/traps-setup.c | 127 ++++- xen/arch/x86/traps.c | 511 ++++++++++++++++++-- xen/arch/x86/x86_64/Makefile | 1 + xen/arch/x86/x86_64/compat/entry.S | 3 +- xen/arch/x86/x86_64/entry-fred.S | 57 +++ xen/arch/x86/x86_64/entry.S | 46 +- xen/arch/x86/xen.lds.S | 5 - xen/include/public/arch-x86/cpufeatureset.h | 3 + 34 files changed, 1106 insertions(+), 169 deletions(-) create mode 100644 xen/arch/x86/x86_64/entry-fred.S -- 2.39.5