From: Stephane Eranian <eranian-sDzT885Ts8HQT0dZR+AlfA@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: CPUID emulation
Date: Thu, 31 May 2007 04:29:06 -0700 [thread overview]
Message-ID: <20070531112906.GC22798@frankl.hpl.hp.com> (raw)
In-Reply-To: <465E89A8.9020201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Avi,
On Thu, May 31, 2007 at 11:39:04AM +0300, Avi Kivity wrote:
> Stephane Eranian wrote:
> >Hello,
> >
> >Looking at kvm-26, it seems that the CPUID values as seen by the guest OS
> >are still hardcoded for i386/x86-64 at least.
> >
> >For performance counter virtualization, the guest needs to see the *actual*
> >family/model information in order to correctly program the counters.
> >
> >It would be fairly simple to grab that information from /proc/cpuinfo
> >at init time in qemu.
> >
> >However, I am wondering if there would be side effects of using the
> >actual CPUID which could cause troubles to KVM or the guest.
> >
> >
>
> The main issue is migration (and save/restore). If you migrate to a
> host with fewer capabilities, applications may fail when they use
> unavailable instructions that they successfully detected earlier.
>
In the case of heterogeneous migration, clearly performance counters
will not work well, especially for unmodified guests. But I can also
see problems when migrating from Intel Core to older P4 for instance.
> I think the best solution is to default to the host's capabilities, but
> allow command line switches to override them. This way a management
> application in a server farm can set a site-wide least common
> denominator, while a home user can enjoy the latest and greatest
> instructions on their machine.
>
I agree.
> Upstream qemu already has a -cpu (or similar) switch for non-x86; we can
> probably use that.
>
Probably, but in my particular case, you'd have to be able to specify
vendor/family/model.
> (there's another possible issue - some future features may require
> support from the hypervisor - that may conflict with defaulting to to
> the host feature set. maybe kvm should mask out any unknown features)
>
The question is how do you identify unknown features which do require
KVM support?
--
-Stephane
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-05-31 11:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-31 8:20 CPUID emulation Stephane Eranian
[not found] ` <20070531082006.GB22798-HU54gidqsKnWxDs0y9d3MAC/G2K4zDHf@public.gmane.org>
2007-05-31 8:39 ` Avi Kivity
[not found] ` <465E89A8.9020201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-31 11:29 ` Stephane Eranian [this message]
[not found] ` <20070531112906.GC22798-HU54gidqsKnWxDs0y9d3MAC/G2K4zDHf@public.gmane.org>
2007-05-31 11:35 ` Avi Kivity
[not found] ` <465EB310.7080402-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-31 11:44 ` Stephane Eranian
[not found] ` <20070531114447.GF22798-HU54gidqsKnWxDs0y9d3MAC/G2K4zDHf@public.gmane.org>
2007-05-31 11:52 ` Avi Kivity
[not found] ` <465EB6E5.7000000-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-31 11:58 ` Stephane Eranian
[not found] ` <20070531115841.GG22798-HU54gidqsKnWxDs0y9d3MAC/G2K4zDHf@public.gmane.org>
2007-05-31 15:12 ` Troy Benjegerdes
[not found] ` <20070531151244.GC6474-na1kE3HDu0idQnJuSAr7PQ@public.gmane.org>
2007-05-31 15:38 ` ron minnich
2007-05-31 18:30 ` Ulrich Drepper
[not found] ` <465F145F.5040003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-06-01 1:12 ` H. Peter Anvin
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=20070531112906.GC22798@frankl.hpl.hp.com \
--to=eranian-sdzt885ts8hqt0dzr+alfa@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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