From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, imammedo@redhat.com, ehabkost@redhat.com,
anthony@codemonkey.ws, "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [RFC qom-cpu v2 2/2] target-i386: Turn Haswell into subclass of SandyBridge
Date: Mon, 10 Dec 2012 23:59:32 +0100 [thread overview]
Message-ID: <1355180372-6525-3-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1355180372-6525-1-git-send-email-afaerber@suse.de>
ehabkost: "When adding the Haswell CPU model, I intended to make it
a superset of the features present on the SandyBridge model"
Inherit from SandyBridge to keep only the delta for Haswell.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/cpu.c | 24 ++----------------------
1 Datei geändert, 2 Zeilen hinzugefügt(+), 22 Zeilen entfernt(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index c59c6a5..ffd160a 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -814,39 +814,19 @@ static void haswell_cpu_class_init(ObjectClass *oc, void *data)
{
X86CPUClass *xcc = X86_CPU_CLASS(oc);
- xcc->level = 0xd;
- xcc->vendor1 = CPUID_VENDOR_INTEL_1;
- xcc->vendor2 = CPUID_VENDOR_INTEL_2;
- xcc->vendor3 = CPUID_VENDOR_INTEL_3;
- xcc->family = 6;
xcc->model = 60;
- xcc->stepping = 1;
- xcc->features = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX |
- CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA |
- CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 |
- CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE |
- CPUID_DE | CPUID_FP87;
- xcc->ext_features = CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES |
- CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 |
- CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 |
- CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 |
- CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE |
- CPUID_EXT_PCID;
- xcc->ext2_features = CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_NX |
- CPUID_EXT2_SYSCALL;
- xcc->ext3_features = CPUID_EXT3_LAHF_LM;
+ xcc->ext_features |= CPUID_EXT_FMA | CPUID_EXT_MOVBE | CPUID_EXT_PCID;
xcc->cpuid_7_0_ebx_features = CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
CPUID_7_0_EBX_RTM;
- xcc->xlevel = 0x8000000A;
pstrcpy(xcc->model_id, sizeof(xcc->model_id),
"Intel Core Processor (Haswell)");
}
static const TypeInfo haswell_cpu_type_info = {
.name = TYPE("Haswell"),
- .parent = TYPE_X86_CPU,
+ .parent = TYPE("SandyBridge"),
.class_init = haswell_cpu_class_init,
};
--
1.7.10.4
next prev parent reply other threads:[~2012-12-10 22:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 22:59 [Qemu-devel] [RFC qom-cpu v2 0/2] target-i386: X86CPU subclasses Andreas Färber
2012-12-10 22:59 ` [Qemu-devel] [RFC qom-cpu v2 1/2] target-i386: Convert CPU definitions into " Andreas Färber
2013-01-15 8:41 ` Igor Mammedov
2013-01-15 10:07 ` Eduardo Habkost
2012-12-10 22:59 ` Andreas Färber [this message]
2012-12-12 12:45 ` [Qemu-devel] [RFC qom-cpu v2 2/2] target-i386: Turn Haswell into subclass of SandyBridge Eduardo Habkost
2012-12-12 14:47 ` Andreas Färber
2012-12-12 15:05 ` Eduardo Habkost
2012-12-12 17:29 ` Andreas Färber
2012-12-12 18:21 ` Alexander Graf
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=1355180372-6525-3-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=ehabkost@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).