提交 f146ec9a 编写于 作者: A Amit Shah 提交者: Anthony Liguori

virtio-serial-bus: Add ability to hot-unplug ports

Signed-off-by: NAmit Shah <amit.shah@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 160600fd
......@@ -520,6 +520,8 @@ static int virtser_port_qdev_exit(DeviceState *qdev)
VirtIOSerialPort *port = DO_UPCAST(VirtIOSerialPort, dev, &dev->qdev);
VirtIOSerial *vser = port->vser;
send_control_event(port, VIRTIO_CONSOLE_PORT_REMOVE, 1);
/*
* Don't decrement nr_ports here; thus we keep a linearly
* increasing port id. Not utilising an id again saves us a couple
......
......@@ -51,6 +51,7 @@ struct virtio_console_control {
#define VIRTIO_CONSOLE_RESIZE 2
#define VIRTIO_CONSOLE_PORT_OPEN 3
#define VIRTIO_CONSOLE_PORT_NAME 4
#define VIRTIO_CONSOLE_PORT_REMOVE 5
/* == In-qemu interface == */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册