From: Anthony Liguori <anthony@codemonkey.ws>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org, Gleb Natapov <gleb@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] Re: optional feature
Date: Wed, 16 Sep 2009 10:58:34 -0500 [thread overview]
Message-ID: <4AB10B2A.5090306@codemonkey.ws> (raw)
In-Reply-To: <4AB10824.1030904@codemonkey.ws>
Anthony Liguori wrote:
> Michael S. Tsirkin wrote:
>>>> If instead we would only save/load the part of state if
>>>> the knob is set, we won't have a problem.
>>>>
>>> The rtc device happens to support an optional feature by splitting
>>> the optional bits into a separate section. Not every device does
>>> this though so if you want to convert other devices to this style,
>>> you'll break their backwards compatibility.
>>>
>>> The mechanisms are functionally the same. One is no more
>>> expressive than the other.
>>>
>>
>> Yes, separate devices variant is more expressive.
>>
>
> Not when you consider my proposed syntax:
>
> .fields = (VMStateField []) {
> VMSTATE_BOOL(td_hack, RTCState, (VMStateField[]){
> VMSTATE_INT32(irq_coalesced, RTCState),
> VMSTATE_INT32(period, RTCState),
> VMSTATE_END_OF_LIST()}),
> }
>
> You could clearly encode this on the wire as a separate section. You
> could autogenerate the name as "rtc-td_hack". It won't be backwards
> compatible for save but that's okay. We can hack things together to
> make it backwards compatible on load.
>
> I don't like this as a wire format though. The point though is that
> if we get the VMState syntax right, then we can make whatever changes
> down the road we need.
>
>> It is more modular. With optional features A B C, versioning can not
>> support saving only A and C but not B. This is bad for example for
>> backporting features between versions: if C happened to be introduced
>> after B, backporting C will force backporting B.
>>
>
> The real argument is against linear versioning. The whole "optional
> feature" thing is almost orthogonal.
>
> If we want to support downstream versioning, then I think we should
> attack that problem properly instead of shoe horning it via "optional
> features". This would involve introducing a v4 of the savevm protocol
> that allowed for a minor versions of device state. QEMU would always
> set the minor version to 0. If downstream decides to introduce
> changes, they can bump the minor version for a device. We can also
> add a minor version to the savevm protocol itself along with a vendor id.
Scratch the savevm protocol minor number. We need to properly support
multiple vendor ids and minor numbers. Otherwise, if you have multiple
down streams, you could never migrate from the 2-level downstream to
upstream.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-09-16 15:58 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 10:46 [Qemu-devel] optional feature (was Re: The State of the SaveVM format) Michael S. Tsirkin
2009-09-16 11:04 ` [Qemu-devel] Re: optional feature Juan Quintela
2009-09-16 11:18 ` Gleb Natapov
2009-09-16 11:48 ` Juan Quintela
2009-09-16 11:52 ` Michael S. Tsirkin
2009-09-16 12:14 ` Juan Quintela
2009-09-16 12:18 ` Michael S. Tsirkin
2009-09-16 12:26 ` Juan Quintela
2009-09-16 12:37 ` Michael S. Tsirkin
2009-09-16 13:01 ` Juan Quintela
2009-09-16 13:03 ` Michael S. Tsirkin
2009-09-16 13:34 ` Juan Quintela
2009-09-16 14:02 ` Michael S. Tsirkin
2009-09-16 11:57 ` Gleb Natapov
2009-09-16 12:23 ` Juan Quintela
2009-09-16 12:35 ` Gleb Natapov
2009-09-16 12:40 ` Michael S. Tsirkin
2009-09-16 13:22 ` Juan Quintela
2009-09-16 14:08 ` Anthony Liguori
2009-09-16 14:12 ` Michael S. Tsirkin
2009-09-16 14:21 ` Anthony Liguori
2009-09-16 14:34 ` Michael S. Tsirkin
2009-09-16 14:53 ` Juan Quintela
2009-09-16 15:11 ` Michael S. Tsirkin
2009-09-16 15:25 ` Juan Quintela
2009-09-16 15:45 ` Anthony Liguori
2009-09-16 15:58 ` Anthony Liguori [this message]
2009-09-16 13:51 ` Anthony Liguori
2009-09-16 11:41 ` Michael S. Tsirkin
2009-09-16 12:13 ` Juan Quintela
2009-09-16 12:29 ` Michael S. Tsirkin
2009-09-16 13:31 ` Juan Quintela
2009-09-16 14:07 ` 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=4AB10B2A.5090306@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=gleb@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).