]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/process: Move the buffer clearing before MONITOR
authorBorislav Petkov <bp@kernel.org>
Tue, 15 Jul 2025 12:37:49 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:28:01 +0000 (18:28 +0200)
commita8a08f1e519b4fd08adce08ebfa1763950be5d99
treee51bd19a42a4d53d7ad9e8c5e2d99b9da8018863
parent6fea1a4e150f1fe3726310558f33a30e0c209153
x86/process: Move the buffer clearing before MONITOR

From: "Borislav Petkov (AMD)" <bp@alien8.de>

Commit 8e786a85c0a3c0fffae6244733fb576eeabd9dec upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/mwait.h
arch/x86/kernel/process.c