[GIT PULL] x86/alternatives for v5.13

From: Borislav Petkov
Date: Mon Apr 26 2021 - 05:38:40 EST


Hi Linus,

please pull the nice paravirt cleanup by Jürgen for v5.13.

Thx.

---

The following changes since commit a38fd8748464831584a19438cbb3082b5a2dab15:

Linux 5.12-rc2 (2021-03-05 17:33:41 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/x86_alternatives_for_v5.13

for you to fetch changes up to 054ac8ad5ebe4a69e1f0e842483821ddbe560121:

x86/paravirt: Have only one paravirt patch function (2021-03-11 20:11:09 +0100)

----------------------------------------------------------------
First big cleanup to the paravirt infra to use alternatives and thus
eliminate custom code patching. For that, the alternatives infra is
extended to accomodate paravirt's needs and, as a result, a lot of
paravirt patching code goes away, leading to a sizeable cleanup and
simplification. Work by Juergen Gross.

----------------------------------------------------------------
Juergen Gross (15):
x86/alternative: Drop unused feature parameter from ALTINSTR_REPLACEMENT()
x86/alternative: Merge include files
static_call: Move struct static_call_key definition to static_call_types.h
static_call: Add function to query current function
x86/paravirt: Switch time pvops functions to use static_call()
x86/alternative: Support not-feature
x86/alternative: Support ALTERNATIVE_TERNARY
x86/alternative: Use ALTERNATIVE_TERNARY() in _static_cpu_has()
x86/paravirt: Add new features for paravirt patching
x86/paravirt: Remove no longer needed 32-bit pvops cruft
x86/paravirt: Simplify paravirt macros
x86/paravirt: Switch iret pvops to ALTERNATIVE
x86/paravirt: Add new PVOP_ALT* macros to support pvops in ALTERNATIVEs
x86/paravirt: Switch functions with custom code to ALTERNATIVE
x86/paravirt: Have only one paravirt patch function

arch/arm/include/asm/paravirt.h | 14 +--
arch/arm/kernel/paravirt.c | 9 +-
arch/arm64/include/asm/paravirt.h | 14 +--
arch/arm64/kernel/paravirt.c | 13 +-
arch/x86/Kconfig | 1 +
arch/x86/entry/entry_32.S | 6 +-
arch/x86/entry/entry_64.S | 2 +-
arch/x86/entry/vdso/vdso32/system_call.S | 2 +-
arch/x86/include/asm/alternative-asm.h | 114 -----------------
arch/x86/include/asm/alternative.h | 142 +++++++++++++++++++--
arch/x86/include/asm/cpufeature.h | 41 ++----
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/irqflags.h | 7 +-
arch/x86/include/asm/mshyperv.h | 2 +-
arch/x86/include/asm/nospec-branch.h | 1 -
arch/x86/include/asm/paravirt.h | 167 +++++++++++-------------
arch/x86/include/asm/paravirt_types.h | 210 ++++++++++++-------------------
arch/x86/include/asm/smap.h | 5 +-
arch/x86/kernel/Makefile | 3 +-
arch/x86/kernel/alternative.c | 52 ++++++--
arch/x86/kernel/asm-offsets.c | 7 --
arch/x86/kernel/cpu/vmware.c | 5 +-
arch/x86/kernel/kvm.c | 2 +-
arch/x86/kernel/kvmclock.c | 2 +-
arch/x86/kernel/paravirt-spinlocks.c | 9 ++
arch/x86/kernel/paravirt.c | 75 +++--------
arch/x86/kernel/paravirt_patch.c | 99 ---------------
arch/x86/kernel/tsc.c | 3 +-
arch/x86/lib/atomic64_386_32.S | 2 +-
arch/x86/lib/atomic64_cx8_32.S | 2 +-
arch/x86/lib/copy_page_64.S | 2 +-
arch/x86/lib/copy_user_64.S | 2 +-
arch/x86/lib/memcpy_64.S | 2 +-
arch/x86/lib/memmove_64.S | 2 +-
arch/x86/lib/memset_64.S | 2 +-
arch/x86/lib/retpoline.S | 2 +-
arch/x86/xen/enlighten_pv.c | 4 +-
arch/x86/xen/time.c | 26 ++--
drivers/xen/time.c | 3 +-
include/linux/static_call.h | 26 ++--
include/linux/static_call_types.h | 18 +++
tools/include/linux/static_call_types.h | 18 +++
42 files changed, 482 insertions(+), 638 deletions(-)
delete mode 100644 arch/x86/include/asm/alternative-asm.h
delete mode 100644 arch/x86/kernel/paravirt_patch.c

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg