qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: john cooper <john.cooper@redhat.com>
Cc: "Przywara, Andre" <Andre.Przywara@amd.com>,
	qemu-devel@nongnu.org, KVM list <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: [PATCH] Add definitions for current cpu models..
Date: Thu, 21 Jan 2010 00:20:31 +0100	[thread overview]
Message-ID: <201001210020.32467.arnd@arndb.de> (raw)
In-Reply-To: <4B549016.6090501@redhat.com>

On Monday 18 January 2010, john cooper wrote:
> +        .name = "Conroe",
> +        .level = 2,
> +        .vendor1 = CPUID_VENDOR_INTEL_1,
> +        .vendor2 = CPUID_VENDOR_INTEL_2,
> +        .vendor3 = CPUID_VENDOR_INTEL_3,
> +        .family = 6,   /* P6 */
> +        .model = 2,

                ^^^^^^^^ that looks wrong -- what is model 2 actually?

> +        .stepping = 3,
> +        .features = PPRO_FEATURES | 
> +            CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |    /* note 1 */
> +            CPUID_PSE36,                                /* note 2 */
> +        .ext_features = CPUID_EXT_SSE3 | CPUID_EXT_SSSE3,
> +        .ext2_features = (PPRO_FEATURES & CPUID_EXT2_MASK) | 
> +            CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
> +        .ext3_features = CPUID_EXT3_LAHF_LM,
> +        .xlevel = 0x8000000A,
> +        .model_id = "Intel Celeron_4x0 (Conroe/Merom Class Core 2)",
> +    },

Celeron_4x0 is a rather bad example, because it is based on the 
single-core Conroe-L, which is family 6 / model 22 unlike all the dual-
and quad-core Merom/Conroe that are model 15.

> +    {
> +        .name = "Penryn",
> +        .level = 2,
> +        .vendor1 = CPUID_VENDOR_INTEL_1,
> +        .vendor2 = CPUID_VENDOR_INTEL_2,
> +        .vendor3 = CPUID_VENDOR_INTEL_3,
> +        .family = 6,   /* P6 */
> +        .model = 2,
> +        .stepping = 3,
> +        .features = PPRO_FEATURES | 
> +            CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |    /* note 1 */
> +            CPUID_PSE36,                                /* note 2 */
> +        .ext_features = CPUID_EXT_SSE3 |
> +            CPUID_EXT_CX16 | CPUID_EXT_SSSE3 | CPUID_EXT_SSE41,
> +        .ext2_features = (PPRO_FEATURES & CPUID_EXT2_MASK) | 
> +            CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
> +        .ext3_features = CPUID_EXT3_LAHF_LM,
> +        .xlevel = 0x8000000A,
> +        .model_id = "Intel Core 2 Duo P9xxx (Penryn Class Core 2)",
> +    },

This would be model 23 for Penryn-class Xeon/Core/Pentium/Celeron processors
without L3 cache.

> +    {
> +        .name = "Nehalem",
> +        .level = 2,
> +        .vendor1 = CPUID_VENDOR_INTEL_1,
> +        .vendor2 = CPUID_VENDOR_INTEL_2,
> +        .vendor3 = CPUID_VENDOR_INTEL_3,
> +        .family = 6,   /* P6 */
> +        .model = 2,
> +        .stepping = 3,
> +        .features = PPRO_FEATURES | 
> +            CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |    /* note 1 */
> +            CPUID_PSE36,                                /* note 2 */
> +        .ext_features = CPUID_EXT_SSE3 |
> +            CPUID_EXT_CX16 | CPUID_EXT_SSSE3 | CPUID_EXT_SSE41 |
> +            CPUID_EXT_SSE42 | CPUID_EXT_POPCNT,
> +        .ext2_features = (PPRO_FEATURES & CPUID_EXT2_MASK) | 
> +            CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
> +        .ext3_features = CPUID_EXT3_LAHF_LM,
> +        .xlevel = 0x8000000A,
> +        .model_id = "Intel Core i7 9xx (Nehalem Class Core i7)",
> +    },

Apparently, not all the i7-9xx CPUs are Nehalem, the i7-980X is supposed
to be Westmere, which has more features.

Because of the complexity, I'd recommend passing down the *model* number
of the emulated CPU, the interesting Intel ones (those supported by KVM) being:

