Displaying 20 results from an estimated 50 matches for "handle_control_messag".
Did you mean:
handle_control_message
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
...t_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 *portdev,
struct port_buffer *buf)
{
struct virtio_console_control *cpkt;
@@ -1612,15 +1613,16 @@ static void handle_control_message(struct ports_device *portdev,...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
...t_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 *portdev,
struct port_buffer *buf)
{
struct virtio_console_control *cpkt;
@@ -1612,15 +1613,16 @@ static void handle_control_message(struct ports_device *portdev,...
2020 Apr 14
1
[PATCH v2] Fix: buffer overflow during hvc_alloc().
...0 CR3: 00000003a023c000 CR4: 00000000003406f0
[ 81.537283] Call Trace:
[ 81.537763] __raw_callee_save___pv_queued_spin_unlock_slowpath+0x11/0x20
[ 81.539011] .slowpath+0x9/0xe
[ 81.539585] hvc_alloc+0x25e/0x300
[ 81.540237] init_port_console+0x28/0x100 [virtio_console]
[ 81.541251] handle_control_message.constprop.27+0x1c4/0x310 [virtio_console]
[ 81.542546] control_work_handler+0x70/0x10c [virtio_console]
[ 81.543601] process_one_work+0x1a7/0x3b0
[ 81.544356] worker_thread+0x30/0x390
[ 81.545025] ? create_worker+0x1a0/0x1a0
[ 81.545749] kthread+0x112/0x130
[ 81.546358] ? kthread...
2016 Dec 06
0
[PATCH 01/10] virtio_console: drop unused config fields
...inlock_t c_ovq_lock;
- /* The current config space is stored here */
- struct virtio_console_config config;
+ /* max. number of ports this device can hold */
+ u32 max_nr_ports;
/* The virtio device we're associated with */
struct virtio_device *vdev;
@@ -1649,11 +1649,11 @@ static void handle_control_message(struct virtio_device *vdev,
break;
}
if (virtio32_to_cpu(vdev, cpkt->id) >=
- portdev->config.max_nr_ports) {
+ portdev->max_nr_ports) {
dev_warn(&portdev->vdev->dev,
"Request for adding port with "
"out-of-bound id %u, max. su...
2010 Mar 23
0
[PATCH 09/11] virtio: console: Don't always create a port 0 if using multiport
...nnected = true;
+ /*
+ * Start using the new console output if this is the first
+ * console to come up.
+ */
+ if (early_put_chars)
+ early_put_chars = NULL;
+
/* Notify host of port being opened */
send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 1);
@@ -1056,14 +1063,8 @@ static void handle_control_message(struct ports_device *portdev,
switch (cpkt->event) {
case VIRTIO_CONSOLE_PORT_ADD:
if (port) {
- /*
- * This can happen for port 0: we have to
- * create a console port during probe() as was
- * the behaviour before the MULTIPORT feature.
- * On a newer host, when the host...
2010 Mar 23
0
[PATCH 09/11] virtio: console: Don't always create a port 0 if using multiport
...nnected = true;
+ /*
+ * Start using the new console output if this is the first
+ * console to come up.
+ */
+ if (early_put_chars)
+ early_put_chars = NULL;
+
/* Notify host of port being opened */
send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 1);
@@ -1056,14 +1063,8 @@ static void handle_control_message(struct ports_device *portdev,
switch (cpkt->event) {
case VIRTIO_CONSOLE_PORT_ADD:
if (port) {
- /*
- * This can happen for port 0: we have to
- * create a console port during probe() as was
- * the behaviour before the MULTIPORT feature.
- * On a newer host, when the host...
2013 Jul 25
0
[PATCH v3 8/9] virtio: console: fix locking around send_sigio_to_port()
...ers/char/virtio_console.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index e8b707d..4e380c1 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1670,7 +1670,9 @@ static void handle_control_message(struct ports_device *portdev,
* If the guest is connected, it'll be interested in
* knowing the host connection state changed.
*/
+ spin_lock_irq(&port->inbuf_lock);
send_sigio_to_port(port);
+ spin_unlock_irq(&port->inbuf_lock);
break;
case VIRTIO_CONSOLE_P...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...messages. */
+#define send_control_msg(port, event, value) 0
static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count)
{
@@ -882,142 +854,6 @@ static int remove_port(struct port *port
return 0;
}
-/* Any private messages that the Host and Guest want to share */
-static void handle_control_message(struct ports_device *portdev,
- struct port_buffer *buf)
-{
- struct virtio_console_control *cpkt;
- struct port *port;
- size_t name_size;
- int err;
-
- cpkt = (struct virtio_console_control *)(buf->buf + buf->offset);
-
- port = find_port_by_id(portdev, cpkt->id);
- if (!port) {...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...messages. */
+#define send_control_msg(port, event, value) 0
static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count)
{
@@ -882,142 +854,6 @@ static int remove_port(struct port *port
return 0;
}
-/* Any private messages that the Host and Guest want to share */
-static void handle_control_message(struct ports_device *portdev,
- struct port_buffer *buf)
-{
- struct virtio_console_control *cpkt;
- struct port *port;
- size_t name_size;
- int err;
-
- cpkt = (struct virtio_console_control *)(buf->buf + buf->offset);
-
- port = find_port_by_id(portdev, cpkt->id);
- if (!port) {...
2010 Sep 02
4
[PATCH 0/3] virtio: console: async notifications for host connect / disconnect
Hey Rusty,
This patchset is on top of the previous one.
It sends a SIGIO signal to apps that request signals for host
activity. SIGIO is sent on host connect, disconnect as well as
hot-unplug (which can be seen as a special case of host disconnect).
Tested using several testcases in the test-virtserial repo:
http://fedorapeople.org/gitweb?p=amitshah/public_git/test-virtserial.git
Please apply.
2010 Sep 02
4
[PATCH 0/3] virtio: console: async notifications for host connect / disconnect
Hey Rusty,
This patchset is on top of the previous one.
It sends a SIGIO signal to apps that request signals for host
activity. SIGIO is sent on host connect, disconnect as well as
hot-unplug (which can be seen as a special case of host disconnect).
Tested using several testcases in the test-virtserial repo:
http://fedorapeople.org/gitweb?p=amitshah/public_git/test-virtserial.git
Please apply.
2010 Mar 19
3
[PATCH 0/6] virtio: console: Fixes, abi update
Hello,
These patches fix a couple of small issues:
- generate a kobject change event so that udev is woken up on name
changes
- fix a crash after hot-unplug of the first console port and a
subsequent config update
But majorly, it reworks how ports are discovered: instead of numbering
the ports individually in the host and the guest by just incrementing
a number, we now switch to a
2010 Mar 19
3
[PATCH 0/6] virtio: console: Fixes, abi update
Hello,
These patches fix a couple of small issues:
- generate a kobject change event so that udev is woken up on name
changes
- fix a crash after hot-unplug of the first console port and a
subsequent config update
But majorly, it reworks how ports are discovered: instead of numbering
the ports individually in the host and the guest by just incrementing
a number, we now switch to a
2010 Aug 26
5
[PATCH 0/4] virtio: console: fixes, SIGIO
Hi Rusty,
The main thing in these patches is the introduction of injecting SIGIO
on host-side connect/disconnect events and when new data is available
for ports.
The first two patches fix bugs that I haven't seen, but look like the
right thing to do.
These have been tested extensively using the test-virtserial test
suite.
Please apply,
Amit.
Amit Shah (4):
virtio: console: Un-block
2010 Aug 26
5
[PATCH 0/4] virtio: console: fixes, SIGIO
Hi Rusty,
The main thing in these patches is the introduction of injecting SIGIO
on host-side connect/disconnect events and when new data is available
for ports.
The first two patches fix bugs that I haven't seen, but look like the
right thing to do.
These have been tested extensively using the test-virtserial test
suite.
Please apply,
Amit.
Amit Shah (4):
virtio: console: Un-block
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.
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
2020 Apr 06
0
[PATCH] Fix: buffer overflow during hvc_alloc().
...00003406f0
> [ 81.537283] Call Trace:
> [ 81.537763]
> __raw_callee_save___pv_queued_spin_unlock_slowpath+0x11/0x20
> [ 81.539011] .slowpath+0x9/0xe
> [ 81.539585] hvc_alloc+0x25e/0x300
> [ 81.540237] init_port_console+0x28/0x100 [virtio_console]
> [ 81.541251] handle_control_message.constprop.27+0x1c4/0x310
> [virtio_console]
> [ 81.542546] control_work_handler+0x70/0x10c [virtio_console]
> [ 81.543601] process_one_work+0x1a7/0x3b0
> [ 81.544356] worker_thread+0x30/0x390
> [ 81.545025] ? create_worker+0x1a0/0x1a0
> [ 81.545749] kthread+0x112/0...