diff options
author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2023-02-01 08:57:58 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-05-18 08:53:50 +0200 |
commit | 0e7e3bf1a552c178924867fa7c2f30ccc8a179e0 (patch) | |
tree | 04bee49fa1230a3f2e31475dc818f7bbb52fcc31 /target/i386/cpu.h | |
parent | d27e7c359330ba7020bdbed7ed2316cb4cf6ffc1 (diff) | |
download | qemu-0e7e3bf1a552c178924867fa7c2f30ccc8a179e0.zip qemu-0e7e3bf1a552c178924867fa7c2f30ccc8a179e0.tar.gz qemu-0e7e3bf1a552c178924867fa7c2f30ccc8a179e0.tar.bz2 |
target/i386: add support for FLUSH_L1D feature
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>
Diffstat (limited to 'target/i386/cpu.h')
-rw-r--r-- | target/i386/cpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 8ade71a..3c6f922 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 */ |