From: Matthias Maier Date: Fri, 17 May 2019 08:37:09 +0000 (-0500) Subject: app-emulation/qemu: apply full mds patches X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4640ee91f01da20bcca0e7a422c1ccb694d8b833;p=gentoo.git app-emulation/qemu: apply full mds patches Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Matthias Maier --- diff --git a/app-emulation/qemu/files/qemu-3.1.0-md-clear-md-no.patch b/app-emulation/qemu/files/qemu-3.1.0-md-clear-md-no.patch index 1027b9c8762c..a7b3e8cb8f20 100644 --- a/app-emulation/qemu/files/qemu-3.1.0-md-clear-md-no.patch +++ b/app-emulation/qemu/files/qemu-3.1.0-md-clear-md-no.patch @@ -33,6 +33,29 @@ index d6bb57d2..331a364a 100644 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, --- -2.21.0 - +diff --git a/target/i386/cpu.h b/target/i386/cpu.h +index 83fb5225..d0bab4d7 100644 +--- a/target/i386/cpu.h ++++ b/target/i386/cpu.h +@@ -694,6 +694,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS]; + + #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */ + #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */ ++#define CPUID_7_0_EDX_MD_CLEAR (1U << 10) /* Microarchitectural Data Clear */ + #define CPUID_7_0_EDX_SPEC_CTRL (1U << 26) /* Speculation Control */ + #define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29) /*Arch Capabilities*/ + #define CPUID_7_0_EDX_SPEC_CTRL_SSBD (1U << 31) /* Speculative Store Bypass Disable */ +diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c +index 4d957fe8..b453552f 100644 +--- a/target/i386/hvf/x86_cpuid.c ++++ b/target/i386/hvf/x86_cpuid.c +@@ -90,7 +90,8 @@ uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, + } + + ecx &= CPUID_7_0_ECX_AVX512BMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ; +- edx &= CPUID_7_0_EDX_AVX512_4VNNIW | CPUID_7_0_EDX_AVX512_4FMAPS; ++ edx &= CPUID_7_0_EDX_AVX512_4VNNIW | CPUID_7_0_EDX_AVX512_4FMAPS | \ ++ CPUID_7_0_EDX_MD_CLEAR; + } else { + ebx = 0; + ecx = 0; diff --git a/app-emulation/qemu/qemu-4.0.0-r1.ebuild b/app-emulation/qemu/qemu-4.0.0-r2.ebuild similarity index 100% rename from app-emulation/qemu/qemu-4.0.0-r1.ebuild rename to app-emulation/qemu/qemu-4.0.0-r2.ebuild