[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210308122844.30488-1-jgross@suse.com>
Date: Mon, 8 Mar 2021 13:28:32 +0100
From: Juergen Gross <jgross@...e.com>
To: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
x86@...nel.org, virtualization@...ts.linux-foundation.org,
linux-arm-kernel@...ts.infradead.org, linux-hyperv@...r.kernel.org,
kvm@...r.kernel.org, clang-built-linux@...glegroups.com
Cc: Juergen Gross <jgross@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jason Baron <jbaron@...mai.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ard Biesheuvel <ardb@...nel.org>, Deep Shah <sdeep@...are.com>,
"VMware, Inc." <pv-drivers@...are.com>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: [PATCH v5 00/12] x86: major paravirt cleanup
This is a major cleanup of the paravirt infrastructure aiming at
eliminating all custom code patching via paravirt patching.
This is achieved by using ALTERNATIVE instead, leading to the ability
to give objtool access to the patched in instructions.
In order to remove most of the 32-bit special handling from pvops the
time related operations are switched to use static_call() instead.
At the end of this series all paravirt patching has to do is to
replace indirect calls with direct ones. In a further step this could
be switched to static_call(), too.
Changes in V5:
- patches 1-5 of V4 dropped, as already applied
- new patches 1+3
- fixed patch 2
- split V4 patch 8 into patches 4+5
- use flag byte instead of negative feature bit for "not feature"
Changes in V4:
- fixed several build failures
- removed objtool patch, as objtool patches are in tip now
- added patch 1 for making usage of static_call easier
- even more cleanup
Changes in V3:
- added patches 7 and 12
- addressed all comments
Changes in V2:
- added patches 5-12
Juergen Gross (12):
staticcall: move struct static_call_key definition to
static_call_types.h
x86/paravirt: switch time pvops functions to use static_call()
x86/alternative: drop feature parameter from ALTINSTR_REPLACEMENT()
x86/alternative: support not-feature
x86/alternative: support ALTERNATIVE_TERNARY
x86: 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 macros PVOP_ALT* supporting 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 | 4 +-
arch/x86/entry/entry_64.S | 2 +-
arch/x86/include/asm/alternative-asm.h | 10 +
arch/x86/include/asm/alternative.h | 28 ++-
arch/x86/include/asm/cpufeature.h | 2 +
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/paravirt.h | 167 +++++++-------
arch/x86/include/asm/paravirt_types.h | 210 +++++++-----------
arch/x86/kernel/Makefile | 3 +-
arch/x86/kernel/alternative.c | 37 ++-
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 | 78 ++-----
arch/x86/kernel/paravirt_patch.c | 99 ---------
arch/x86/kernel/tsc.c | 2 +-
arch/x86/xen/enlighten_pv.c | 4 +-
arch/x86/xen/time.c | 11 +-
drivers/xen/time.c | 3 +-
include/linux/static_call.h | 18 --
include/linux/static_call_types.h | 18 ++
tools/include/linux/static_call_types.h | 18 ++
tools/objtool/arch/x86/include/arch/special.h | 6 +-
32 files changed, 339 insertions(+), 468 deletions(-)
delete mode 100644 arch/x86/kernel/paravirt_patch.c
--
2.26.2
Powered by blists - more mailing lists