qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: mimu@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	"Alexander Graf" <agraf@suse.de>,
	borntraeger@de.ibm.com, "Igor Mammedov" <imammedo@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Jiri Denemark" <jdenemar@redhat.com>,
	rth@twiddle.net, "Andreas Färber" <afaerber@suse.de>,
	"Eduardo Habkost" <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models
Date: Wed, 24 Jun 2015 12:31:38 +0200	[thread overview]
Message-ID: <20150624122248-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20150624085209.GA25601@redhat.com>

On Wed, Jun 24, 2015 at 09:52:09AM +0100, Daniel P. Berrange wrote:
> On Tue, Jun 23, 2015 at 11:23:16PM +0200, Michael S. Tsirkin wrote:
> > 
> > So any single CPU flag now needs to be added in
> > - kvm
> > - qemu
> > - libvirt
> 
> This is in fact already the case, and it will also possibly need
> to be added to openstack too.
> 
> > Next thing libvirt will decide it's a policy thing and so
> > needs to be pushed up to openstack.
> 
> In fact openstack would really like it if we did exactly that, but
> even just having CPUs versioned separately from machine types would
> be a big step forward as far as openstack is concerned.
> 
> The openstack schedular does not have full visibility into the way
> the guest is going to be configured by libvirt/QEMU, in particular
> it does not know anything about machine type that will be used by
> the guest.
> 
> The compute hosts report what CPU features they can support, and
> the user / admin will be able to express what CPU model and/or
> features they desire their guest to run with, and the schedular
> has to match that up to decide on hosts to use. If the CPU QEMU
> machine type used can alter what the CPU model means in terms
> of features, then the schedling decisions OpenStack is making
> are going to be wrong some portion of the time.

Is this all just theoretical, or are there real examples
where things stop running? I keep hearing "feature xyz"
and it's impossible to argue reasonably about that IMHO.


> So from the POV of the OpenStack schedular, we'd much rather
> have CPU models versioned explicitly so their semantics do not
> change behind our back based on machine types.
> 
> OpenStack is also looking at how to present a consistent
> description of CPU models to users, which is independant of
> the cloud. Since libvirt/QEMU doesn't allow 100% control of
> the CPU model, OpenStack is likely going to have to define
> some kind of manual mapping of its own.
>
> > We should just figure out what you want to do and support it in QEMU.
> 
> Main thing is versioned CPU models with fixed semantics that
> don't magically change based on other aspects of VM configuration,
> such as the machine type. This could be accomplished by QEMU
> alone.
> 
> Following on from that though, there's two other aspects which
> we'd like to address. First, be able to present a consistent
> set of CPU models across all hypervisors libvirt manages,
> regardless of type or version. This is a key reason why we have
> always maintained our own CPU model database, even though it
> duplicates QEMU's.


Do you also want to migrate that? If yes, the problem
definitely becomes more than just CPU specific.


> More interesting is the question of host passthrough. We have
> two modes for that - either 'host-model' or 'host-passthrough'.
> The 'host-passthrough' option is something that explicitly
> maps to QEMU's  '-cpu host'. This is good because it exposes
> 100% of the host CPU to the guest. This is bad because it then
> prevents use of migration in general, unless both machines
> are 100% identical - libvirt just blocks it rather than trying
> todo such a fine grained host CPU check.
> 
> For that reason we have 'host-model', which is supposed to be
> essentially the same thing instead of '-cpu host' we explicitly
> list all the features alongside a named model. Since we control
> exactly what the guest is being given, we can permit guests
> with 'host-model' to be migrated, even if the destination host
> is a superset of the source host, we know the guest won't
> suddenly see a model change after migration. Currently we are
> limited though, as we can only express the CPU features - we
> cannot expose the other aspects like level, xlevel, etc. So
> our 'host-model' is not quite as perfect a  match as '-cpu host'
> is. The '-cpu custom' would help us getting a better match
> for 'host-model' by allowing these extra things to be configured.

This duplicates code from QEMU though.
It looks like we need a tool to get the legal CPUs
that can run on the given host?
Would be easy to add, reusing QEMU codebase.
Maybe make it a new QEMU flag.


> > Are there many examples where a single flag used to work and then
> > stopped? I would say such a change is problematic anyway:
> > not everyone uses libvirt, you are breaking things for people
> > that run -M pc.
> > 
> > IMHO -M pc is not supposed to mean "can break at any time".
> 
> Well 'pc' is an unversioned machine type, so it explicitly is said to
> break at any time - users/apps are supposed to translate that into a
> versioned type if they want a guarantee of no breakage.
> 
> Regards,
> Daniel

That's because you are looking at it from libvirt perspective.  From
QEMU command line, since pc is the default, this makes no sense IMHO:
look up usage advice on the internet, and you will see no one
specifies a machine type.


