From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>,
Juan Quintela <quintela@trasno.org>,
Gleb Natapov <gleb@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: Live migration protocol, device features, ABIs and other beasts
Date: Mon, 23 Nov 2009 13:49:09 -0600 [thread overview]
Message-ID: <4B0AE735.1070401@codemonkey.ws> (raw)
In-Reply-To: <20091123192426.GM4485@blackpad.lan.raisama.net>
Eduardo Habkost wrote:
> On Mon, Nov 23, 2009 at 12:28:16PM -0600, Anthony Liguori wrote:
>
>> Eduardo Habkost wrote:
>>
>>> That may be good enough for upstream Qemu, but IMO for RHEL it is not a
>>> realistic policy. If the definition of "guest visible state" is buggy on
>>> the current implementation, we can't drop entirely the possibility of
>>> fixing it on our stable branch.
>>>
>>>
>> After mulling over it a bit, here's what I'd suggest:
>>
>> 1) Integrate VMstate with qdev
>> 2) Introduce a bitmap blacklist for unsupported VMstate versions
>> 3) Expose that bitmap as a qdev property for each device.
>> 4) By default, upstream qemu will always set the bitmap to be 100% correct.
>>
>> This provides a mechanism for informed users and downstreams to reduce
>> correctness in favor of migration compatibility on a case-by-case basis.
>>
>
> Is this for backward migration?
It's for migrating from an older qemu to a newer one. Normally, newer
qemu will happily support older formats but in this case, we broke
something and we need to blacklist the old format. This lets you
override that black list.
> If so, even with this bitmap, how would the migration source process
> know which version it should use when generating the savevm data?
>
To properly support this in -M pc-0.11, we'll need to be able to set the
version to migrate for each qdev device. Again, this is something that
could be overridden as a qdev property. The effect would be that we
force a newer qemu to generate the older savevm format.
> (considering that the migration stream is unidirectional, today) We have
> been considering using a "set-savevm-version" monitor command that would
> be used by management if backward migration is forced by the user.
>
qdev property is the right approach I think. It's really a per-device
setting. It needs to get tied to machine type too and that's a
convenient way to do that.
> BTW, we still have the "machine type" suggestion, that would still keep
> guest-visible state correctness and allow backward migration when it is
> 100% correct and safe. With such mechanism, VMs created with the x.y.1
> machine type could be safely migrated from x.y.2 to x.y.1. (Althought
> the bitmap suggestion could have some use even on this case, if the user
> really wants to force migration of a x.y.2 machine to x.y.1).
>
In theory, a user can manually specify everything in a machine type.
>> This takes qemu out of the business of creating these sort of policies
>> but allows RHEL to make decisions about what default policy it uses. It
>> also lets well informed users of RHEL to override those policy decisions
>> when they deem it to be appropriate.
>>
>> This would make me happy both from an upstream qemu perspective but also
>> as a consumer of RHEL.
>>
>
> What about the suggestion of using multiple sections per device, every
> time a new feature is added, instead of just increasing the version
> numbers linearly? It allows us to keep the savevm version info
> consistent on the multiple downstream trees.
>
It doesn't because it's just as likely to get clashes in subsection
names. For instance, RHEL5.4 may call the pvclock msr subsection
"pvclock-msrs" and then upstream may call it "pvclock-msrs" and flip the
order of the fields.
To support downstreams effectively, we need vendor specific versioning
so that we can separate the upstream qemu namespace from each of the
downstreams.
> Suppose we have the following scenario:
>
> 1) Device Foo has features A, B, C on "foo" section, sets version to 1
> 2) Downstream tree (e.g. RHEL) is branched off upstream
> 3) Device Foo adds support to feature D, version change to 2
> 5) Device Foo adds support to feature E, version changed to 3
> 6) Feature E is backported to a downstream tree. Now it supports
> features A,B,C,E, and its versioning scheme will be incompatible with
> upstream.
>
Downstream adds a "RHEL" subversion. This allows downstream to add a
subversion to each device if it modifies it. When it backports E, it
bumps the downstream version from 0->1.
As long as the backported features aren't enabled, the migration will be
compatible to upstream. Once one of these backported features is
enabled, migration will fail gracefully.
> What I suggest is something like:
>
> 1) Device Foo has features A,B,C, on "foo" section (or maybe on "foo.a",
> "foo.b", and "foo.c" sections, depending if they make sense
> individually)
> 2) Device Foo adds support to feature D, adds "foo.d" section
> 3) Device Foo adds support to feature E, adds "foo.e" section
>
The combinations blow up quickly. Just because A,B,C,E works for a
given downstream, doesn't mean that it would work with the upstream code
base. Features are rarely so independent of one another.
It also doesn't address things like QXL which aren't just a simple
matter of a backported upstream feature.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-11-23 19:49 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-22 15:03 [Qemu-devel] Live migration protocol, device features, ABIs and other beasts Dor Laor
2009-11-22 15:49 ` Anthony Liguori
2009-11-22 20:22 ` [Qemu-devel] " Paolo Bonzini
2009-11-23 2:17 ` Anthony Liguori
2009-11-23 8:18 ` Paolo Bonzini
2009-11-23 13:04 ` Anthony Liguori
2009-11-23 8:26 ` Gleb Natapov
2009-11-23 9:29 ` Paolo Bonzini
2009-11-23 9:31 ` Gleb Natapov
[not found] ` <m3einp4e7c.fsf@neno.neno>
2009-11-23 12:37 ` Gleb Natapov
[not found] ` <m3iqd14edf.fsf@neno.neno>
2009-11-23 12:36 ` Gleb Natapov
[not found] ` <m3r5rpwcww.fsf@neno.neno>
2009-11-23 14:32 ` Gleb Natapov
2009-11-23 14:51 ` Anthony Liguori
2009-11-23 14:53 ` Gleb Natapov
2009-11-23 15:05 ` Anthony Liguori
2009-11-23 15:22 ` Gleb Natapov
2009-11-23 15:30 ` Paolo Bonzini
2009-11-23 15:32 ` Anthony Liguori
2009-11-23 15:49 ` Gleb Natapov
2009-11-23 16:09 ` Anthony Liguori
2009-11-23 16:15 ` Gleb Natapov
2009-11-23 16:19 ` Anthony Liguori
[not found] ` <m33a45s009.fsf@neno.neno>
2009-11-23 16:05 ` Gleb Natapov
2009-11-23 16:10 ` Anthony Liguori
2009-11-24 13:28 ` Michael S. Tsirkin
2009-11-23 13:01 ` Anthony Liguori
[not found] ` <m3vdh1wd0n.fsf@neno.neno>
2009-11-23 14:49 ` Anthony Liguori
2009-11-23 15:21 ` Eduardo Habkost
2009-11-23 16:16 ` Anthony Liguori
2009-11-23 17:08 ` Eduardo Habkost
2009-11-23 18:28 ` Anthony Liguori
2009-11-23 19:24 ` Eduardo Habkost
2009-11-23 19:49 ` Anthony Liguori [this message]
2009-11-23 21:21 ` Eduardo Habkost
2009-11-24 11:00 ` Dor Laor
[not found] ` <m3y6lxqkpv.fsf@neno.neno>
2009-11-23 16:44 ` Anthony Liguori
[not found] ` <m3zl6db11z.fsf@neno.neno>
2009-11-23 18:44 ` Anthony Liguori
2009-11-23 20:24 ` Eduardo Habkost
2009-11-24 13:39 ` Michael S. Tsirkin
2009-11-23 13:51 ` Eduardo Habkost
2009-11-23 14:21 ` Paolo Bonzini
2009-11-23 15:00 ` Anthony Liguori
2009-11-23 15:37 ` Eduardo Habkost
2009-11-23 15:02 ` Eduardo Habkost
2009-11-23 15:12 ` Anthony Liguori
2009-11-24 14:26 ` [Qemu-devel] " Michael S. Tsirkin
2009-11-23 14:53 ` [Qemu-devel] " Anthony Liguori
2009-11-24 14:28 ` [Qemu-devel] " Michael S. Tsirkin
2009-11-24 14:33 ` [Qemu-devel] " Anthony Liguori
2009-11-24 16:05 ` Michael S. Tsirkin
[not found] ` <m3skc2r66t.fsf@neno.neno>
2009-11-25 16:28 ` Michael S. Tsirkin
2009-11-24 13:17 ` [Qemu-devel] " Michael S. Tsirkin
2009-11-24 13:35 ` Paul Brook
2009-11-24 13:49 ` [Qemu-devel] " Michael S. Tsirkin
2009-11-24 13:59 ` [Qemu-devel] " Paul Brook
2009-11-24 14:21 ` Michael S. Tsirkin
2009-11-24 17:06 ` Blue Swirl
2009-11-24 17:08 ` Michael S. Tsirkin
2009-11-24 17:43 ` Paolo Bonzini
2009-11-24 18:51 ` Anthony Liguori
2009-11-24 18:56 ` Blue Swirl
2009-11-24 19:24 ` Anthony Liguori
2009-11-24 18:57 ` Paolo Bonzini
2009-11-24 19:29 ` Anthony Liguori
2009-11-24 20:01 ` Michael S. Tsirkin
[not found] ` <m3my2ct2qe.fsf@neno.neno>
2009-11-24 17:41 ` Paolo Bonzini
2009-11-24 13:21 ` Michael S. Tsirkin
2009-11-24 13:45 ` Anthony Liguori
2009-11-24 13:55 ` Michael S. Tsirkin
2009-11-23 12:15 ` Juan Quintela
2009-11-23 13:09 ` Anthony Liguori
2009-11-23 14:13 ` Juan Quintela
2009-11-24 14:05 ` Michael S. Tsirkin
2009-11-24 14:20 ` Juan Quintela
2009-11-24 14:35 ` Michael S. Tsirkin
2009-11-25 13:42 ` Gerd Hoffmann
2009-11-25 13:42 ` Michael S. Tsirkin
2009-11-25 14:10 ` Gerd Hoffmann
2009-11-25 14:09 ` Michael S. Tsirkin
2009-11-25 14:52 ` Gerd Hoffmann
2009-11-26 18:03 ` Andrea Arcangeli
2009-11-25 13:36 ` Gerd Hoffmann
2009-11-25 13:40 ` Michael S. Tsirkin
2009-11-25 13:59 ` Gerd Hoffmann
2009-11-25 14:03 ` Michael S. Tsirkin
2009-11-25 14:53 ` Juan Quintela
2009-11-25 15:01 ` Michael S. Tsirkin
2009-11-24 10:39 ` Dor Laor
2009-11-24 14:01 ` Michael S. Tsirkin
2009-11-24 14:21 ` Juan Quintela
2009-11-24 14:38 ` Michael S. Tsirkin
2009-11-24 16:05 ` Michael S. Tsirkin
2009-11-25 9:30 ` Juan Quintela
2009-11-25 9:32 ` Michael S. Tsirkin
2009-11-25 13:36 ` Juan Quintela
2009-11-24 13:59 ` Michael S. Tsirkin
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=4B0AE735.1070401@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=gleb@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@trasno.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).