diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:45:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:46:21 +0000 |
commit | e92289a74ff5bfa20aa24af8fa0e2ce82e8f7aed (patch) | |
tree | 5cd7e7e7f8a89cd3b82cdb2a65f8fc75f48cd052 /debian/patches/bugfix/x86/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch | |
parent | Releasing progress-linux version 6.7.9-1~progress7.99u1. (diff) | |
download | linux-e92289a74ff5bfa20aa24af8fa0e2ce82e8f7aed.tar.xz linux-e92289a74ff5bfa20aa24af8fa0e2ce82e8f7aed.zip |
Merging debian version 6.7.9-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/bugfix/x86/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch')
-rw-r--r-- | debian/patches/bugfix/x86/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/bugfix/x86/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch b/debian/patches/bugfix/x86/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch new file mode 100644 index 0000000000..13a5c96a49 --- /dev/null +++ b/debian/patches/bugfix/x86/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch @@ -0,0 +1,48 @@ +From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> +Date: Mon, 11 Mar 2024 12:29:43 -0700 +Subject: KVM/x86: Export RFDS_NO and RFDS_CLEAR to guests +Origin: https://git.kernel.org/linus/2a0180129d726a4b953232175857d442651b55a0 + +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> +--- + arch/x86/kvm/x86.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c +index 48a61d283406..68fdf3ba031a 100644 +--- a/arch/x86/kvm/x86.c ++++ b/arch/x86/kvm/x86.c +@@ -1623,7 +1623,8 @@ static bool kvm_is_immutable_feature_msr(u32 msr) + ARCH_CAP_SKIP_VMENTRY_L1DFLUSH | ARCH_CAP_SSB_NO | ARCH_CAP_MDS_NO | \ + ARCH_CAP_PSCHANGE_MC_NO | ARCH_CAP_TSX_CTRL_MSR | ARCH_CAP_TAA_NO | \ + ARCH_CAP_SBDR_SSDP_NO | ARCH_CAP_FBSDP_NO | ARCH_CAP_PSDP_NO | \ +- ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO) ++ ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO | \ ++ ARCH_CAP_RFDS_NO | ARCH_CAP_RFDS_CLEAR) + + static u64 kvm_get_arch_capabilities(void) + { +@@ -1655,6 +1656,8 @@ static u64 kvm_get_arch_capabilities(void) + data |= ARCH_CAP_SSB_NO; + if (!boot_cpu_has_bug(X86_BUG_MDS)) + data |= ARCH_CAP_MDS_NO; ++ if (!boot_cpu_has_bug(X86_BUG_RFDS)) ++ data |= ARCH_CAP_RFDS_NO; + + if (!boot_cpu_has(X86_FEATURE_RTM)) { + /* +-- +2.43.0 + |