From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Cc: Igor Mammedov <imammedo@redhat.com>, Gleb Natapov <gleb@redhat.com>
Subject: [Qemu-devel] [PATCH qom-cpu 3/3] target-i386: set level=4 on Conroe/Penryn/Nehalem
Date: Mon, 27 May 2013 17:23:55 -0300 [thread overview]
Message-ID: <1369686235-11090-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1369686235-11090-1-git-send-email-ehabkost@redhat.com>
The CPUID level value on Conroe, Penryn, and Nehalem are too low. This
causes at least one known problem: the -smp "threads" option doesn't
work as expect if level is < 4, because thread count information is
provided to the guest on CPUID[EAX=4,ECX=2].EAX
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Testing: those level values have been in use on Red Hat Enterprise Linux
since version 6.0 (released in 2010). The fix wasn't submitted to QEMU
earlier because we didn't have a good mechanism and clear procedure to
update CPUID values of existing CPU models in QEMU.
---
include/hw/i386/pc.h | 12 ++++++++++++
target-i386/cpu.c | 6 +++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 8883b37..4351f39 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -188,13 +188,25 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
.property = "model",\
.value = stringify(2),\
},{\
+ .driver = "Conroe-" TYPE_X86_CPU,\
+ .property = "level",\
+ .value = stringify(2),\
+ },{\
.driver = "Penryn-" TYPE_X86_CPU,\
.property = "model",\
.value = stringify(2),\
},{\
+ .driver = "Penryn-" TYPE_X86_CPU,\
+ .property = "level",\
+ .value = stringify(2),\
+ },{\
.driver = "Nehalem-" TYPE_X86_CPU,\
.property = "model",\
.value = stringify(2),\
+ },{\
+ .driver = "Nehalem-" TYPE_X86_CPU,\
+ .property = "level",\
+ .value = stringify(2),\
}
#define PC_COMPAT_1_4 \
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 6b48562..762baad 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -669,7 +669,7 @@ static x86_def_t builtin_x86_defs[] = {
},
{
.name = "Conroe",
- .level = 2,
+ .level = 4,
.vendor = CPUID_VENDOR_INTEL,
.family = 6,
.model = 15,
@@ -691,7 +691,7 @@ static x86_def_t builtin_x86_defs[] = {
},
{
.name = "Penryn",
- .level = 2,
+ .level = 4,
.vendor = CPUID_VENDOR_INTEL,
.family = 6,
.model = 23,
@@ -714,7 +714,7 @@ static x86_def_t builtin_x86_defs[] = {
},
{
.name = "Nehalem",
- .level = 2,
+ .level = 4,
.vendor = CPUID_VENDOR_INTEL,
.family = 6,
.model = 26,
--
1.8.1.4
next prev parent reply other threads:[~2013-05-27 20:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 20:23 [Qemu-devel] [PATCH qom-cpu 0/3] Conroe/Penryn/Nehalem CPUID family/level fixes Eduardo Habkost
2013-05-27 20:23 ` [Qemu-devel] [PATCH qom-cpu 1/3] pc: create pc-*-1.6 machine-types Eduardo Habkost
2013-05-27 20:23 ` [Qemu-devel] [PATCH qom-cpu 2/3] target-i386: update model values on Conroe/Penryn/Nehalem CPU models Eduardo Habkost
2013-05-27 20:23 ` Eduardo Habkost [this message]
2013-05-27 20:30 ` [Qemu-devel] [PATCH qom-cpu 0/3] Conroe/Penryn/Nehalem CPUID family/level fixes Andreas Färber
2013-05-28 9:31 ` Igor Mammedov
2013-05-30 16:17 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369686235-11090-4-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=afaerber@suse.de \
--cc=gleb@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).