thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-pc-Disable-RDTSCP-unconditionally-on-rhel6.-machine-.patch

0a122b
From 26653f89373a3439d6dba73c660d00116c0dbbc0 Mon Sep 17 00:00:00 2001
0a122b
From: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Date: Mon, 27 Jan 2014 16:07:42 +0100
0a122b
Subject: [PATCH 20/22] pc: Disable RDTSCP unconditionally on rhel6.* machine-types
0a122b
0a122b
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Message-id: <1390838863-11030-2-git-send-email-ehabkost@redhat.com>
0a122b
Patchwork-id: 56960
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH 1/2] pc: Disable RDTSCP unconditionally on rhel6.* machine-types
0a122b
Bugzilla: 918907
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
0a122b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
0a122b
Bugzilla: 918907
0a122b
Upstream status: not applicable
0a122b
Brew scratch build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6953316
0a122b
0a122b
The RHEL-6 kernel didn't support exposing RDTSCP at all, so we need to
0a122b
disable RDTSCP on all CPU models.
0a122b
0a122b
The previous rhel6.5.0 compat code wasn't complete, because Opteron_G4
0a122b
and Opteron_G5 were not being changed.
0a122b
0a122b
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
0a122b
---
0a122b
 hw/i386/pc_piix.c | 16 +++-------------
0a122b
 1 file changed, 3 insertions(+), 13 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 hw/i386/pc_piix.c |   16 +++-------------
0a122b
 1 files changed, 3 insertions(+), 13 deletions(-)
0a122b
0a122b
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
0a122b
index 641f3d9..b918f69 100644
0a122b
--- a/hw/i386/pc_piix.c
0a122b
+++ b/hw/i386/pc_piix.c
0a122b
@@ -906,10 +906,9 @@ static void pc_compat_rhel650(QEMUMachineInitArgs *args)
0a122b
              CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR |
0a122b
              CPUID_EXT2_TSC | CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
0a122b
              0);
0a122b
-    x86_cpu_compat_set_features("SandyBridge", FEAT_8000_0001_EDX,
0a122b
-                                0, CPUID_EXT2_RDTSCP);
0a122b
-    x86_cpu_compat_set_features("Haswell", FEAT_8000_0001_EDX,
0a122b
-                                0, CPUID_EXT2_RDTSCP);
0a122b
+
0a122b
+    /* RHEL-6 kernel never supported exposing RDTSCP */
0a122b
+    x86_cpu_compat_set_features(NULL, FEAT_8000_0001_EDX, 0, CPUID_EXT2_RDTSCP);
0a122b
 
0a122b
     x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
0a122b
     x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
0a122b
@@ -917,15 +916,6 @@ static void pc_compat_rhel650(QEMUMachineInitArgs *args)
0a122b
     x86_cpu_compat_set_features("Opteron_G4", FEAT_1_ECX, 0, CPUID_EXT_X2APIC);
0a122b
     x86_cpu_compat_set_features("Opteron_G5", FEAT_1_ECX, 0, CPUID_EXT_X2APIC);
0a122b
 
0a122b
-    x86_cpu_compat_set_features("phenom", FEAT_8000_0001_EDX,
0a122b
-                                0, CPUID_EXT2_RDTSCP);
0a122b
-    x86_cpu_compat_set_features("Opteron_G1", FEAT_8000_0001_EDX,
0a122b
-                                0, CPUID_EXT2_RDTSCP);
0a122b
-    x86_cpu_compat_set_features("Opteron_G2", FEAT_8000_0001_EDX,
0a122b
-                                0, CPUID_EXT2_RDTSCP);
0a122b
-    x86_cpu_compat_set_features("Opteron_G3", FEAT_8000_0001_EDX,
0a122b
-                                0, CPUID_EXT2_RDTSCP);
0a122b
-
0a122b
     /* RHEL-6 had 3dnow & 3dnowext unconditionally disabled on all models */
0a122b
     x86_cpu_compat_set_features(NULL, FEAT_8000_0001_EDX, 0,
0a122b
                                 CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT);
0a122b
-- 
0a122b
1.7.1
0a122b