x86/process: Move the buffer clearing before MONITOR
authorBorislav Petkov (AMD) <bp@alien8.de>
Mon, 14 Apr 2025 13:33:19 +0000 (15:33 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 17 Jun 2025 15:17:12 +0000 (17:17 +0200)
commit8e786a85c0a3c0fffae6244733fb576eeabd9dec
tree9c781839ad342e157273f59bc468f13d3a5fd614
parent2329f250e04d3b8e78b36a68b9880ca7750a07ef
x86/process: Move the buffer clearing before MONITOR

Move the VERW clearing before the MONITOR so that VERW doesn't disarm it
and the machine never enters C1.

Original idea by Kim Phillips <kim.phillips@amd.com>.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
arch/x86/include/asm/mwait.h
arch/x86/kernel/process.c