Received: from eggs.gnu.org ([2001:4830:134:3::10]:53205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0z8n-00028f-9w for qemu-devel@nongnu.org; Sat, 28 Jun 2014 16:22:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0z8h-0003pQ-Qk for qemu-devel@nongnu.org; Sat, 28 Jun 2014 16:22:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0z8h-0003oU-Ip for qemu-devel@nongnu.org; Sat, 28 Jun 2014 16:22:23 -0400 From: Bandan Das References: <1403788203-9364-1-git-send-email-pbonzini@redhat.com> <87a98y2566.fsf@blackfin.pond.sub.org> <53AD2CE7.2000200@suse.de> Date: Sat, 28 Jun 2014 16:22:19 -0400 In-Reply-To: <53AD2CE7.2000200@suse.de> ("Andreas \=\?utf-8\?Q\?F\=C3\=A4rber\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Fri, 27 Jun 2014 10:35:51 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for 2.1] qdev: correctly send DEVICE_DELETED for recursively-deleted devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: Paolo Bonzini , Markus Armbruster , qemu-devel@nongnu.org Andreas F=C3=A4rber writes: > Am 27.06.2014 09:16, schrieb Markus Armbruster: >> Paolo Bonzini writes: >>=20 >>> When a device is unparented (i.e. made completely hidden from managemen= t) >>> 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=3D=3Dfalse 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. >>=20 >> Suggest to add "Broken in commit 5942a19" here, to make it clear that >> it's a recent regression. > > I vaguely recall that something like this was in Bandan's RFC (that I > assume the above commit forward-ported, the subject would be handy to > mention too), but once again without any explanation why, so I saw no > need to apply that during hardfreeze. Thanks for pointing it out, yes, I believe that my RFC had this case covered. (For historical accuracy) Can we please include a link to the RFC in the commit message ? Thanks, Bandan > Andreas > >>> Reported-by: Markus Armbruster >>> Signed-off-by: Paolo Bonzini >> Reviewed-by: Markus Armbruster