mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
98b19252cf
commit
6663a1956e
2 changed files with 100 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue