]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET
authorJim Mattson <jmattson@google.com>
Fri, 13 Sep 2024 17:32:27 +0000 (10:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Oct 2024 13:40:42 +0000 (15:40 +0200)
commit43bdd2ea738eb467a2b55ac65336fc4a59502463
treea81d9dd73b5cee57b20fa4cfb97b6396077879be
parentdad88f266f3009d012eb076a9a76b388218b5086
x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET

commit ff898623af2ed564300752bba83a680a1e4fec8d upstream.

AMD's initial implementation of IBPB did not clear the return address
predictor. Beginning with Zen4, AMD's IBPB *does* clear the return address
predictor. This behavior is enumerated by CPUID.80000008H:EBX.IBPB_RET[30].

Define X86_FEATURE_AMD_IBPB_RET for use in KVM_GET_SUPPORTED_CPUID,
when determining cross-vendor capabilities.

Suggested-by: Venkatesh Srinivas <venkateshs@chromium.org>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/cpufeatures.h