Files
qemu/hw
Paolo Bonzini 352e8da743 qdev: correctly send DEVICE_DELETED for recursively-deleted devices
When a device is unparented (i.e. made completely hidden from management)
we want to send a DEVICE_DELETED event only if the device actually was
realized.  This avoids raising DEVICE_DELETED events when device_add
fails.

However, this does not work right for recursively-deleted
devices: the whole tree is _first_ unrealized, _then_ unparented.
Then device_unparent sees realized==false and fails to trigger
the event.  The solution is simply to move have_realized into
the DeviceState struct.  If device_add fails, we never set the
new field to true and DEVICE_DELETED is not sent.

Fixes qemu-iotests testcase 067 (broken by commit 5942a19, though that
commit in turn fixed a possible segfault in the same test).

Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-07-01 10:20:42 +02:00
..
2014-06-23 11:12:28 -04:00
2014-06-23 11:01:24 -04:00
2013-12-24 18:02:18 +01:00
2014-06-20 16:22:07 +01:00
2014-06-23 11:01:25 -04:00
2014-06-24 20:01:24 +04:00
2014-06-27 13:48:26 +02:00
2014-06-19 18:44:22 +03:00
2014-05-28 17:36:21 +02:00
2014-06-20 23:40:16 +02:00
2014-06-30 09:56:08 -06:00
2014-06-29 19:39:43 +03:00
2014-06-27 13:48:22 +02:00
2014-06-23 17:49:49 +03:00
2014-06-27 13:48:24 +02:00
2014-06-10 09:50:27 +02:00
2014-05-28 17:36:21 +02:00
2013-08-22 19:10:27 +02:00
2014-06-27 09:27:56 -04:00