[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/68] target/i386: add support for FLUSH_L1D feature
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 01/68] target/i386: add support for FLUSH_L1D feature |
|
Date: |
Wed, 17 May 2023 19:44:13 +0200 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
As reported by Intel's doc:
"L1D_FLUSH: Writeback and invalidate the L1 data cache"
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-2-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 2 +-
target/i386/cpu.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 4187759f106f..e5c813199a0d 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -863,7 +863,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
"tsx-ldtrk", NULL, NULL /* pconfig */, "arch-lbr",
NULL, NULL, "amx-bf16", "avx512-fp16",
"amx-tile", "amx-int8", "spec-ctrl", "stibp",
- NULL, "arch-capabilities", "core-capability", "ssbd",
+ "flush-l1d", "arch-capabilities", "core-capability", "ssbd",
},
.cpuid = {
.eax = 7,
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 8ade71ab555d..3c6f9226e1f1 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -899,6 +899,8 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureWord w,
#define CPUID_7_0_EDX_SPEC_CTRL (1U << 26)
/* Single Thread Indirect Branch Predictors */
#define CPUID_7_0_EDX_STIBP (1U << 27)
+/* Flush L1D cache */
+#define CPUID_7_0_EDX_FLUSH_L1D (1U << 28)
/* Arch Capabilities */
#define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29)
/* Core Capability */
--
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 <=
- [PULL 02/68] target/i386: add support for FB_CLEAR feature, Paolo Bonzini, 2023/05/17
- [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