|
|
9ae3a8 |
From 9baf8dbaac5707b25f9126a5ba06716efe6793d5 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 17 Oct 2013 10:38:42 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 05/25] target-i386: Set model=6 on qemu64 & qemu32 CPU models
|
|
|
9ae3a8 |
MIME-Version: 1.0
|
|
|
9ae3a8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
9ae3a8 |
Content-Transfer-Encoding: 8bit
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1379363997-11783-2-git-send-email-ehabkost@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 54398
|
|
|
9ae3a8 |
O-Subject: [RHEL7 PATCH 1/4] target-i386: Set model=6 on qemu64 & qemu32 CPU models
|
|
|
9ae3a8 |
Bugzilla: 1004290
|
|
|
9ae3a8 |
RH-Acked-by: Bandan Das <bsd@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Bugzilla: 1004290
|
|
|
9ae3a8 |
Upstream status: commit f8e6a11aecc96e9d8a84f17d7c07019471714e20.
|
|
|
9ae3a8 |
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6290888
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
There's no Intel CPU with family=6,model=2, and Linux and Windows guests
|
|
|
9ae3a8 |
disable SEP when seeing that combination due to Pentium Pro erratum #82.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
In addition to just having SEP ignored by guests, Skype (and maybe other
|
|
|
9ae3a8 |
applications) runs sysenter directly without passing through ntdll on
|
|
|
9ae3a8 |
Windows, and crashes because Windows ignored the SEP CPUID bit.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
So, having model > 2 is a better default on qemu64 and qemu32 for two
|
|
|
9ae3a8 |
reasons: making SEP really available for guests, and avoiding crashing
|
|
|
9ae3a8 |
applications that work on bare metal.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
model=3 would fix the problem, but it causes CPU enumeration problems
|
|
|
9ae3a8 |
for Windows guests[1]. So let's set model=6, that matches "Athlon
|
|
|
9ae3a8 |
(PM core)" on AMD and "P2 with on-die L2 cache" on Intel and it allows
|
|
|
9ae3a8 |
Windows to use all CPUs as well as fixing sysenter.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
[1] https://bugzilla.redhat.com/show_bug.cgi?id=508623
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Cc: Andrea Arcangeli <aarcange@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
|
|
9ae3a8 |
(cherry picked from commit 5cb6eb263d92972b54f84e0acf75e7159de20498)
|
|
|
9ae3a8 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Conflicts:
|
|
|
9ae3a8 |
include/hw/i386/pc.h
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Backport notes:
|
|
|
9ae3a8 |
* PC_COMPAT_1_6 does not exist on the RHEL-7 tree
|
|
|
9ae3a8 |
* RHEL-6 already have model=6 on qemu64 since RHEL-6.0, but not on
|
|
|
9ae3a8 |
qemu32, so PC_RHEL6_5_COMPAT includes only the qemu32 compat change
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Maintainer's notes:
|
|
|
9ae3a8 |
* Cherry-picked from Andreas Färber's qom-cpu tree
|
|
|
9ae3a8 |
* Upstream status valid for qemu tree
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/pc_piix.c | 4 ++++
|
|
|
9ae3a8 |
target-i386/cpu.c | 4 ++--
|
|
|
9ae3a8 |
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/pc_piix.c | 4 ++++
|
|
|
9ae3a8 |
target-i386/cpu.c | 4 ++--
|
|
|
9ae3a8 |
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
|
|
|
9ae3a8 |
index a19f155..39be127 100644
|
|
|
9ae3a8 |
--- a/hw/i386/pc_piix.c
|
|
|
9ae3a8 |
+++ b/hw/i386/pc_piix.c
|
|
|
9ae3a8 |
@@ -861,6 +861,10 @@ static QEMUMachine pc_machine_rhel700 = {
|
|
|
9ae3a8 |
.property = "level",\
|
|
|
9ae3a8 |
.value = stringify(0),\
|
|
|
9ae3a8 |
},{\
|
|
|
9ae3a8 |
+ .driver = "qemu32-" TYPE_X86_CPU,\
|
|
|
9ae3a8 |
+ .property = "model",\
|
|
|
9ae3a8 |
+ .value = stringify(3),\
|
|
|
9ae3a8 |
+ },{\
|
|
|
9ae3a8 |
.driver = "usb-ccid",\
|
|
|
9ae3a8 |
.property = "serial",\
|
|
|
9ae3a8 |
.value = "1",\
|
|
|
9ae3a8 |
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
|
|
|
9ae3a8 |
index a0358c0..170a46c 100644
|
|
|
9ae3a8 |
--- a/target-i386/cpu.c
|
|
|
9ae3a8 |
+++ b/target-i386/cpu.c
|
|
|
9ae3a8 |
@@ -434,7 +434,7 @@ static x86_def_t builtin_x86_defs[] = {
|
|
|
9ae3a8 |
.level = 4,
|
|
|
9ae3a8 |
.vendor = CPUID_VENDOR_AMD,
|
|
|
9ae3a8 |
.family = 6,
|
|
|
9ae3a8 |
- .model = 2,
|
|
|
9ae3a8 |
+ .model = 6,
|
|
|
9ae3a8 |
.stepping = 3,
|
|
|
9ae3a8 |
.features[FEAT_1_EDX] =
|
|
|
9ae3a8 |
PPRO_FEATURES |
|
|
|
9ae3a8 |
@@ -537,7 +537,7 @@ static x86_def_t builtin_x86_defs[] = {
|
|
|
9ae3a8 |
.level = 4,
|
|
|
9ae3a8 |
.vendor = CPUID_VENDOR_INTEL,
|
|
|
9ae3a8 |
.family = 6,
|
|
|
9ae3a8 |
- .model = 3,
|
|
|
9ae3a8 |
+ .model = 6,
|
|
|
9ae3a8 |
.stepping = 3,
|
|
|
9ae3a8 |
.features[FEAT_1_EDX] =
|
|
|
9ae3a8 |
PPRO_FEATURES,
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|