All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: qemu-devel@nongnu.org
Cc: l_indien@magic.fr
Subject: Re: [kvm-devel] [Qemu-devel] expose host CPU features	to	guests: Take	3
Date: Tue, 25 Sep 2007 18:15:21 +0200	[thread overview]
Message-ID: <46F93419.7030208@qumranet.com> (raw)
In-Reply-To: <20070925155423.GF28118@mail.shareable.org>

Jamie Lokier wrote:
> Jocelyn Mayer wrote:
>   
>> Well, it may be needed to integrate the "-cpu host" option.
>> But I think it's a really bad idea that running qemu without the -cpu
>> option would not act the same on different host. When I want to test
>> qemu with the same command line, I want it to behave exactly the same,
>> whatever the host I'm running on, like any other tool. Think about gcc,
>> for example, if you launch it without option, it compiles for a generic
>> CPU. If you want to tune the generated code, even for the host you're
>> running on, you have to use -mcpu/-march/-mtune. Using one command line
>> always have gives the same result.
>> Then, my opinion is that running qemu without any -cpu option should
>> always use a default target.
>>     
>
> A major feature of qemu is reproducible behaviour.  This is especially
> important when resuming snapshots or booting pre-installed images for
> testing things.
>
> A major feature of kvm/kqemu is performance.  But not always
> performance at the expense of reproducibility.  Sometimes you want to
> use kvm/kqemu to make qemu as fast as possible while still behaving
> the same with some image.
>
> Where someone wants performance to have precedence, it's easy enough
> to advise "use -cpu host" for that.
>
> Where someone wants performance, but reproducibility to have
> precedence, it would be more awkward to have to advise "use -cpu
> list,of,common,features".
>   

Or maybe "-cpu baseline" or some other neutral word.

> I think reproducibility is something which needs to be working by
> default.  This is because people make images before they decide to
> move them to other hosts, and often before they would consider at all
> issues about host differences, and making images is sometimes a lot of
> work.  Images should be portable among hosts by default.
>
> But, if we say that the default is a baseline CPU, and there's a "-cpu
> host" option to maximise performance, then we have to decide what
> features the baseline CPU has.  Obviously a 386 isn't very useful for
> emulation any more - many OSes won't run on it.
>
>   

The baseline cpu should be whatever qemu supports today.

> Then, if we change our mind about the default baseline CPU, then we've
> lost reproducibility for old images anyway.
>
> That's an argument for storing the emulated CPU features in images.
>   

That's another thread -- I want memory size and network configuration in 
there too :)

> If that's done, then for image portability among hosts, it is not so
> important that the default CPU have only the features which
> are native to every host.  Instead, the critical thing is simply that
> it has only features which are either native or can be emulated on
> every host.  E.g. TSC is in this category.
>   

Qemu is used to support three different user classes which have 
different requirements. Developers want reproducibility and control, so 
-cpu baseline should be the default for them. Home users want speed to 
run Windows or test distros, so -cpu host and kvm should be the default 
for them. Managed deployments want something in between, so they'd 
specify -cpu feature,feature and won't care about the default.

