qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 2/2] Xen: Use the ioreq-server API when avail


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]