diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-01-20 00:36:53 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-01-20 08:25:23 -0600 |
commit | 6663a1956eb628f1bddc96d2cab361e039df5571 (patch) | |
tree | 6129b7448ac9e125b9e1a298283e3d56fa3f44b7 /hw/virtio-serial.h | |
parent | 98b19252cf1bd97c54bc4613f3537c5ec0aae263 (diff) |
virtio-serial-bus: Maintain guest and host port open/close state
Via control channel messages, the guest can tell us whether a port got
opened or closed. Similarly, we can also indicate to the guest of host
port open/close events.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-serial.h')
-rw-r--r-- | hw/virtio-serial.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h index fe8e357a75..d9c7acba3d 100644 --- a/hw/virtio-serial.h +++ b/hw/virtio-serial.h @@ -49,6 +49,7 @@ struct virtio_console_control { #define VIRTIO_CONSOLE_PORT_READY 0 #define VIRTIO_CONSOLE_CONSOLE_PORT 1 #define VIRTIO_CONSOLE_RESIZE 2 +#define VIRTIO_CONSOLE_PORT_OPEN 3 /* == In-qemu interface == */ @@ -92,6 +93,11 @@ struct VirtIOSerialPort { /* Identify if this is a port that binds with hvc in the guest */ uint8_t is_console; + + /* Is the corresponding guest device open? */ + bool guest_connected; + /* Is this device open for IO on the host? */ + bool host_connected; }; struct VirtIOSerialPortInfo { |