qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 09/10] s390x/css: turn on channel subsystem migr


From: Halil Pasic
Subject: Re: [Qemu-devel] [PATCH 09/10] s390x/css: turn on channel subsystem migration
Date: Mon, 8 May 2017 20:03:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0


On 05/08/2017 07:27 PM, Dr. David Alan Gilbert wrote:
> * Halil Pasic (address@hidden) wrote:
>> Turn on migration for the channel subsystem and the new scheme for
>> migrating virtio-ccw proxy devices (instead of letting the transport
>> independent child device migrate it's proxy, use the usual
>> DeviceClass.vmsd mechanism) for future machine versions.

[..]

>> +void css_register_vmstate(void)
>> +{
>> +    vmstate_register(NULL, 0, &vmstate_css, &channel_subsys);
>> +}
>> +
> 
> Why isn't that attached to a device vmsd? 

Because there is no device. The channel subsystem is not modeled 
as a QEMU device but it does have state which needs to be
migrated.

[..]

>> @@ -1365,6 +1373,11 @@ static void virtio_ccw_device_plugged(DeviceState *d, 
>> Error **errp)
>>      sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);
>>  
>>  
>> +    /* Avoid generating unknown section for legacy migration target. */
>> +    if (!css_migration_enabled()) {
>> +        DEVICE_GET_CLASS(ccw_dev)->vmsd = NULL;
>> +    }
>> +
> 
> That's a very odd thing to do; can't you use a .needed at the
> top level of the vmstate_virtio_ccw_dev to avoid having to
> set it to NULL like this?
> 

I agree it's odd. As far as I remember I can't use .needed but
I will double check.

Many thanks for your review!

Halil




reply via email to

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