mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-25 02:52:06 -06:00
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: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
71c092e92b
commit
4048c7c321
1 changed files with 10 additions and 0 deletions
|
@ -223,6 +223,11 @@ static void handle_control_message(VirtIOSerial *vser, void *buf)
|
||||||
|
|
||||||
switch(cpkt.event) {
|
switch(cpkt.event) {
|
||||||
case VIRTIO_CONSOLE_DEVICE_READY:
|
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
|
* The device is up, we can now tell the device about all the
|
||||||
* ports we have here.
|
* ports we have here.
|
||||||
|
@ -233,6 +238,11 @@ static void handle_control_message(VirtIOSerial *vser, void *buf)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIRTIO_CONSOLE_PORT_READY:
|
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
|
* Now that we know the guest asked for the port name, we're
|
||||||
* sure the guest has initialised whatever state is necessary
|
* sure the guest has initialised whatever state is necessary
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue