]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/extra/0032-i386-Add-spec-ctrl-CPUID-bit.patch
254d17a2f83accf2c0d0e66da9b63a7723ae7850
[pve-qemu.git] / debian / patches / extra / 0032-i386-Add-spec-ctrl-CPUID-bit.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@redhat.com>
3 Date: Tue, 9 Jan 2018 13:45:15 -0200
4 Subject: [PATCH] i386: Add spec-ctrl CPUID bit
5
6 Add the feature name and a CPUID_7_0_EDX_SPEC_CTRL macro.
7
8 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
9 ---
10 target/i386/cpu.c | 2 +-
11 target/i386/cpu.h | 1 +
12 2 files changed, 2 insertions(+), 1 deletion(-)
13
14 diff --git a/target/i386/cpu.c b/target/i386/cpu.c
15 index c673521016..faf1ff6dcc 100644
16 --- a/target/i386/cpu.c
17 +++ b/target/i386/cpu.c
18 @@ -460,7 +460,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
19 NULL, NULL, NULL, NULL,
20 NULL, NULL, NULL, NULL,
21 NULL, NULL, NULL, NULL,
22 - NULL, NULL, NULL, NULL,
23 + NULL, NULL, "spec-ctrl", NULL,
24 NULL, NULL, NULL, NULL,
25 },
26 .cpuid_eax = 7,
27 diff --git a/target/i386/cpu.h b/target/i386/cpu.h
28 index cc322d6b39..71261f4819 100644
29 --- a/target/i386/cpu.h
30 +++ b/target/i386/cpu.h
31 @@ -640,6 +640,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
32
33 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
34 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
35 +#define CPUID_7_0_EDX_SPEC_CTRL (1U << 26) /* Speculation Control */
36
37 #define CPUID_XSAVE_XSAVEOPT (1U << 0)
38 #define CPUID_XSAVE_XSAVEC (1U << 1)
39 --
40 2.11.0
41