qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Bandan Das <bsd@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for 2.1] qdev: correctly send DEVICE_DELETED for recursively-deleted devices
Date: Fri, 27 Jun 2014 10:35:51 +0200	[thread overview]
Message-ID: <53AD2CE7.2000200@suse.de> (raw)
In-Reply-To: <87a98y2566.fsf@blackfin.pond.sub.org>

Am 27.06.2014 09:16, schrieb Markus Armbruster:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> 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.
> 
> 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.

Andreas

>> Reported-by: Markus Armbruster <armbru@redhat.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-06-27  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 13:10 [Qemu-devel] [PATCH for 2.1] qdev: correctly send DEVICE_DELETED for recursively-deleted devices Paolo Bonzini
2014-06-27  7:16 ` Markus Armbruster
2014-06-27  8:35   ` Andreas Färber [this message]
2014-06-28 20:22     ` Bandan Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53AD2CE7.2000200@suse.de \
    --to=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=bsd@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).