Received: from eggs.gnu.org ([208.118.235.92]:37687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDXHa-0005IH-By for qemu-devel@nongnu.org; Thu, 07 Mar 2013 04:38:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDXHZ-0004rl-8t for qemu-devel@nongnu.org; Thu, 07 Mar 2013 04:38:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDXHZ-0004rT-0p for qemu-devel@nongnu.org; Thu, 07 Mar 2013 04:38:37 -0500 From: Markus Armbruster References: <20130306130055.GA29446@redhat.com> <51375650.1060800@redhat.com> <51375842.1090700@redhat.com> <5137638E.5000207@redhat.com> Date: Thu, 07 Mar 2013 10:38:33 +0100 In-Reply-To: <5137638E.5000207@redhat.com> (Eric Blake's message of "Wed, 06 Mar 2013 08:41:02 -0700") Message-ID: <87boavmtwm.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] qdev: DEVICE_DELETED event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , Anthony Liguori , Eduardo Habkost , "Michael S. Tsirkin" , "libvir-list@redhat.com" , Stefan Hajnoczi , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffmann , laine@redhat.com, Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= Eric Blake writes: > [adding libvirt] > > On 03/06/2013 07:52 AM, Paolo Bonzini wrote: >> Il 06/03/2013 15:44, Eric Blake ha scritto: >>> Question - if libvirt misses the event (for example, if libvirtd >>> requests a remove, but then gets restarted, and the event arrives before >>> libvirtd is back up), is there a way to poll whether the the removal has >>> completed? The event is great to minimize polling overhead in the >>> common case, but we generally provide this sort of information via a >>> pollable interface at the same time. General rule: no event without a way to poll. >> Yes, you can use qom-list on /machine/peripheral. > > Which means libvirt should be patched to use qom-list right now, even > before this event makes it in, in order to avoid its current bug of > reusing a device id before the deletion has completed. Adding the event > is still useful, as polling is never nice; and we already know how to > make libvirt do conditional code based on whether query-events shows > that the event has been added to minimize polling where possible. Yes.