From: Paolo Bonzini <pbonzini@redhat.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: Olaf Hering <olaf@aepfle.de>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Stefan Weil <sw@weilnetz.de>, Michael Tokarev <mjt@tls.msk.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>,
Stefano Stabellini <Stefano.Stabellini@citrix.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] [PATCH v3 2/2] Xen: Use the ioreq-server API when available
Date: Thu, 16 Oct 2014 12:09:30 +0200 [thread overview]
Message-ID: <543F995A.5030002@redhat.com> (raw)
In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD011104E55@AMSPEX01CL01.citrite.net>
Il 16/10/2014 10:25, Paul Durrant ha scritto:
>>> +static void xen_hvm_pre_save(void *opaque)
>>> +{
>>> + XenIOState *state = opaque;
>>> +
>>> + /* Stop servicing emulation requests */
>>> + xen_set_ioreq_server_state(xen_xc, xen_domid, state->ioservid, 0);
>>> + xen_destroy_ioreq_server(xen_xc, xen_domid, state->ioservid);
>>> +}
>>
>> Is the new use of vmstate_register() really necessary?
>> Usually the state you're saving corresponds to some QOM
>> device whose vmsd field you can use instead.
>
> In this case, it seems like a job for a vmstate change handler.
>
> I looked at that but it did not seem to give me the right semantic,
> whereas the pre-save callback gave me exactly the right semantic.
What exactly is the right semantics? Note that save _can_ fail, so you
need the ability to roll back to the source machine. I think this is
missing from your patch, and there is no post_save hook that you can use.
Paolo
next prev parent reply other threads:[~2014-10-16 10:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 9:16 [Qemu-devel] [PATCH v3 0/2] Xen: Use ioreq-server API Paul Durrant
2014-10-15 9:16 ` [Qemu-devel] [PATCH v3 1/2] Add device listener interface Paul Durrant
2014-10-15 9:54 ` Igor Mammedov
2014-10-15 10:05 ` Paul Durrant
2014-10-16 12:41 ` Igor Mammedov
2014-10-16 12:54 ` Paul Durrant
2014-10-15 9:16 ` [Qemu-devel] [PATCH v3 2/2] Xen: Use the ioreq-server API when available Paul Durrant
2014-10-15 14:37 ` Stefano Stabellini
2014-10-15 14:51 ` Paul Durrant
2014-10-15 15:04 ` [Qemu-devel] [Xen-devel] " Andrew Cooper
2014-10-15 15:04 ` Stefano Stabellini
2014-10-16 9:51 ` [Qemu-devel] " Paul Durrant
2014-10-16 10:44 ` Stefano Stabellini
2014-10-15 17:30 ` Peter Maydell
2014-10-16 7:37 ` Paolo Bonzini
2014-10-16 8:25 ` Paul Durrant
2014-10-16 10:09 ` Paolo Bonzini [this message]
2014-10-16 10:16 ` Paul Durrant
2014-10-16 10:23 ` Paolo Bonzini
2014-10-16 10:25 ` Paul Durrant
2014-10-16 8:23 ` Paul Durrant
2014-10-16 11:29 ` Stefano Stabellini
2014-10-16 12:31 ` Peter Maydell
2014-10-16 15:25 ` 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=543F995A.5030002@redhat.com \
--to=pbonzini@redhat.com \
--cc=Paul.Durrant@citrix.com \
--cc=Stefano.Stabellini@citrix.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=kraxel@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=olaf@aepfle.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
--cc=xen-devel@lists.xenproject.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).