From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG7S4-0008KN-OE for qemu-devel@nongnu.org; Thu, 14 Mar 2013 08:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG7Rx-0000el-Lr for qemu-devel@nongnu.org; Thu, 14 Mar 2013 08:40:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG7Rx-0000d2-Ci for qemu-devel@nongnu.org; Thu, 14 Mar 2013 08:40:01 -0400 Date: Thu, 14 Mar 2013 14:40:18 +0200 From: "Michael S. Tsirkin" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH v8 0/3] DEVICE_DELETED event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Markus Armbruster Cc: Kevin Wolf , Eduardo Habkost , libvir-list@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffmann , Paolo Bonzini , Andreas =?us-ascii?B?PT91cy1hc2NpaT9RPz0zRD0zRnVzLWFzY2lpPTNGQj0zRlBU?= =?us-ascii?Q?91dGYtOD9RP0Y9QzM9QTRyYmVy=3F=3D_=3D=3Fus-ascii=3FB=3FUHowPT?= =?us-ascii?Q?89=3F=3D?= libvirt has a long-standing bug: when removing the device, it can request removal but does not know when the removal completes. Add an event so we can fix this in a robust way. First patch only adds the event with ID, second patch adds a path field. Split this way for ease of backport (stable downstreams without QOM would want to only take the first patch). Event without fields is still useful as management can use it to poll device list to figure out which device was removed. Signed-off-by: Michael S. Tsirkin If there are no more comments I'll stick this on my pci branch. Changes from v7: - none, v7 was malformed series sent by mistake Changes from v6: - make empty event use data: {}, Markus prefers this Changes from v5: - Emit an empty event on unnamed devices in patch 1/3, as suggested by Markus Changes from v4: - Add extra triggers and extra fields as requested by Markus Changes from v3: - Document that we only emit events for devices with and ID, as suggested by Markus Changes from v2: - move event toward the end of device_unparent, so that parents are reported after their children, as suggested by Paolo Changes from v1: - move to device_unparent - address comments by Andreas and Eric -- Anthony Liguori Michael S. Tsirkin (3): qdev: DEVICE_DELETED event qom: pass original path to unparent method qmp: add path to device_deleted event QMP/qmp-events.txt | 18 ++++++++++++++++++ hw/qdev.c | 15 +++++++++++++-- include/monitor/monitor.h | 1 + include/qom/object.h | 3 ++- monitor.c | 1 + qapi-schema.json | 4 +++- qom/object.c | 4 +++- 7 files changed, 41 insertions(+), 5 deletions(-) -- MST