Blob Blame Raw
From 4806c6609872f4b642da379b7d7e54e9b0f9c09f Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Mon, 16 Sep 2013 20:39:57 +0200
Subject: [PATCH 08/25] pc: RHEL-6 don't have RDTSCP

RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <1379363997-11783-5-git-send-email-ehabkost@redhat.com>
Patchwork-id: 54399
O-Subject: [RHEL7 PATCH 4/4] pc: RHEL-6 don't have RDTSCP
Bugzilla: 918907
RH-Acked-by: Bandan Das <bsd@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

Bugzilla: 918907
Upstream status: not applicable
  (RHEL-6-only quirk that is not going to be included upstream)
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6290888

The phenom and Opteron_G[123] CPU models don't have RDTSCP enabled on
RHEL-6, so we have to explicitly disable it on pc_init_rhel650() to keep
compatibility.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/i386/pc_piix.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/pc_piix.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index eb3a07d..06e9eb8 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -895,6 +895,16 @@ static void pc_init_rhel650(QEMUMachineInitArgs *args)
     x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
     x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
     x86_cpu_compat_set_features("Opteron_G3", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
+
+    x86_cpu_compat_set_features("phenom", FEAT_8000_0001_EDX,
+                                0, CPUID_EXT2_RDTSCP);
+    x86_cpu_compat_set_features("Opteron_G1", FEAT_8000_0001_EDX,
+                                0, CPUID_EXT2_RDTSCP);
+    x86_cpu_compat_set_features("Opteron_G2", FEAT_8000_0001_EDX,
+                                0, CPUID_EXT2_RDTSCP);
+    x86_cpu_compat_set_features("Opteron_G3", FEAT_8000_0001_EDX,
+                                0, CPUID_EXT2_RDTSCP);
+
     pc_init_rhel700(args);
 }
 
-- 
1.7.1