OSDN Git Service

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)
commitab234a260b1f625b26cbefa93ca365b0ae66df33
tree3308ecacbf6f66119fb14707eb506de1ab43e027
parentafd30525a659ac0ae0904f0cb4a2ca75522c3123
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