yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-target-i386-Disable-MPX-support-on-named-CPU-models.patch

b38b0f
From defbb3b33db7fcbc9da20c1350ce90a6b5e279bb Mon Sep 17 00:00:00 2001
b38b0f
From: "plai@redhat.com" <plai@redhat.com>
b38b0f
Date: Mon, 1 Jul 2019 16:17:32 +0100
b38b0f
Subject: [PATCH 03/39] target/i386: Disable MPX support on named CPU models
b38b0f
MIME-Version: 1.0
b38b0f
Content-Type: text/plain; charset=UTF-8
b38b0f
Content-Transfer-Encoding: 8bit
b38b0f
b38b0f
RH-Author: plai@redhat.com
b38b0f
Message-id: <1561997854-9646-4-git-send-email-plai@redhat.com>
b38b0f
Patchwork-id: 89333
b38b0f
O-Subject: [RHEL8.1 qemu-kvm PATCH v6 3/5] target/i386: Disable MPX support on named CPU models
b38b0f
Bugzilla: 1629906
b38b0f
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
b38b0f
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
b38b0f
RH-Acked-by: Bandan Das <bsd@redhat.com>
b38b0f
b38b0f
From: Paolo Bonzini <pbonzini@redhat.com>
b38b0f
b38b0f
MPX support is being phased out by Intel; GCC has dropped it, Linux
b38b0f
is also going to do that.  Even though KVM will have special code
b38b0f
to support MPX after the kernel proper stops enabling it in XCR0,
b38b0f
we probably also want to deprecate that in a few years.  As a start,
b38b0f
do not enable it by default for any named CPU model starting with
b38b0f
the 4.0 machine types; this include Skylake, Icelake and Cascadelake.
b38b0f
b38b0f
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
b38b0f
Message-Id: <20181220121100.21554-1-pbonzini@redhat.com>
b38b0f
Reviewed-by:   Wainer dos Santos Moschetta <wainersm@redhat.com>
b38b0f
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
b38b0f
(cherry picked from commit ecb85fe48cacb2f8740186e81f2f38a2e02bd963)
b38b0f
Signed-off-by: Paul Lai <plai@redhat.com>
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
b38b0f
Conflicts:
b38b0f
	hw/i386/pc.c changes to include/hw/i386/pc.h
b38b0f
	target/i386/cpu.c
b38b0f
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 target/i386/cpu.c | 2 +-
b38b0f
 1 file changed, 1 insertion(+), 1 deletion(-)
b38b0f
b38b0f
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
b38b0f
index c4b31eb..094f8a1 100644
b38b0f
--- a/target/i386/cpu.c
b38b0f
+++ b/target/i386/cpu.c
b38b0f
@@ -2512,7 +2512,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
b38b0f
             CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
b38b0f
             CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
b38b0f
             CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
b38b0f
-            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_CLWB |
b38b0f
+            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
b38b0f
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
b38b0f
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
b38b0f
             CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f