We can make it a ./configure option. I suspect distros will want to set 
-cpu host as default as their users primarily care about speed.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.

  reply	other threads:[~2007-09-25 16:15 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 17:45 expose host CPU features to guests danken-atKUWr5tajBWk0Htik3J/w
2007-09-05 17:45 ` [Qemu-devel] " danken
     [not found] ` <20070905174530.GA3945-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
2007-09-05 19:26   ` Anthony Liguori
2007-09-05 19:26     ` [Qemu-devel] Re: [kvm-devel] " Anthony Liguori
2007-09-05 19:34     ` Avi Kivity
2007-09-05 19:34       ` [Qemu-devel] Re: [kvm-devel] " Avi Kivity
     [not found]       ` <46DF04D5.5000807-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-05 19:44         ` Daniel P. Berrange
2007-09-05 19:44           ` [Qemu-devel] Re: [kvm-devel] " Daniel P. Berrange
     [not found]           ` <20070905194448.GN5503-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-09-06  0:30             ` [Qemu-devel] " Paul Brook
2007-09-06  0:30               ` [Qemu-devel] Re: [kvm-devel] " Paul Brook
2007-09-06  8:46               ` Avi Kivity
2007-09-06  8:46                 ` [Qemu-devel] " Avi Kivity
2007-09-07 10:47     ` [Qemu-devel] " Jamie Lokier
2007-09-07 10:47       ` [Qemu-devel] Re: [kvm-devel] " Jamie Lokier
     [not found]       ` <20070907104738.GA14723-tp2ajI7sM85Y6zH9YvfY1x2eb7JE58TQ@public.gmane.org>
2007-09-09  7:51         ` [Qemu-devel] " Avi Kivity
2007-09-09  7:51           ` [kvm-devel] " Avi Kivity
     [not found]           ` <46E3A618.7030505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-09 12:47             ` Jamie Lokier
2007-09-09 12:47               ` [kvm-devel] " Jamie Lokier
     [not found]               ` <20070909124718.GE24240-tp2ajI7sM85Y6zH9YvfY1x2eb7JE58TQ@public.gmane.org>
2007-09-09 12:55                 ` Avi Kivity
2007-09-09 12:55                   ` [kvm-devel] " Avi Kivity
     [not found]                   ` <46E3ED2B.6080606-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-09 13:07                     ` Jamie Lokier
2007-09-09 13:07                       ` [kvm-devel] " Jamie Lokier
2007-09-09 13:14                       ` [kvm-devel] " Avi Kivity
2007-09-09 13:14                         ` [kvm-devel] [Qemu-devel] " Avi Kivity
     [not found]                       ` <20070909130725.GF24240-tp2ajI7sM85Y6zH9YvfY1x2eb7JE58TQ@public.gmane.org>
2007-09-09 15:25                         ` Paul Brook
2007-09-09 15:25                           ` [kvm-devel] " Paul Brook
2007-09-09 15:29                           ` [kvm-devel] " Avi Kivity
2007-09-09 15:29                             ` [kvm-devel] [Qemu-devel] " Avi Kivity
2007-09-09 15:47                             ` [kvm-devel] " Jamie Lokier
2007-09-09 15:47                               ` [kvm-devel] [Qemu-devel] " Jamie Lokier
2007-09-09 16:12                             ` [kvm-devel] " Paul Brook
2007-09-09 16:12                               ` [kvm-devel] [Qemu-devel] " Paul Brook
     [not found]                               ` <200709091712.15743.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2007-09-09 16:38                                 ` Avi Kivity
2007-09-09 16:38                                   ` [kvm-devel] " Avi Kivity
2007-09-10 16:53                                 ` Jamie Lokier
2007-09-10 16:53                                   ` [kvm-devel] " Jamie Lokier
2007-09-10  7:40 ` expose host CPU features to guests: Take 2 Dan Kenigsberg
2007-09-10  7:40   ` [Qemu-devel] " Dan Kenigsberg
2007-09-10 11:47   ` Natalia Portillo
2007-09-10 12:01     ` Dan Kenigsberg
2007-09-07 16:18       ` Natalia Portillo
2007-09-11 19:48         ` Luke -Jr
2007-09-10 17:16       ` Jamie Lokier
     [not found]   ` <20070910074005.GA26869-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
2007-09-24 17:41     ` expose host CPU features to guests: Take 3 Dan Kenigsberg
2007-09-24 17:41       ` [Qemu-devel] " Dan Kenigsberg
     [not found]       ` <20070924174129.GA4507-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
2007-09-25  1:28         ` andrzej zaborowski
2007-09-25  1:28           ` andrzej zaborowski
     [not found]           ` <fb249edb0709241828pb6b9fd4v1d1d8d4a3495f040-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-25  8:48             ` Dan Kenigsberg
2007-09-25  8:48               ` [kvm-devel] " Dan Kenigsberg
     [not found]               ` <20070925084842.GA14221-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
2007-09-25  9:01                 ` Avi Kivity
2007-09-25  9:01                   ` [kvm-devel] " Avi Kivity
     [not found]                   ` <46F8CE52.3080502-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-25  9:19                     ` J. Mayer
2007-09-25  9:19                       ` [kvm-devel] " J. Mayer
2007-09-25  9:31                       ` Avi Kivity
2007-09-25  9:31                         ` [kvm-devel] " Avi Kivity
     [not found]                         ` <46F8D577.3020306-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-25 10:40                           ` Avi Kivity
2007-09-25 10:40                             ` [kvm-devel] " Avi Kivity
     [not found]                             ` <46F8E5A2.30906-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-25 11:09                               ` J. Mayer
2007-09-25 11:09                                 ` [kvm-devel] " J. Mayer
2007-09-25 11:36                                 ` Avi Kivity
2007-09-25 11:36                                   ` [kvm-devel] " Avi Kivity
     [not found]                                   ` <46F8F2B8.1080203-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-25 12:05                                     ` Fabrice Bellard
2007-09-25 12:05                                       ` [kvm-devel] " Fabrice Bellard
2007-09-25 13:07                                     ` Jocelyn Mayer
2007-09-25 13:07                                       ` [kvm-devel] " Jocelyn Mayer
     [not found]                                       ` <1190725664.13490.14.camel-JEa2SU7BmVsPEyPTZiGI+UEOCMrvLtNR@public.gmane.org>
2007-09-25 13:12                                         ` Avi Kivity
2007-09-25 13:12                                           ` [kvm-devel] " Avi Kivity
2007-09-25 13:27                                         ` Dan Kenigsberg
2007-09-25 13:27                                           ` [kvm-devel] " Dan Kenigsberg
2007-09-25 15:54                                       ` Jamie Lokier
2007-09-25 16:15                                         ` Avi Kivity [this message]
2007-09-25 12:51                           ` Paul Brook
2007-09-25 12:51                             ` [kvm-devel] " Paul Brook
     [not found]                             ` <200709251351.55481.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2007-09-25 13:13                               ` Avi Kivity
2007-09-25 13:13                                 ` [kvm-devel] " Avi Kivity
2007-09-25  9:29           ` Fabrice Bellard
2007-10-07 12:38         ` x86 -cpu option: Take 4 Dan Kenigsberg
2007-10-07 12:38           ` [Qemu-devel] " Dan Kenigsberg

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=46F93419.7030208@qumranet.com \
    --to=avi@qumranet.com \
    --cc=l_indien@magic.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.