x86/lib/memmove: Decouple ERMS from FSRM
authorBorislav Petkov (AMD) <bp@alien8.de>
Sun, 26 Feb 2023 20:04:26 +0000 (21:04 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 10 May 2023 12:51:56 +0000 (14:51 +0200)
commit14e4ec9c3e9164c6719f98d8a3065c487be2aaa5
tree4b58b5390fb1578caf2a3031efa9b39caccb41b8
parent270a69c4485d7d07516d058bcc0473c90ee22185
x86/lib/memmove: Decouple ERMS from FSRM

Up until now it was perceived that FSRM is an improvement to ERMS and
thus it was made dependent on latter.

However, there are AMD BIOSes out there which allow for disabling of
either features and thus preventing kernels from booting due to the CMP
disappearing and thus breaking the logic in the memmove() function.

Similar observation happens on some VM migration scenarios.

Patch the proper sequences depending on which feature is enabled.

Reported-by: Daniel Verkamp <dverkamp@chromium.org>
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/Y/yK0dyzI0MMdTie@zn.tnic
arch/x86/lib/memmove_64.S