]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM/x86: Export RFDS_NO and RFDS_CLEAR to guests
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Mon, 11 Mar 2024 19:29:43 +0000 (12:29 -0700)
committerSasha Levin <sashal@kernel.org>
Fri, 15 Mar 2024 14:48:13 +0000 (10:48 -0400)
commit328607cf9e1fcbbc3f5521391d601306f72a5890
tree4cc982b303bf0c88d3a57ed9481a7d1f3a48aa1f
parentfe5f4d14cdad934c5c92080cebd5b18189bf4ac9
KVM/x86: Export RFDS_NO and RFDS_CLEAR to guests

commit 2a0180129d726a4b953232175857d442651b55a0 upstream.

Mitigation for RFDS requires RFDS_CLEAR capability which is enumerated
by MSR_IA32_ARCH_CAPABILITIES bit 27. If the host has it set, export it
to guests so that they can deploy the mitigation.

RFDS_NO indicates that the system is not vulnerable to RFDS, export it
to guests so that they don't deploy the mitigation unnecessarily. When
the host is not affected by X86_BUG_RFDS, but has RFDS_NO=0, synthesize
RFDS_NO to the guest.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c