qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Andre Przywara <andre.przywara@amd.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] push CPUID level to 4 to allow Intel multicore decoding
Date: Thu, 20 Aug 2009 14:06:06 +0300	[thread overview]
Message-ID: <4A8D2E1E.2040608@redhat.com> (raw)
In-Reply-To: <4A8D2722.2000905@amd.com>

On 08/20/2009 01:36 PM, Andre Przywara wrote:
> Avi Kivity wrote:
>> On 08/19/2009 04:42 PM, Andre Przywara wrote:
>>> Intel CPUs store the number of cores in CPUID leaf 4. So push
>>> the maxleaf value to 4 to allow the guests access to this leaf.
>>
>> There's a slight compatibility risk here.  If a guest has broken 
>> handling for cpuid level 4, then upgrading qemu would cause it to 
>> behave differently.
>>
>> I don't think that's an issue for this patch, just highlighting the 
>> need for a systematic treatment of backward compatibility.
>
> If you have real headaches about it, I have two options:

It's really an imaginary headache.

>
> What about allowing level to be specified at -cpu command line? This 
> would allow users to say -cpu qemu64,level=2 if they experience 
> problems. The default would stay at level 4.

I think this is the best option.

> The other option would be to push the level only to four if we use 
> more than one thread or core.
>
> In my research it turned out that Intel pushed the level beyond 4 with 
> Pentium4 Prescott (probably with the introduction of real dual core 
> chips to differentiate threads and cores), so this is quite some time 
> ago. So I doubt that there are serious issues out there. 

I only pointed this out as an example of a new feature that has an 
effect even if it is not used, something we should beware of.

> The only problem I can think of is that the advertised cache topology 
> is somehow bogus and could confuse OSes.

So long as it's smaller than contemporary caches we should be fine.

btw, does -cpu host use the host cpu cache information?

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2009-08-20 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 13:42 [Qemu-devel] [PATCH 0/3]: Introduce multi-core and multi-thread support for guests Andre Przywara
2009-08-19 13:42 ` [Qemu-devel] [PATCH 1/3] extend -smp parsing to include cores= and threads= options Andre Przywara
2009-08-19 13:42 ` [Qemu-devel] [PATCH 2/3] push CPUID level to 4 to allow Intel multicore decoding Andre Przywara
2009-08-20 10:06   ` Avi Kivity
2009-08-20 10:36     ` Andre Przywara
2009-08-20 11:06       ` Avi Kivity [this message]
2009-08-20 19:03         ` [Qemu-devel] [PATCH] allow overriding of CPUID level on command line Andre Przywara
2009-08-25 12:21         ` [Qemu-devel] [PATCH 2/3] push CPUID level to 4 to allow Intel multicore decoding Andre Przywara
2009-08-20 19:30       ` Jamie Lokier
2009-08-20 21:35         ` Andre Przywara
2009-08-19 13:42 ` [Qemu-devel] [PATCH 3/3] set CPUID bits to present cores and threads topology Andre Przywara

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=4A8D2E1E.2040608@redhat.com \
    --to=avi@redhat.com \
    --cc=andre.przywara@amd.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).