Slightly RFC, because patch 2 has some minor structure (ab)use, but the result works alarmingly well. So far, this demonstrates converting two subsystems.
hvm_funcs is the other area of especially low hanging fruit, but IOMMU, vPMU also look like good candidates. Anything which is partially altcall'd already would benefit from being fully altcall'd. Should we consider introducing __ro_after_init right now (as an alias to __read_mostly) as this conversion is touching a lot of ares where true post-init immutability ought to be enforced. Andrew Cooper (4): x86/altcall: Check and optimise altcall targets x86/altcall: Optimise away endbr64 instruction where possible xen/xsm: Use __init_data_cf_clobber for xsm_ops x86/ucode: Use altcall, and __initdata_cf_clobber xen/arch/x86/alternative.c | 60 ++++++++++++++++++++++++++++++++++++ xen/arch/x86/cpu/microcode/amd.c | 2 +- xen/arch/x86/cpu/microcode/core.c | 38 ++++++++++++----------- xen/arch/x86/cpu/microcode/intel.c | 2 +- xen/arch/x86/cpu/microcode/private.h | 2 +- xen/arch/x86/xen.lds.S | 5 +++ xen/include/xen/init.h | 2 ++ xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 2 +- xen/xsm/silo.c | 2 +- 10 files changed, 93 insertions(+), 24 deletions(-) -- 2.11.0