From 59f0354c06b2bf7fa005a4e7bd1d8df2801a4c67 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Tue, 19 Aug 2014 18:52:37 +0200
Subject: [PATCH 22/24] pc: RHEL-6 CPUID compat code for Broadwell CPU model
Message-id: <20140819185237.GA26538@thinpad.lan.raisama.net>
Patchwork-id: 60631
O-Subject: [RHEV-7.1 qemu-kvm-rhev PATCH] pc: RHEL-6 CPUID compat code for Broadwell CPU model
Bugzilla: 1111351
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
Bugzilla: 1111351
Brew scratch build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7858629
On RHEL-6, the Broadwell CPU model don't have the RDTSCP and SMAP
features. Add compatibility code to ensure we stay compatible when
migrating from RHEL-6.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 4 ++++
1 file changed, 4 insertions(+)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
hw/i386/pc_piix.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 37ed4ef..38018f6 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1122,6 +1122,10 @@ static void pc_compat_rhel650(MachineState *machine)
CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR |
CPUID_EXT2_TSC | CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
0);
+ x86_cpu_compat_set_features("Broadwell", FEAT_8000_0001_EDX,
+ 0, CPUID_EXT2_RDTSCP);
+ x86_cpu_compat_set_features("Broadwell", FEAT_7_0_EBX,
+ 0, CPUID_7_0_EBX_SMAP);
/* RHEL-6 kernel never supported exposing RDTSCP */
x86_cpu_compat_set_features(NULL, FEAT_8000_0001_EDX, 0, CPUID_EXT2_RDTSCP);
--
1.7.1