On (Wed) Dec 23 2009 [17:14:28], Anthony Liguori wrote:
>
>> +    /*
>> +     * Items in struct VirtIOSerialPort.
>> +     */
>> +    QTAILQ_FOREACH(port,&s->ports, next) {
>> +        /*
>> +         * We put the port number because we may not have an active
>> +         * port at id 0 that's reserved for a console port, or in case
>> +         * of ports that might have gotten unplugged
>> +         */
>> +        qemu_put_be32s(f,&port->id);
>> +        qemu_put_byte(f, port->guest_connected);
>> +
>> +    }
>>   }
>
>
> I imagine this sort of thing is going to give Juan quite a head-ache  
> when it comes time to VMState conversion.

Juan has gone through this and he thinks it's fine; conversion to
vmstate shouldn't be a problem. Unless things have changed since then..

> Are there not separate qdev devices for each port?  Can't the state be  
> stored in that?

All the state here is common to all the ports so it makes sense to do it
here, in one place.

For any extra state the ports might have, they can do their own
save/restore.

                Amit


Reply via email to