x86/sev: Make the VMPL0 checking more straight forward
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 24 Apr 2024 15:57:59 +0000 (10:57 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 25 Apr 2024 14:14:25 +0000 (16:14 +0200)
commite2f4c8c319abd1afbedb7a31877cb569265db1b4
tree14682b2de2c8dd4519c1ecaafbb583cc21df4e5a
parent88ed43d32beb1ef3c06164c52b1c6ced47b5988b
x86/sev: Make the VMPL0 checking more straight forward

Currently, the enforce_vmpl0() function uses a set argument when modifying
the VMPL1 permissions used to test for VMPL0. If the guest is not running
at VMPL0, the guest self-terminates.

The function is just a wrapper for a fixed RMPADJUST function. Eliminate
the function and perform the RMPADJUST directly.

No functional change.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/ed01ddf04bfb475596b24b634fd26cffaa85173a.1713974291.git.thomas.lendacky@amd.com
arch/x86/boot/compressed/sev.c