Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 471ee483 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Ingo Molnar
Browse files

x86/entry/64: Use POP instead of MOV to restore regs on NMI return



This gets rid of the last user of the old RESTORE_..._REGS infrastructure.

Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/652a260f17a160789bc6a41d997f98249b73e2ab.1509609304.git.luto@kernel.org


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent a5122106
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -1559,11 +1559,14 @@ end_repeat_nmi:
nmi_swapgs:
nmi_swapgs:
	SWAPGS_UNSAFE_STACK
	SWAPGS_UNSAFE_STACK
nmi_restore:
nmi_restore:
	RESTORE_EXTRA_REGS
	POP_EXTRA_REGS
	RESTORE_C_REGS
	POP_C_REGS


	/* Point RSP at the "iret" frame. */
	/*
	REMOVE_PT_GPREGS_FROM_STACK 6*8
	 * Skip orig_ax and the "outermost" frame to point RSP at the "iret"
	 * at the "iret" frame.
	 */
	addq	$6*8, %rsp


	/*
	/*
	 * Clear "NMI executing".  Set DF first so that we can easily
	 * Clear "NMI executing".  Set DF first so that we can easily