Re: [PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed

2019-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2019 at 05:37:34PM +0100, Laurent Vivier wrote: > On 13/11/2019 16:22, Michael S. Tsirkin wrote: > > On Wed, Nov 13, 2019 at 10:21:11AM -0500, Michael S. Tsirkin wrote: > >> On Wed, Nov 13, 2019 at 04:00:56PM +0100, Laurent Vivier wrote: > >>> When we hot unplug a virtserialport and

Re: [PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed

2019-11-13 Thread Laurent Vivier
On 13/11/2019 16:22, Michael S. Tsirkin wrote: > On Wed, Nov 13, 2019 at 10:21:11AM -0500, Michael S. Tsirkin wrote: >> On Wed, Nov 13, 2019 at 04:00:56PM +0100, Laurent Vivier wrote: >>> When we hot unplug a virtserialport and then try to hot plug again, >>> it fails: >>> >>> (qemu) chardev-add so

Re: [PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed

2019-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2019 at 10:21:11AM -0500, Michael S. Tsirkin wrote: > On Wed, Nov 13, 2019 at 04:00:56PM +0100, Laurent Vivier wrote: > > When we hot unplug a virtserialport and then try to hot plug again, > > it fails: > > > > (qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait >

Re: [PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed

2019-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2019 at 04:00:56PM +0100, Laurent Vivier wrote: > When we hot unplug a virtserialport and then try to hot plug again, > it fails: > > (qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait > (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\ >

[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed

2019-11-13 Thread Laurent Vivier
When we hot unplug a virtserialport and then try to hot plug again, it fails: (qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 (qemu) device_del serial0 (qemu)