qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RFC adding ioctl's to virtserial/virtconsole


From: Anthony Liguori
Subject: Re: [Qemu-devel] RFC adding ioctl's to virtserial/virtconsole
Date: Tue, 03 Aug 2010 11:45:18 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6

On 08/03/2010 11:42 AM, Gerd Hoffmann wrote:
understand what state the session is in.

Spice would basically (ab-)use it as event delivery mechanism.

Can you explain what spice uses these events for?
Spice would then implement it's own CharServerState and would use it to

spice-vmc code registers/unregisters the interface within the spice server. So the interface is only activated in case the guest uses it. Spice client sees the interface being active or not and can act accordingly.

So we have to migrate connected state?

Well. I disagree. Checking the state is needed nevertheless. The
places where virtio-serial checks port->state today it would have to
check whenever port->chardev is non-NULL then. The only difference is
that failures to do so might become a bit more obvious as qemu will
segfault due to the NULL pointer dereferences then. I still think this
isn't worth the effort though.

But I think we ultimately need to switch to having the front-ends having
a NULL check. Even beyond front-end initiated connect/disconnect,
front-end's need to learn to deal with back-end initiated
disconnect/connect.

I don't think we have to go with a NULL check. Providing chr_is_*() functions to query state and adding asserts() to the chr_*() function should provide the same level of robustness IMHO. Also having CharDriverStates come and go brings its own share of problems.

I think this would be a reasonable solution too.

Regards,

Anthony Liguori



reply via email to

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