[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/68] target/i386: add support for FB_CLEAR feature
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 02/68] target/i386: add support for FB_CLEAR feature |
|
Date: |
Wed, 17 May 2023 19:44:14 +0200 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
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>
---
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 e5c813199a0d..a61cd6d99d1f 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1050,7 +1050,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 3c6f9226e1f1..7201a71de863 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1018,6 +1018,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.40.1
- [PULL 00/68] i386, build system, KVM changes for 2023-05-18, Paolo Bonzini, 2023/05/17
- [PULL 03/68] target/i386: fix operand size for VCOMI/VUCOMI instructions, Paolo Bonzini, 2023/05/17
- [PULL 05/68] tests/tcg/i386: correct mask for VPERM2F128/VPERM2I128, Paolo Bonzini, 2023/05/17
- [PULL 01/68] target/i386: add support for FLUSH_L1D feature, Paolo Bonzini, 2023/05/17
- [PULL 02/68] target/i386: add support for FB_CLEAR feature,
Paolo Bonzini <=
- [PULL 06/68] target/i386: Fix and add some comments next to SSE/AVX instructions., Paolo Bonzini, 2023/05/17
- [PULL 08/68] target/i386: Fix exception classes for MOVNTPS/MOVNTPD., Paolo Bonzini, 2023/05/17
- [PULL 09/68] meson: Pass -j option to sphinx, Paolo Bonzini, 2023/05/17
- [PULL 04/68] target/i386: fix avx2 instructions vzeroall and vpermdq, Paolo Bonzini, 2023/05/17
- [PULL 07/68] target/i386: Fix exception classes for SSE/AVX instructions., Paolo Bonzini, 2023/05/17
- [PULL 11/68] kvm: Synchronize the backup bitmap in the last stage, Paolo Bonzini, 2023/05/17
- [PULL 10/68] migration: Add last stage indicator to global dirty log, Paolo Bonzini, 2023/05/17
- [PULL 12/68] kvm: Add helper kvm_dirty_ring_init(), Paolo Bonzini, 2023/05/17
- [PULL 13/68] kvm: Enable dirty ring for arm64, Paolo Bonzini, 2023/05/17
- [PULL 16/68] scsi-generic: fix buffer overflow on block limits inquiry, Paolo Bonzini, 2023/05/17