search for: in_vq

Displaying 20 results from an estimated 190 matches for "in_vq".

2019 Oct 18
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...s=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 kernel error: virtio-ports vport2p2: Error allocating inbufs qemu error: virtio-serial-bus: Guest failure in adding port 2 for device \ virtio-serial0.0 This happens because buffers for the in_vq are allocated when the port is added but are not released when the port is unplugged. They are only released when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds...
2019 Oct 18
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...s=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 kernel error: virtio-ports vport2p2: Error allocating inbufs qemu error: virtio-serial-bus: Guest failure in adding port 2 for device \ virtio-serial0.0 This happens because buffers for the in_vq are allocated when the port is added but are not released when the port is unplugged. They are only released when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds...
2019 Nov 06
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...=serial0,name=serial0 >> kernel error: >> virtio-ports vport2p2: Error allocating inbufs >> qemu error: >> virtio-serial-bus: Guest failure in adding port 2 for device \ >> virtio-serial0.0 >> >> This happens because buffers for the in_vq are allocated when the port is >> added but are not released when the port is unplugged. >> >> They are only released when virtconsole is removed (see a7a69ec0d8e4) >> >> To avoid the problem and to be symmetric, we could allocate all the buffers >> in init_vqs()...
2019 Nov 06
3
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...=serial0,name=serial0 >> kernel error: >> virtio-ports vport2p2: Error allocating inbufs >> qemu error: >> virtio-serial-bus: Guest failure in adding port 2 for device \ >> virtio-serial0.0 >> >> This happens because buffers for the in_vq are allocated when the port is >> added but are not released when the port is unplugged. >> >> They are only released when virtconsole is removed (see a7a69ec0d8e4) >> >> To avoid the problem and to be symmetric, we could allocate all the buffers >> in init_vqs()...
2012 Apr 18
3
[RFC PATCH] virtio_console: link vq to port with a private pointer in struct virtqueue
...297,17 +297,7 @@ out: static struct port *find_port_by_vq(struct ports_device *portdev, struct virtqueue *vq) { - struct port *port; - unsigned long flags; - - spin_lock_irqsave(&portdev->ports_lock, flags); - list_for_each_entry(port, &portdev->ports, list) - if (port->in_vq == vq || port->out_vq == vq) - goto out; - port = NULL; -out: - spin_unlock_irqrestore(&portdev->ports_lock, flags); - return port; + return vq->vdev_priv; } static bool is_console_port(struct port *port) @@ -1159,6 +1149,8 @@ static int add_port(struct ports_device *portdev, u32...
2012 Apr 18
3
[RFC PATCH] virtio_console: link vq to port with a private pointer in struct virtqueue
...297,17 +297,7 @@ out: static struct port *find_port_by_vq(struct ports_device *portdev, struct virtqueue *vq) { - struct port *port; - unsigned long flags; - - spin_lock_irqsave(&portdev->ports_lock, flags); - list_for_each_entry(port, &portdev->ports, list) - if (port->in_vq == vq || port->out_vq == vq) - goto out; - port = NULL; -out: - spin_unlock_irqrestore(&portdev->ports_lock, flags); - return port; + return vq->vdev_priv; } static bool is_console_port(struct port *port) @@ -1159,6 +1149,8 @@ static int add_port(struct ports_device *portdev, u32...
2010 Feb 12
4
[PATCH 0/6] virtio: console: Fixes
...res the data elements of vqs are properly initialised at allocation-time so that we don't trigger BUG_ONs. I found this when hot-unplugging ports and there was just one unused buffer. detach_unused_buffers() kept returning pointers that were invalid. I didn't catch this earlier as I had the in_vq filled completely. Patches 2, 4 and 5 can be folded into the series as they are bugfixes for the functionality present there. About patch 5: When running a test that transfers a 260M file from the host to the guest, qemu-kvm.git takes 17m with a single outstanding buffer in the in_vq vs. 1m when...
2010 Feb 12
4
[PATCH 0/6] virtio: console: Fixes
...res the data elements of vqs are properly initialised at allocation-time so that we don't trigger BUG_ONs. I found this when hot-unplugging ports and there was just one unused buffer. detach_unused_buffers() kept returning pointers that were invalid. I didn't catch this earlier as I had the in_vq filled completely. Patches 2, 4 and 5 can be folded into the series as they are bugfixes for the functionality present there. About patch 5: When running a test that transfers a 260M file from the host to the guest, qemu-kvm.git takes 17m with a single outstanding buffer in the in_vq vs. 1m when...
2019 Nov 06
0
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...chardev=serial0,id=serial0,name=serial0 > kernel error: > virtio-ports vport2p2: Error allocating inbufs > qemu error: > virtio-serial-bus: Guest failure in adding port 2 for device \ > virtio-serial0.0 > > This happens because buffers for the in_vq are allocated when the port is > added but are not released when the port is unplugged. > > They are only released when virtconsole is removed (see a7a69ec0d8e4) > > To avoid the problem and to be symmetric, we could allocate all the buffers > in init_vqs() as they are released...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...ames[vq_num] = "serial-input"; > + io_names[vq_num + 1] = "serial-output"; > + err = portdev->vdev->config->find_vqs(portdev->vdev, nr_queues, vqs, > + io_callbacks, > + (const char **)io_names); > + if (err) > + goto free; > + portdev->in_vqs[id] = vqs[vq_num]; > + portdev->out_vqs[id] = vqs[vq_num + 1]; I don't think this approach will work fine for port hot-plug / hot-unplug cases at all. For example, I first start qemu with one port, at id 1. Then I add a port at id 5, then at 2, then at 10. Will that be fine? > + &...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...ames[vq_num] = "serial-input"; > + io_names[vq_num + 1] = "serial-output"; > + err = portdev->vdev->config->find_vqs(portdev->vdev, nr_queues, vqs, > + io_callbacks, > + (const char **)io_names); > + if (err) > + goto free; > + portdev->in_vqs[id] = vqs[vq_num]; > + portdev->out_vqs[id] = vqs[vq_num + 1]; I don't think this approach will work fine for port hot-plug / hot-unplug cases at all. For example, I first start qemu with one port, at id 1. Then I add a port at id 5, then at 2, then at 10. Will that be fine? > + &...
2019 Nov 06
0
[PATCH] virtio_console: allocate inbufs in add_port() only if it is needed
...kernel error: > >> virtio-ports vport2p2: Error allocating inbufs > >> qemu error: > >> virtio-serial-bus: Guest failure in adding port 2 for device \ > >> virtio-serial0.0 > >> > >> This happens because buffers for the in_vq are allocated when the port is > >> added but are not released when the port is unplugged. > >> > >> They are only released when virtconsole is removed (see a7a69ec0d8e4) > >> > >> To avoid the problem and to be symmetric, we could allocate all the buffe...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
...static int add_port(struct ports_device *portdev, u32 id) > > > spin_lock_init(&port->outvq_lock); > > > init_waitqueue_head(&port->waitqueue); > > > > > > + virtio_device_ready(portdev->vdev); > > > + > > > /* Fill the in_vq with buffers so the host can send us data. */ > > > nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > > > if (!nr_added_bufs) { > > > > Seems like probe and add_port() now both set VIRTIO_CONFIG_S_DRIVER_OK > > I think we need to set t...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
...static int add_port(struct ports_device *portdev, u32 id) > > > spin_lock_init(&port->outvq_lock); > > > init_waitqueue_head(&port->waitqueue); > > > > > > + virtio_device_ready(portdev->vdev); > > > + > > > /* Fill the in_vq with buffers so the host can send us data. */ > > > nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > > > if (!nr_added_bufs) { > > > > Seems like probe and add_port() now both set VIRTIO_CONFIG_S_DRIVER_OK > > I think we need to set t...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...s=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 kernel error: virtio-ports vport2p2: Error allocating inbufs qemu error: virtio-serial-bus: Guest failure in adding port 2 for device \ virtio-serial0.0 This happens because buffers for the in_vq are allocated when the port is added but are not released when the port is unplugged. They are only released when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...s=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 kernel error: virtio-ports vport2p2: Error allocating inbufs qemu error: virtio-serial-bus: Guest failure in adding port 2 for device \ virtio-serial0.0 This happens because buffers for the in_vq are allocated when the port is added but are not released when the port is unplugged. They are only released when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
...+ b/drivers/char/virtio_console.c > @@ -1449,6 +1449,8 @@ static int add_port(struct ports_device *portdev, u32 id) > spin_lock_init(&port->outvq_lock); > init_waitqueue_head(&port->waitqueue); > > + virtio_device_ready(portdev->vdev); > + > /* Fill the in_vq with buffers so the host can send us data. */ > nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > if (!nr_added_bufs) { Seems like probe and add_port() now both set VIRTIO_CONFIG_S_DRIVER_OK 1.839658] kernel BUG at include/linux/virtio_config.h:125! [ 1.8399...
2014 Oct 20
4
[PATCH v4 13/25] virtio_console: enable VQs early
...+ b/drivers/char/virtio_console.c > @@ -1449,6 +1449,8 @@ static int add_port(struct ports_device *portdev, u32 id) > spin_lock_init(&port->outvq_lock); > init_waitqueue_head(&port->waitqueue); > > + virtio_device_ready(portdev->vdev); > + > /* Fill the in_vq with buffers so the host can send us data. */ > nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock); > if (!nr_added_bufs) { Seems like probe and add_port() now both set VIRTIO_CONFIG_S_DRIVER_OK 1.839658] kernel BUG at include/linux/virtio_config.h:125! [ 1.8399...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...s=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 kernel error: virtio-ports vport2p2: Error allocating inbufs qemu error: virtio-serial-bus: Guest failure in adding port 2 for device \ virtio-serial0.0 This happens because buffers for the in_vq are allocated when the port is added but are not released when the port is unplugged. They are only released when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...s=virtio-serial0.0,nr=2,\ chardev=serial0,id=serial0,name=serial0 kernel error: virtio-ports vport2p2: Error allocating inbufs qemu error: virtio-serial-bus: Guest failure in adding port 2 for device \ virtio-serial0.0 This happens because buffers for the in_vq are allocated when the port is added but are not released when the port is unplugged. They are only released when virtconsole is removed (see a7a69ec0d8e4) To avoid the problem and to be symmetric, we could allocate all the buffers in init_vqs() as they are released in remove_vqs(), but it sounds...