fc2ddd6b1c
- kvm-memory-prevent-dma-reentracy-issues.patch [bz#1999236] - kvm-async-Add-an-optional-reentrancy-guard-to-the-BH-API.patch [bz#1999236] - kvm-checkpatch-add-qemu_bh_new-aio_bh_new-checks.patch [bz#1999236] - kvm-hw-replace-most-qemu_bh_new-calls-with-qemu_bh_new_g.patch [bz#1999236] - kvm-lsi53c895a-disable-reentrancy-detection-for-script-R.patch [bz#1999236] - kvm-bcm2835_property-disable-reentrancy-detection-for-io.patch [bz#1999236] - kvm-raven-disable-reentrancy-detection-for-iomem.patch [bz#1999236] - kvm-apic-disable-reentrancy-detection-for-apic-msi.patch [bz#1999236] - kvm-async-avoid-use-after-free-on-re-entrancy-guard.patch [bz#1999236] - kvm-memory-stricter-checks-prior-to-unsetting-engaged_in.patch [bz#1999236] - kvm-lsi53c895a-disable-reentrancy-detection-for-MMIO-reg.patch [bz#1999236] - kvm-hw-scsi-lsi53c895a-Fix-reentrancy-issues-in-the-LSI-.patch [bz#1999236] - kvm-target-i386-add-support-for-FLUSH_L1D-feature.patch [bz#2216203] - kvm-target-i386-add-support-for-FB_CLEAR-feature.patch [bz#2216203] - kvm-migration-Disable-postcopy-multifd-migration.patch [bz#2169733] - Resolves: bz#1999236 (CVE-2021-3750 virt:rhel/qemu-kvm: QEMU: hcd-ehci: DMA reentrancy issue leads to use-after-free [rhel-8]) - Resolves: bz#2216203 ([qemu-kvm]VM reports vulnerabilty to mmio_stale_data on patched host with microcode) - Resolves: bz#2169733 (Qemu on destination host crashed if migrate with postcopy and multifd enabled)
73 lines
2.8 KiB
Diff
73 lines
2.8 KiB
Diff
From bf3577c044e51094ca2166e748c8bae360c3f0c2 Mon Sep 17 00:00:00 2001
|
|
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
Date: Wed, 24 May 2023 07:26:04 -0400
|
|
Subject: [PATCH 14/15] target/i386: add support for FB_CLEAR feature
|
|
|
|
RH-Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
RH-MergeRequest: 281: target/i386: add support for FLUSH_L1D feature
|
|
RH-Bugzilla: 2216203
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>
|
|
RH-Commit: [2/2] 8cd4b7366a9898e406ca20c9a28f14ddce855b1e
|
|
|
|
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2216203
|
|
|
|
commit 22e1094ca82d5518c1b69aff3e87c550776ae1eb
|
|
Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
Date: Wed Feb 1 08:57:59 2023 -0500
|
|
|
|
target/i386: add support for FB_CLEAR feature
|
|
|
|
As reported by the Intel's doc:
|
|
"FB_CLEAR: The processor will overwrite fill buffer values as part of
|
|
MD_CLEAR operations with the VERW instruction.
|
|
On these processors, L1D_FLUSH does not overwrite fill buffer values."
|
|
|
|
If this cpu feature is present in host, allow QEMU to choose whether to
|
|
show it to the guest too.
|
|
One disadvantage of not exposing it is that the guest will report
|
|
a non existing vulnerability in
|
|
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
|
|
because the mitigation is present only when the cpu has
|
|
(FLUSH_L1D and MD_CLEAR) or FB_CLEAR
|
|
features enabled.
|
|
|
|
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
Message-Id: <20230201135759.555607-3-eesposit@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
---
|
|
target/i386/cpu.c | 2 +-
|
|
target/i386/cpu.h | 1 +
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
|
index 47da059df6..9d3dcdcc0d 100644
|
|
--- a/target/i386/cpu.c
|
|
+++ b/target/i386/cpu.c
|
|
@@ -981,7 +981,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
|
"ssb-no", "mds-no", "pschange-mc-no", "tsx-ctrl",
|
|
"taa-no", NULL, NULL, NULL,
|
|
NULL, NULL, NULL, NULL,
|
|
- NULL, NULL, NULL, NULL,
|
|
+ NULL, "fb-clear", NULL, NULL,
|
|
NULL, NULL, NULL, NULL,
|
|
NULL, NULL, NULL, NULL,
|
|
NULL, NULL, NULL, NULL,
|
|
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
|
|
index 7cb7cea8ab..9b7d664ee7 100644
|
|
--- a/target/i386/cpu.h
|
|
+++ b/target/i386/cpu.h
|
|
@@ -950,6 +950,7 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureWord w,
|
|
#define MSR_ARCH_CAP_PSCHANGE_MC_NO (1U << 6)
|
|
#define MSR_ARCH_CAP_TSX_CTRL_MSR (1U << 7)
|
|
#define MSR_ARCH_CAP_TAA_NO (1U << 8)
|
|
+#define MSR_ARCH_CAP_FB_CLEAR (1U << 17)
|
|
|
|
#define MSR_CORE_CAP_SPLIT_LOCK_DETECT (1U << 5)
|
|
|
|
--
|
|
2.37.3
|
|
|