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

virtio-serial: Propagate errors in initialising ports / devices in guest

If adding of ports or devices in the guest fails we can send out a QMP
event so that management software can deal with it.
Signed-off-by: NAmit Shah <amit.shah@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 71c092e9
......@@ -223,6 +223,11 @@ static void handle_control_message(VirtIOSerial *vser, void *buf)
switch(cpkt.event) {
case VIRTIO_CONSOLE_DEVICE_READY:
if (!cpkt.value) {
error_report("virtio-serial-bus: Guest failure in adding device %s\n",
vser->bus->qbus.name);
break;
}
/*
* The device is up, we can now tell the device about all the
* ports we have here.
......@@ -233,6 +238,11 @@ static void handle_control_message(VirtIOSerial *vser, void *buf)
break;
case VIRTIO_CONSOLE_PORT_READY:
if (!cpkt.value) {
error_report("virtio-serial-bus: Guest failure in adding port %u for device %s\n",
port->id, vser->bus->qbus.name);
break;
}
/*
* Now that we know the guest asked for the port name, we're
* sure the guest has initialised whatever state is necessary
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册