x86/pv: Rework arch_local_irq_restore() to not use popf
authorJuergen Gross <jgross@suse.com>
Wed, 20 Jan 2021 13:55:46 +0000 (14:55 +0100)
committerBorislav Petkov <bp@suse.de>
Wed, 10 Feb 2021 11:36:45 +0000 (12:36 +0100)
commit07d9137ec28074636a949b4931a6cf9ff5390bbc
tree3308ecacbf6f66119fb14707eb506de1ab43e027
parent7456c9888e8d32c30427df2071caa2fc817598d9
x86/pv: Rework arch_local_irq_restore() to not use popf

POPF is a rather expensive operation, so don't use it for restoring
irq flags. Instead, test whether interrupts are enabled in the flags
parameter and enable interrupts via STI in that case.

This results in the restore_fl paravirt op to be no longer needed.

Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210120135555.32594-7-jgross@suse.com
arch/x86/include/asm/irqflags.h
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/kernel/irqflags.S
arch/x86/kernel/paravirt.c
arch/x86/kernel/paravirt_patch.c
arch/x86/xen/enlighten_pv.c
arch/x86/xen/irq.c
arch/x86/xen/xen-asm.S
arch/x86/xen/xen-ops.h