> -- 
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2015-06-24 10:31 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 19:07 [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models Eduardo Habkost
2015-06-08 19:07 ` [Qemu-devel] [PATCH 1/2] target-i386: Introduce "-cpu custom" Eduardo Habkost
2015-06-08 19:07 ` [Qemu-devel] [PATCH 2/2] scripts: x86-cpu-model-dump script Eduardo Habkost
2015-06-08 20:18 ` [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models Jiri Denemark
2015-06-09  8:56   ` Daniel P. Berrange
2015-06-09 13:16     ` Eduardo Habkost
2015-06-23 12:32   ` Andreas Färber
2015-06-23 15:08     ` Eduardo Habkost
2015-06-23 15:32       ` Michael S. Tsirkin
2015-06-23 15:58         ` Eduardo Habkost
2015-06-23 16:15           ` Andreas Färber
2015-06-23 16:25             ` Daniel P. Berrange
2015-06-23 16:33               ` Michael S. Tsirkin
2015-06-23 16:38                 ` Eduardo Habkost
2015-06-23 16:44                   ` Andreas Färber
2015-06-23 17:08                     ` Eduardo Habkost
2015-06-23 17:18                       ` Andreas Färber
2015-06-23 17:27                         ` Daniel P. Berrange
2015-06-23 17:41                           ` Andreas Färber
2015-06-23 17:45                             ` Eduardo Habkost
2015-06-23 17:58                               ` Andreas Färber
2015-06-23 18:05                                 ` Daniel P. Berrange
2015-06-23 18:11                                 ` Eduardo Habkost
2015-06-23 17:55                             ` Daniel P. Berrange
2015-06-23 17:39                         ` Eduardo Habkost
2015-06-23 18:35                           ` Andreas Färber
2015-06-23 19:25                             ` Eduardo Habkost
2015-06-23 19:41                               ` Andreas Färber
2015-06-23 19:53                                 ` Eduardo Habkost
2015-06-23 20:26                                 ` Eduardo Habkost
2015-06-23 21:38                                   ` Michael S. Tsirkin
2015-06-23 16:42                 ` Daniel P. Berrange
2015-06-23 16:47                   ` Andreas Färber
2015-06-23 17:11                     ` Eduardo Habkost
2015-06-23 21:34                       ` Michael S. Tsirkin
2015-06-24 14:24                         ` Eduardo Habkost
2015-06-24 14:37                           ` Michael S. Tsirkin
2015-06-24 15:44                             ` [Qemu-devel] Not introducing new host-side requirements on new machine-type versions (was Re: [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models) Eduardo Habkost
2015-06-24 15:58                               ` Andreas Färber
2015-06-24 16:08                                 ` Eduardo Habkost
2015-06-24 16:15                                   ` Andreas Färber
2015-06-24 15:59                               ` Paolo Bonzini
2015-06-23 17:13                     ` [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models Daniel P. Berrange
2015-06-23 17:29                       ` Andreas Färber
2015-06-23 17:42                         ` Eduardo Habkost
2015-06-23 17:55                           ` Andreas Färber
2015-06-23 17:58                             ` Daniel P. Berrange
2015-06-23 21:28                           ` Michael S. Tsirkin
2015-06-24 14:18                             ` Eduardo Habkost
2015-06-24 14:24                               ` Michael S. Tsirkin
2015-06-23 21:26                       ` Michael S. Tsirkin
2015-06-23 21:23                   ` Michael S. Tsirkin
2015-06-24  8:52                     ` Daniel P. Berrange
2015-06-24 10:31                       ` Michael S. Tsirkin [this message]
2015-06-24 14:16                     ` Eduardo Habkost
2015-06-24 14:19                       ` Michael S. Tsirkin
2015-06-24 14:35                         ` Andreas Färber
2015-06-24 14:57                           ` Michael S. Tsirkin
2015-06-24 15:43                             ` Andreas Färber
2015-06-24 14:38                       ` Paolo Bonzini
2015-06-24 14:54                         ` Peter Maydell
2015-06-24 14:56                           ` Paolo Bonzini
2015-06-24 15:58                         ` Eduardo Habkost
2015-06-24 16:00                           ` Paolo Bonzini
2015-06-23 16:40               ` Andreas Färber
2015-06-23 16:53                 ` Daniel P. Berrange
2015-06-23 17:10                   ` Andreas Färber
2015-06-23 17:24                     ` Eduardo Habkost
2015-06-23 17:31                       ` Daniel P. Berrange
2015-06-23 16:32             ` Eduardo Habkost
2015-06-23 17:01               ` Andreas Färber
2015-06-23 15:51       ` Daniel P. Berrange
2015-06-23 15:56         ` Michael S. Tsirkin
2015-06-23 16:00           ` Daniel P. Berrange
2015-06-23 16:30             ` Michael S. Tsirkin
2015-06-24  9:20     ` Jiri Denemark
2015-06-24 10:21       ` Michael S. Tsirkin
2015-06-24 10:31         ` Daniel P. Berrange
2015-06-24 10:40           ` Michael S. Tsirkin
2015-06-24 10:32         ` Paolo Bonzini
2015-06-16 17:40 ` Eduardo Habkost

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=20150624122248-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=mimu@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).