search for: cpkt

Displaying 20 results from an estimated 61 matches for "cpkt".

2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
...har/virtio_console.c b/drivers/char/virtio_console.c index 8d00aa7..775c898 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -566,9 +566,9 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id, 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_...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
...har/virtio_console.c b/drivers/char/virtio_console.c index 8d00aa7..775c898 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -566,9 +566,9 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id, 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_...
2016 Aug 30
0
[PATCH] virtio_console: Stop doing DMA on the stack
...012 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 *portdev, u32 port_id, unsigned int event, unsigned int value) { struct scatterlist sg[1]; - struct virtio_console_control cpkt;...
2016 Aug 30
0
[PATCH] virtio_console: Stop doing DMA on the stack
...012 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 *portdev, u32 port_id, unsigned int event, unsigned int value) { struct scatterlist sg[1]; - struct virtio_console_control cpkt;...
2009 Oct 12
1
[PATCH v8 0/1] virtio_console: Add support for multiple console ports and generic serial ports
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. To maintain backward compatibility, the first port to be spawned (port at id 0) is to be a console port, to be bound to hvc. This keeps new
2009 Oct 12
1
[PATCH v8 0/1] virtio_console: Add support for multiple console ports and generic serial ports
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. To maintain backward compatibility, the first port to be spawned (port at id 0) is to be a console port, to be bound to hvc. This keeps new
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...RTIO_CONSOLE_F_MULTIPORT); + return false; } static void free_buf(struct port_buffer *buf) @@ -373,31 +368,8 @@ out: return ret; } -static ssize_t send_control_msg(struct port *port, unsigned int event, - 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,...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...RTIO_CONSOLE_F_MULTIPORT); + return false; } static void free_buf(struct port_buffer *buf) @@ -373,31 +368,8 @@ out: return ret; } -static ssize_t send_control_msg(struct port *port, unsigned int event, - 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,...
2009 Oct 20
1
[PATCH v9 0/1] virtio-console: Support for generic ports and multiple consoles
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. To maintain backward compatibility, the first port to be spawned (port at id 0) is to be a console port, to be bound to hvc. This keeps new
2009 Oct 20
1
[PATCH v9 0/1] virtio-console: Support for generic ports and multiple consoles
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. To maintain backward compatibility, the first port to be spawned (port at id 0) is to be a console port, to be bound to hvc. This keeps new
2009 Nov 03
3
[PATCH v10 0/1] virtio-console: Support for generic ports and multiple consoles
(Rusty, would it improve the chances of getting this patch in your tree if this description were written with latex instead of without it?) Here is a new iteration of the patch series that implements a transport for guest and host communications. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. To maintain
2009 Nov 03
3
[PATCH v10 0/1] virtio-console: Support for generic ports and multiple consoles
(Rusty, would it improve the chances of getting this patch in your tree if this description were written with latex instead of without it?) Here is a new iteration of the patch series that implements a transport for guest and host communications. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. To maintain
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
2009 Sep 29
0
[PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
...mp;port->waitqueue, wait); + + ret = 0; + if (!list_empty(&port->readbuf_head)) + ret |= POLLIN | POLLRDNORM; + if (!port->host_connected) + ret |= POLLHUP; + + return ret; +} + +static int virtconsole_release(struct inode *inode, struct file *filp) +{ + struct virtio_console_control cpkt; + + /* Notify host of port being closed */ + cpkt.event = VIRTIO_CONSOLE_PORT_OPEN; + cpkt.value = 0; + send_buf(filp->private_data, (char *)&cpkt, sizeof(cpkt), + VIRTIO_CONSOLE_ID_INTERNAL, false); + return 0; +} + +static int virtconsole_open(struct inode *inode, struct file *filp) +{...
2009 Sep 29
0
[PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
...mp;port->waitqueue, wait); + + ret = 0; + if (!list_empty(&port->readbuf_head)) + ret |= POLLIN | POLLRDNORM; + if (!port->host_connected) + ret |= POLLHUP; + + return ret; +} + +static int virtconsole_release(struct inode *inode, struct file *filp) +{ + struct virtio_console_control cpkt; + + /* Notify host of port being closed */ + cpkt.event = VIRTIO_CONSOLE_PORT_OPEN; + cpkt.value = 0; + send_buf(filp->private_data, (char *)&cpkt, sizeof(cpkt), + VIRTIO_CONSOLE_ID_INTERNAL, false); + return 0; +} + +static int virtconsole_open(struct inode *inode, struct file *filp) +{...
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
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.
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.