All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Paul Durrant" <Paul.Durrant@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH] Remove hardcoded xen-platform device initialization
Date: Wed, 19 Jun 2013 10:41:25 +0200	[thread overview]
Message-ID: <51C16EB5.9060804@redhat.com> (raw)
In-Reply-To: <1371630543.22783.66.camel@zakaz.uk.xensource.com>

Il 19/06/2013 10:29, Ian Campbell ha scritto:
>> > You could check for existence of the pc-i440fx-1.6 machine and infer
>> > that it is at least v1.6 (might break in some distant future of course
>> > and for current git commits until your changes get merged).
> Actually, this raises an interesting point. AIUI "pc" is simply and
> alias for the most recent "pc-X.Y" and "pc-X.Y" is present to allow for
> qemu "upgrading" the set of emulated hardware, as in it represents
> changing the set of emulated peripherals, not just fixing bugs in the
> emulation etc, is that right?

Usually it represents adding _features_ to the emulation.  There are
some cases where the set of emulated peripherals change (e.g. pvpanic
added in 1.5), but it's the exception rather than the rule.  There are
also some cases of bug-compatibility, but again they're not the most
common use of versioned machine types.

You do not know how older guests react to those new features, and you
want to prevent moving guests to older versions that lack some features.
 For these reasons, libvirt always sticks to the alias target that was
found at creation time.

Example 1: you defined a machine last year with machine type "pc".
libvirt actually stored it with machine type "pc-1.2".  Today you run it
and hardware/features do not change.

Example 2: you defined a machine today with machine type "pc".  libvirt
actually stored it with machine type "pc-1.6".  You run it on a machine
with an old QEMU, the machine doesn't start.

Example 3: you ask libvirt to edit the definition of the machine of
example 1.  You change the machine type back to "pc".  libvirt stores it
with machine type "pc-1.6".  Hardware may change compared to the
previous runs of the VM, but it will otherwise remain stable.

Example 4: you use vi to edit the definition of the machine of example
1/3.  You change the machine type to "pc".  You lose any guarantee that
hardware does not change.  You should not do this.

Example 5: you use "virsh create" to start a VM based on an XML file,
rather than "virsh define"+"virsh start" as in examples 1-2.  You lose
any guarantee that hardware does not change.  Not frowned upon as much
as example 4, since the VM is supposed to be transient.

> I think it would be preferable for us to request a specific platform
> (pc-i440fx-1.6 if that's the one) and a conscious decision to support
> newer platforms (and can test it etc).

That can be a good idea, since Xen support is a bit less tested than KVM
with bleeding-edge QEMU.  You can query the machine types from the Xen
toolchain, and auto-remap "pc" to a machine type that is never newer
than what you consider to be well-tested.

It would require two QEMU invocations per "xl create".  However, most of
the startup time of QEMU is loading dynamic libraries.  A good deal of
that time amortizes well over two invocations of QEMU.  Hence, you can
use the first invocation to query the machine type (using "-nodefaults
-nographic" etc. and a QMP connection), and the second to actually start
the VM.

Paolo

  parent reply	other threads:[~2013-06-19  8:41 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13  9:50 [Qemu-devel] [PATCH] Remove hardcoded xen-platform device initialization Paul Durrant
2013-06-13 17:33 ` Stefano Stabellini
2013-06-13 17:44   ` Ian Campbell
2013-06-13 17:44   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2013-06-13 18:02     ` Paolo Bonzini
2013-06-13 18:02     ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2013-06-14  9:00       ` Paul Durrant
2013-06-14 10:38         ` [Qemu-devel] " Paul Durrant
2013-06-14 10:38         ` [Qemu-devel] [Xen-devel] " Paul Durrant
2013-06-14 13:50           ` Paolo Bonzini
2013-06-14 13:50           ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2013-06-14 14:11             ` Paul Durrant
2013-06-14 14:11             ` [Qemu-devel] [Xen-devel] " Paul Durrant
2013-06-14 14:57               ` Paolo Bonzini
2013-06-14 14:57               ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2013-06-14 15:10                 ` Paul Durrant
2013-06-14 15:10                 ` [Qemu-devel] [Xen-devel] " Paul Durrant
2013-06-18 18:56                   ` Stefano Stabellini
2013-06-18 18:56                   ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2013-06-18 19:12                     ` Paolo Bonzini
2013-06-18 19:12                     ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2013-06-18 19:35                       ` Stefano Stabellini
2013-06-18 21:38                         ` [Qemu-devel] " Andreas Färber
2013-06-18 21:38                         ` [Qemu-devel] [Xen-devel] " Andreas Färber
2013-06-19  8:29                           ` [Qemu-devel] " Ian Campbell
2013-06-19  8:29                           ` [Qemu-devel] [Xen-devel] " Ian Campbell
2013-06-19  8:37                             ` Paul Durrant
2013-06-19  8:37                             ` [Qemu-devel] " Paul Durrant
2013-06-19  8:41                             ` Paolo Bonzini [this message]
2013-06-19  8:56                               ` Ian Campbell
2013-06-19  8:56                               ` [Qemu-devel] [Xen-devel] " Ian Campbell
2013-06-19  9:11                                 ` Paul Durrant
2013-06-19  9:11                                 ` [Qemu-devel] " Paul Durrant
2013-06-19 12:51                                 ` Paolo Bonzini
2013-06-19 12:51                                 ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2013-06-19 13:47                                 ` [Qemu-devel] " Stefano Stabellini
2013-06-19 13:47                                 ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2013-06-19  8:41                             ` [Qemu-devel] " Paolo Bonzini
2013-06-19  8:27                         ` [Qemu-devel] [Xen-devel] " Paul Durrant
2013-06-19 13:55                           ` Stefano Stabellini
2013-06-19 13:55                           ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2013-06-19 15:09                             ` Ian Campbell
2013-06-19 15:09                             ` [Qemu-devel] [Xen-devel] " Ian Campbell
2013-06-19  8:27                         ` Paul Durrant
2013-06-18 19:35                       ` Stefano Stabellini
2013-06-19  8:11                     ` Ian Campbell
2013-06-19  8:11                     ` [Qemu-devel] [Xen-devel] " Ian Campbell
2013-06-19 13:53                       ` Stefano Stabellini
2013-06-19 14:00                         ` [Qemu-devel] " Paul Durrant
2013-06-19 14:00                         ` [Qemu-devel] [Xen-devel] " Paul Durrant
2013-06-19 16:27                           ` Stefano Stabellini
2013-06-20  7:32                             ` Paul Durrant
2013-06-20  7:32                             ` [Qemu-devel] " Paul Durrant
2013-06-19 16:27                           ` Stefano Stabellini
2013-06-19 13:53                       ` Stefano Stabellini
2013-06-14  9:00       ` Paul Durrant
2013-06-14  8:56     ` [Qemu-devel] [Xen-devel] " Paul Durrant
2013-06-14  8:56     ` [Qemu-devel] " Paul Durrant
2013-06-14  8:50   ` Paul Durrant
2013-06-14 13:52     ` Paolo Bonzini
2013-06-14 13:52     ` [Qemu-devel] " Paolo Bonzini
2013-06-14 13:57       ` Paul Durrant
2013-06-14 13:57       ` [Qemu-devel] " Paul Durrant
2013-06-14  8:50   ` Paul Durrant
2013-06-13 17:33 ` Stefano Stabellini

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=51C16EB5.9060804@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.