15-6: CedarMill/Presler/Dempsey/Tulsa (Pentium 4/Pentium D/Xeon 50xx/Xeon 71xx)
6-14: Yonah/Sossaman (Celeron M4xx, Core Solo/Duo, Pentium Dual-Core T1000, Xeon ULV)
6-15: Merom/Conroe/Kentsfield/Woodcrest/Clovertown/Tigerton
      (Celeron M5xx/E1xxx/T1xxx, Pentium T2xxx/T3xxx/E2xxx,Core 2 Solo U2xxx,
       Core 2 Duo E4xxx/E6xxx/Q6xxx/T5xxx/T7xxx/L7xxx/U7xxx/SP7xxx,
       Xeon 30xx/32xx/51xx/52xx/72xx/73xx)
6-22: Penryn/Wolfdale/Yorkfield/Harpertown (Celeron 7xx/9xx/SU2xxx/T3xxx/E3xxx,
       Pentium T4xxx/SU2xxx/SU4xxx/E5xxx/E6xxx, Core 2 Solo SU3xxx,
       Core 2 Duo Pxxxx/SUxxxx/T6xxx/x8xxx/x9xxx,
       Xeon 31xx/33xx/52xx/54xx)
6-26: Gainestown/Bloomfield (Xeon 35xx/55xx, Core i7-9xx)
6-28: Atom
6-29: Dunnington (Xeon 74xx)
6-30: Lynnfield/Clarksfield/JasperForest (Xeon 34xx, Core i7-8xx, Core i7-xxxQM,
       Core i5-7xx)
6-37: Arrandale/Clarkdale (Dual-Core Core i3/i5/i7)
6-44: Gulftown (six-core)

	Arnd

  parent reply	other threads:[~2010-01-20 23:20 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 16:45 [Qemu-devel] [PATCH] Add definitions for current cpu models john cooper
2010-01-19 19:39 ` Anthony Liguori
2010-01-19 20:03   ` Chris Wright
2010-01-19 22:12     ` Jamie Lokier
2010-01-19 22:20       ` Chris Wright
2010-01-19 22:25     ` Anthony Liguori
2010-01-20  0:15       ` Chris Wright
2010-01-20 14:21         ` Anthony Liguori
2010-01-20 14:27           ` Gleb Natapov
2010-01-20  1:38       ` Jamie Lokier
2010-01-20 20:09       ` john cooper
2010-01-20 20:26         ` Daniel P. Berrange
2010-01-20 20:53           ` Anthony Liguori
2010-01-21  0:25           ` Chris Wright
2010-01-21  1:18             ` john cooper
2010-01-21 14:39               ` Andre Przywara
2010-01-21 17:06                 ` Blue Swirl
2010-01-21 15:05               ` Anthony Liguori
2010-01-21 16:43                 ` john cooper
2010-01-21 18:59                   ` Anthony Liguori
2010-01-25  9:08                 ` Dor Laor
2010-01-25 11:27                   ` Jamie Lokier
2010-01-25 14:21                   ` Anthony Liguori
2010-01-25 22:35                     ` Dor Laor
2010-01-26  8:26                       ` Gerd Hoffmann
2010-01-26 12:54                         ` Anthony Liguori
2010-01-28  8:19                   ` Arnd Bergmann
2010-01-28  8:43                     ` Alexander Graf
2010-01-28 10:09                       ` Arnd Bergmann
2010-01-28 14:10                       ` Anthony Liguori
2010-01-19 22:11   ` Jamie Lokier
2010-01-20 20:09     ` john cooper
2010-01-21 17:50       ` Jamie Lokier
2010-01-21 18:13       ` Jamie Lokier
2010-01-21 18:36         ` john cooper
2010-01-19 22:15 ` Jamie Lokier
2010-01-20 20:11   ` john cooper
2010-01-21 17:55     ` Jamie Lokier
2010-01-21 18:34       ` john cooper
2010-01-20 23:20 ` Arnd Bergmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-12-21  6:46 john cooper
     [not found] ` <20091224130521.GD4781@amt.cnet>
2010-01-05  6:06   ` [Qemu-devel] " john cooper

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=201001210020.32467.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Andre.Przywara@amd.com \
    --cc=john.cooper@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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).