From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF76U-0007hO-0d for qemu-devel@nongnu.org; Mon, 11 Mar 2013 14:05:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF76K-0007vj-DP for qemu-devel@nongnu.org; Mon, 11 Mar 2013 14:05:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF76K-0007vb-4e for qemu-devel@nongnu.org; Mon, 11 Mar 2013 14:05:32 -0400 Date: Mon, 11 Mar 2013 20:05:51 +0200 From: "Michael S. Tsirkin" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCHv5 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?PT91dGYtOD9RP0Y9QzM9QTRyYmVyPz0=?= 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 for devices with ID, second path adds it for all devices and adds a path fields. Split this way for ease of backport (stable downstreams without QOM would want to only take the first patch), and also because the 2nd/3rd patches might turn out to be more controversial - if they really turn out such I'd like just the 1st one to get applied while we discuss 2 and 3. Signed-off-by: Michael S. Tsirkin 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