search for: c_ovq

Displaying 20 results from an estimated 30 matches for "c_ovq".

Did you mean: c_ivq
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock to c_ivq_lock virtio: console: add locking around c_ovq operations drivers/char/virtio_console.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+),...
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock to c_ivq_lock virtio: console: add locking around c_ovq operations drivers/char/virtio_console.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+),...
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq. Pointed out by Wanlong Gao. Amit Shah (2): virtio: console: rename cvq_lock to c_ivq_lock virtio: console: add locking around c_ovq operations drivers/char/vir...
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq. Pointed out by Wanlong Gao. Amit Shah (2): virtio: console: rename cvq_lock to c_ivq_lock virtio: console: add locking around c_ovq operations drivers/char/vir...
2016 Aug 30
0
[PATCH] virtio_console: Stop doing DMA on the stack
..., 15 insertions(+), 8 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index d2406fe25533..5da47e26a012 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -165,6 +165,12 @@ struct ports_device { */ struct virtqueue *c_ivq, *c_ovq; + /* + * A control packet buffer for guest->host requests, protected + * by c_ovq_lock. + */ + struct virtio_console_control cpkt; + /* Array of per-port IO virtqueues */ struct virtqueue **in_vqs, **out_vqs; @@ -560,28 +566,29 @@ static ssize_t __send_control_msg(struct ports_device...
2016 Aug 30
0
[PATCH] virtio_console: Stop doing DMA on the stack
..., 15 insertions(+), 8 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index d2406fe25533..5da47e26a012 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -165,6 +165,12 @@ struct ports_device { */ struct virtqueue *c_ivq, *c_ovq; + /* + * A control packet buffer for guest->host requests, protected + * by c_ovq_lock. + */ + struct virtio_console_control cpkt; + /* Array of per-port IO virtqueues */ struct virtqueue **in_vqs, **out_vqs; @@ -560,28 +566,29 @@ static ssize_t __send_control_msg(struct ports_device...
2010 Apr 05
2
[PATCH 00/10] (v5) virtio: console: Fixes, new way of discovering ports
Hello, This patchset is still based on Linus' tree but I'll rebase when Rusty sends out the disable multiport patches. This series reworks the ABI to allow port discovery (only) via the control queue. In addition, it adds support for non-blocking write() support, which means no spinning. This works fine with the recent patches that are on qemu-devel. Also included is removal of
2010 Apr 05
2
[PATCH 00/10] (v5) virtio: console: Fixes, new way of discovering ports
Hello, This patchset is still based on Linus' tree but I'll rebase when Rusty sends out the disable multiport patches. This series reworks the ABI to allow port discovery (only) via the control queue. In addition, it adds support for non-blocking write() support, which means no spinning. This works fine with the recent patches that are on qemu-devel. Also included is removal of
2010 Apr 08
3
[PATCH 00/11] (v6) virtio: console: Fixes, new way of discovering ports
Hello, This series reworks the ABI to allow port discovery (only) via the control queue and enable multiport again. In addition, it adds support for non-blocking write() support, which means no spinning. This works fine with the recent patches that are on qemu-devel. Also included is removal of hvc_remove() as removing one such console port causes other console ports (registered with hvc) to
2010 Apr 08
3
[PATCH 00/11] (v6) virtio: console: Fixes, new way of discovering ports
Hello, This series reworks the ABI to allow port discovery (only) via the control queue and enable multiport again. In addition, it adds support for non-blocking write() support, which means no spinning. This works fine with the recent patches that are on qemu-devel. Also included is removal of hvc_remove() as removing one such console port causes other console ports (registered with hvc) to
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty, These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also allows write()s to write more to the host in one go, removingthe 4k limitation. I do limit the writes to 32k at once to not put too much
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty, These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also allows write()s to write more to the host in one go, removingthe 4k limitation. I do limit the writes to 32k at once to not put too much
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
...if (!use_multiport(portdev)) return 0; - cpkt.id = port_id; - cpkt.event = event; - cpkt.value = value; + cpkt.id = cpu_to_virtio32(portdev->vdev, port_id); + cpkt.event = cpu_to_virtio16(portdev->vdev, event); + cpkt.value = cpu_to_virtio16(portdev->vdev, value); vq = portdev->c_ovq; @@ -1602,7 +1602,8 @@ static void unplug_port(struct port *port) } /* Any private messages that the Host and Guest want to share */ -static void handle_control_message(struct ports_device *portdev, +static void handle_control_message(struct virtio_device *vdev, + struct ports_device *p...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
...if (!use_multiport(portdev)) return 0; - cpkt.id = port_id; - cpkt.event = event; - cpkt.value = value; + cpkt.id = cpu_to_virtio32(portdev->vdev, port_id); + cpkt.event = cpu_to_virtio16(portdev->vdev, event); + cpkt.value = cpu_to_virtio16(portdev->vdev, value); vq = portdev->c_ovq; @@ -1602,7 +1602,8 @@ static void unplug_port(struct port *port) } /* Any private messages that the Host and Guest want to share */ -static void handle_control_message(struct ports_device *portdev, +static void handle_control_message(struct virtio_device *vdev, + struct ports_device *p...
2012 Dec 07
2
[PATCH 0/1] virtio: console: regression in virtqueue_add_buf() change
Hi Rusty, The linux-next kernel was failing my virtio-console test suite for a while. I looked into it today, and it's due to the virtqueue_add_buf() change that doesn't return > 0 values anymore. I found your commit that adjusts virtio_console.c, but you missed one instance where the return value mattered, and as a result not enough buffers were queued for the host to send in data.
2012 Dec 07
2
[PATCH 0/1] virtio: console: regression in virtqueue_add_buf() change
Hi Rusty, The linux-next kernel was failing my virtio-console test suite for a while. I looked into it today, and it's due to the virtqueue_add_buf() change that doesn't return > 0 values anymore. I found your commit that adjusts virtio_console.c, but you missed one instance where the return value mattered, and as a result not enough buffers were queued for the host to send in data.
2011 Nov 03
1
[PATCH 2 of 5] virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
..._inbuf(struct virtqueue *v sg_init_one(sg, buf->buf, buf->size); - ret = virtqueue_add_buf(vq, sg, 0, 1, buf); + ret = virtqueue_add_buf(vq, sg, 0, 1, buf, GFP_ATOMIC); virtqueue_kick(vq); return ret; } @@ -456,7 +456,7 @@ static ssize_t __send_control_msg(struct vq = portdev->c_ovq; sg_init_one(sg, &cpkt, sizeof(cpkt)); - if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt) >= 0) { + if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) >= 0) { virtqueue_kick(vq); while (!virtqueue_get_buf(vq, &len)) cpu_relax(); @@ -505,7 +505,7 @@ static ssize_t s...
2011 Nov 03
1
[PATCH 2 of 5] virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
..._inbuf(struct virtqueue *v sg_init_one(sg, buf->buf, buf->size); - ret = virtqueue_add_buf(vq, sg, 0, 1, buf); + ret = virtqueue_add_buf(vq, sg, 0, 1, buf, GFP_ATOMIC); virtqueue_kick(vq); return ret; } @@ -456,7 +456,7 @@ static ssize_t __send_control_msg(struct vq = portdev->c_ovq; sg_init_one(sg, &cpkt, sizeof(cpkt)); - if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt) >= 0) { + if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) >= 0) { virtqueue_kick(vq); while (!virtqueue_get_buf(vq, &len)) cpu_relax(); @@ -505,7 +505,7 @@ static ssize_t s...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...vent, - unsigned int value) -{ - struct scatterlist sg[1]; - struct virtio_console_control cpkt; - struct virtqueue *vq; - unsigned int len; - - if (!use_multiport(port->portdev)) - return 0; - - cpkt.id = port->id; - cpkt.event = event; - cpkt.value = value; - - vq = port->portdev->c_ovq; - - sg_init_one(sg, &cpkt, sizeof(cpkt)); - if (vq->vq_ops->add_buf(vq, sg, 1, 0, &cpkt) >= 0) { - vq->vq_ops->kick(vq); - while (!vq->vq_ops->get_buf(vq, &len)) - cpu_relax(); - } - return 0; -} +/* For when we support control messages. */ +#define send_contro...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...vent, - unsigned int value) -{ - struct scatterlist sg[1]; - struct virtio_console_control cpkt; - struct virtqueue *vq; - unsigned int len; - - if (!use_multiport(port->portdev)) - return 0; - - cpkt.id = port->id; - cpkt.event = event; - cpkt.value = value; - - vq = port->portdev->c_ovq; - - sg_init_one(sg, &cpkt, sizeof(cpkt)); - if (vq->vq_ops->add_buf(vq, sg, 1, 0, &cpkt) >= 0) { - vq->vq_ops->kick(vq); - while (!vq->vq_ops->get_buf(vq, &len)) - cpu_relax(); - } - return 0; -} +/* For when we support control messages. */ +#define send_contro...