search for: virtio_console_control

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

2016 Aug 30
0
[PATCH] virtio_console: Stop doing DMA on the stack
...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 *portdev, u32 port_id, unsigned int event, unsigned int value) { struct scatterlist sg[1]; - struct virtio_console_control...
2016 Aug 30
0
[PATCH] virtio_console: Stop doing DMA on the stack
...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 *portdev, u32 port_id, unsigned int event, unsigned int value) { struct scatterlist sg[1]; - struct virtio_console_control...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
..._UAPI_LINUX_VIRTIO_CONSOLE_H #define _UAPI_LINUX_VIRTIO_CONSOLE_H #include <linux/types.h> +#include <linux/virtio_types.h> #include <linux/virtio_ids.h> #include <linux/virtio_config.h> @@ -58,9 +59,9 @@ struct virtio_console_config { * particular port. */ struct virtio_console_control { - __u32 id; /* Port number */ - __u16 event; /* The kind of control event (see below) */ - __u16 value; /* Extra information for the key */ + __virtio32 id; /* Port number */ + __virtio16 event; /* The kind of control event (see below) */ + __virtio16 value; /* Extra information for the key *...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
..._UAPI_LINUX_VIRTIO_CONSOLE_H #define _UAPI_LINUX_VIRTIO_CONSOLE_H #include <linux/types.h> +#include <linux/virtio_types.h> #include <linux/virtio_ids.h> #include <linux/virtio_config.h> @@ -58,9 +59,9 @@ struct virtio_console_config { * particular port. */ struct virtio_console_control { - __u32 id; /* Port number */ - __u16 event; /* The kind of control event (see below) */ - __u16 value; /* Extra information for the key */ + __virtio32 id; /* Port number */ + __virtio16 event; /* The kind of control event (see below) */ + __virtio16 value; /* Extra information for the key *...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...0] & (1 << VIRTIO_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,...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...0] & (1 << VIRTIO_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,...
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
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
2009 Aug 25
3
Extending virtio_console to support multiple ports
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. There are a few items on my
2009 Aug 25
3
Extending virtio_console to support multiple ports
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. There are a few items on my
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
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 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
2009 Sep 29
0
[PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
...a; + poll_wait(filp, &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
...a; + poll_wait(filp, &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...