On Fri, Nov 20, 2020 at 12:46:21PM +0100, Juergen Gross wrote: > SWAPGS is used only for interrupts coming from user mode or for > returning to user mode. So there is no reason to use the PARAVIRT > framework, as it can easily be replaced by an ALTERNATIVE depending > on X86_FEATURE_XENPV. > > There are several instances using the PV-aware SWAPGS macro in paths > which are never executed in a Xen PV guest. Replace those with the > plain swapgs instruction. For SWAPGS_UNSAFE_STACK the same applies. > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> > Acked-by: Andy Lutomirski <luto@xxxxxxxxxx> > Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> > --- > arch/x86/entry/entry_64.S | 10 +++++----- > arch/x86/include/asm/irqflags.h | 20 ++++++++------------ > arch/x86/include/asm/paravirt.h | 20 -------------------- > arch/x86/include/asm/paravirt_types.h | 2 -- > arch/x86/kernel/asm-offsets_64.c | 1 - > arch/x86/kernel/paravirt.c | 1 - > arch/x86/kernel/paravirt_patch.c | 3 --- > arch/x86/xen/enlighten_pv.c | 3 --- > 8 files changed, 13 insertions(+), 47 deletions(-) I love patches like this one! Give me more... Reviewed-by: Borislav Petkov <bp@xxxxxxx> -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization