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

2010-08-03 Thread Anthony Liguori
On 08/03/2010 03:41 PM, Gerd Hoffmann wrote: On 08/03/10 19:53, Anthony Liguori wrote: On 08/03/2010 12:02 PM, Gerd Hoffmann wrote: On 08/03/10 18:45, Anthony Liguori wrote: On 08/03/2010 11:42 AM, Gerd Hoffmann wrote: spice-vmc code registers/unregisters the interface within the spice server

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

2010-08-03 Thread Gerd Hoffmann
On 08/03/10 19:53, Anthony Liguori wrote: On 08/03/2010 12:02 PM, Gerd Hoffmann wrote: On 08/03/10 18:45, Anthony Liguori wrote: On 08/03/2010 11:42 AM, Gerd Hoffmann wrote: spice-vmc code registers/unregisters the interface within the spice server. So the interface is only activated in case t

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

2010-08-03 Thread Anthony Liguori
On 08/03/2010 12:02 PM, Gerd Hoffmann wrote: On 08/03/10 18:45, Anthony Liguori wrote: On 08/03/2010 11:42 AM, Gerd Hoffmann wrote: 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 int

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

2010-08-03 Thread Gerd Hoffmann
On 08/03/10 18:45, Anthony Liguori wrote: On 08/03/2010 11:42 AM, Gerd Hoffmann wrote: 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 accordi

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

2010-08-03 Thread Anthony Liguori
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 regis

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

2010-08-03 Thread Gerd Hoffmann
Hi, /me wonders what the point of the 'backlog' struct element is then. Because it could be used for host event but let's ignore that for now. I doubt using the same beast for both host and guest is going to fly ... Yes, we can do that. I don't think it is useful. Oh, and it also changes

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

2010-08-03 Thread Anthony Liguori
On 08/03/2010 10:28 AM, Gerd Hoffmann wrote: On 08/03/10 15:12, Anthony Liguori wrote: On 08/03/2010 03:46 AM, Gerd Hoffmann wrote: Hi, My main objection to ioctls is that you change states based on event delivery. This results in weird things like what happens when you do a chr_write while n

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

2010-08-03 Thread Gerd Hoffmann
On 08/03/10 15:12, Anthony Liguori wrote: On 08/03/2010 03:46 AM, Gerd Hoffmann wrote: Hi, My main objection to ioctls is that you change states based on event delivery. This results in weird things like what happens when you do a chr_write while not ready or not connected. So what I'd rather

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

2010-08-03 Thread Alon Levy
- "Anthony Liguori" wrote: > On 08/03/2010 03:46 AM, Gerd Hoffmann wrote: > > Hi, > > > >> My main objection to ioctls is that you change states based on > event > >> delivery. This results in weird things like what happens when you > do a > >> chr_write while not ready or not connected. >

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

2010-08-03 Thread Anthony Liguori
On 08/03/2010 03:46 AM, Gerd Hoffmann wrote: Hi, My main objection to ioctls is that you change states based on event delivery. This results in weird things like what happens when you do a chr_write while not ready or not connected. So what I'd rather see is a move to an API that was connect

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

2010-08-03 Thread Gerd Hoffmann
Hi, My main objection to ioctls is that you change states based on event delivery. This results in weird things like what happens when you do a chr_write while not ready or not connected. So what I'd rather see is a move to an API that was connection oriented. For instance, we could treat Cha

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

2010-08-02 Thread Anthony Liguori
On 08/02/2010 12:28 PM, Alon Levy wrote: - "Anthony Liguori" wrote: On 08/02/2010 03:33 AM, Alon Levy wrote: Hi, This patch adds three CHR_IOCTLs and uses them in virtserial devices, to be used by a chardev backend, such as a spice vm channel (spice is a vdi

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

2010-08-02 Thread Alon Levy
- "Anthony Liguori" wrote: > On 08/02/2010 03:33 AM, Alon Levy wrote: > > Hi, > > > > This patch adds three CHR_IOCTLs and uses them in virtserial > devices, to be used > > by a chardev backend, such as a spice vm channel (spice is a vdi > solution). > > > > Basically virtio-serial provi

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

2010-08-02 Thread Anthony Liguori
On 08/02/2010 03:33 AM, Alon Levy wrote: Hi, This patch adds three CHR_IOCTLs and uses them in virtserial devices, to be used by a chardev backend, such as a spice vm channel (spice is a vdi solution). Basically virtio-serial provides three driver initiated events for guest open of a devi

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

2010-08-02 Thread Amit Shah
On (Mon) Aug 02 2010 [04:33:49], Alon Levy wrote: > Hi, > > This patch adds three CHR_IOCTLs and uses them in virtserial devices, to be > used > by a chardev backend, such as a spice vm channel (spice is a vdi solution). > > Basically virtio-serial provides three driver initiated events for gu

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

2010-08-02 Thread Alon Levy
Hi, This patch adds three CHR_IOCTLs and uses them in virtserial devices, to be used by a chardev backend, such as a spice vm channel (spice is a vdi solution). Basically virtio-serial provides three driver initiated events for guest open of a device, guest close, and guest ready (driver port