From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
libvir-list@redhat.com, "Stefan Hajnoczi" <stefanha@gmail.com>,
qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v4] qdev: DEVICE_DELETED event
Date: Mon, 11 Mar 2013 19:39:29 +0200 [thread overview]
Message-ID: <20130311173929.GA29465@redhat.com> (raw)
In-Reply-To: <87vc92dndv.fsf@codemonkey.ws>
On Fri, Mar 08, 2013 at 07:36:28AM -0600, Anthony Liguori wrote:
> Markus Armbruster <armbru@redhat.com> writes:
>
> > "Michael S. Tsirkin" <mst@redhat.com> writes:
> >
> >> On Thu, Mar 07, 2013 at 08:57:52PM +0100, Markus Armbruster wrote:
> >>> "Michael S. Tsirkin" <mst@redhat.com> writes:
> >>>
> >>> > 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.
> >>> >
> >>> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >>>
> >>> Speaking as the acting QMP maintainer, just to avoid misunderstandings:
> >>> there's disagreement on the event's design, namely when it should fire,
> >>> and how it should name the device. I don't want the discussion
> >>> preempted by a commit.
> >>
> >> Yes, you are asking for more functionality, but can I add this in a
> >> follow-up commit please? I prefer this patch as is, as it can be
> >> backported to stable branches and downstreams. Upstream a follow up
> >> patch can add fields and more triggers which won't apply to any
> >> downstreams.
> >
> > If you want to address my review comments in a separate patch, go right
> > ahead. Please post both together as a series, for coherent review and
> > to simplify patch tracking.
> >
> > I'm asking for two things:
> >
> > 1. Event member path. Fair to call this "more functionality". I agree
> > that backporting it to pre-QOM versions isn't practical.
> >
> > 2. Sane event trigger condition: on any device deletion, not just when
> > the device happens to have a qdev ID. This isn't "more", it's
> > "different".
>
> Ack.
>
> Regards,
>
> Anthony Liguori
So how does one get the path that you require?
ERROR:qom/object.c:1011:object_get_canonical_path: assertion failed: (prop != NULL)
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffeffff700 (LWP 29475)]
0x00007ffff587d8a5 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install SDL-1.2.14-2.el6.x86_64 glib2-2.22.5-6.el6.x86_64 glibc-2.12-1.80.el6_3.3.x86_64 libX11-1.3-2.el6.x86_64 libXau-1.0.5-1.el6.x86_64 libpng-1.2.48-1.el6_2.x86_64 libxcb-1.5-1.el6.x86_64 ncurses-libs-5.7-3.20090208.el6.x86_64 pixman-0.18.4-1.el6_0.1.x86_64 zlib-1.2.3-27.el6.x86_64
(gdb) where
#0 0x00007ffff587d8a5 in raise () from /lib64/libc.so.6
#1 0x00007ffff587f085 in abort () from /lib64/libc.so.6
#2 0x00007ffff737ca7f in g_assertion_message () from /lib64/libglib-2.0.so.0
#3 0x00007ffff737d020 in g_assertion_message_expr () from /lib64/libglib-2.0.so.0
#4 0x00007ffff7deef76 in object_get_canonical_path (obj=0x7ffff8f1a010) at qom/object.c:1011
#5 0x00007ffff7d7abcd in device_unparent (obj=0x7ffff8f1a010) at hw/qdev.c:785
#6 0x00007ffff7dee30f in object_unparent (obj=0x7ffff8f1a010) at qom/object.c:370
#7 0x00007ffff7d093b0 in acpi_piix_eject_slot (s=0x7ffff8ed6bd0, slots=<value optimized out>)
at hw/acpi_piix4.c:306
#8 0x00007ffff7e7ae20 in access_with_adjusted_size (addr=8, value=0x7fffefffec88, size=4,
access_size_min=<value optimized out>, access_size_max=<value optimized out>, access=
0x7ffff7e7c590 <memory_region_write_accessor>, opaque=0x7ffff8ed73d8)
at /home/mst/scm/qemu/memory.c:364
#9 0x00007ffff7e7b44b in memory_region_iorange_write (iorange=<value optimized out>,
offset=<value optimized out>, width=<value optimized out>, data=128)
at /home/mst/scm/qemu/memory.c:439
#10 0x00007ffff7e7a39c in kvm_handle_io (env=0x7ffff8d27a80)
at /home/mst/scm/qemu/kvm-all.c:1432
#11 kvm_cpu_exec (env=0x7ffff8d27a80) at /home/mst/scm/qemu/kvm-all.c:1581
#12 0x00007ffff7e28971 in qemu_kvm_cpu_thread_fn (arg=0x7ffff8d27a80)
at /home/mst/scm/qemu/cpus.c:759
#13 0x00007ffff681f851 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ffff59326dd in clone () from /lib64/libc.so.6
(gdb) frame 4
#4 0x00007ffff7deef76 in object_get_canonical_path (obj=0x7ffff8f1a010) at qom/object.c:1011
1011 g_assert(prop != NULL);
(gdb) p obj
$1 = (Object *) 0x7ffff8f1a010
(gdb) p (DeviceState*)obj
$2 = (DeviceState *) 0x7ffff8f1a010
(gdb) p $2
$3 = (DeviceState *) 0x7ffff8f1a010
(gdb) p *$2
$4 = {parent_obj = {class = 0x7ffff8ede8f0, free = 0x7ffff735f5b0 <g_free>, properties = {
tqh_first = 0x7ffff8eec8a0, tqh_last = 0x7ffff8f1dc00}, ref = 1, parent =
0x7ffff8c81d00}, id = 0x7ffff8ba6710 "bah", realized = true, opts = 0x7ffff8ba66c0,
hotplugged = 0, parent_bus = 0x0, num_gpio_out = 0, gpio_out = 0x0, num_gpio_in = 0,
gpio_in = 0x0, child_bus = {lh_first = 0x0}, num_child_bus = 0, instance_id_alias = -1,
alias_required_for_version = 0}
(gdb)
$5 = {parent_obj = {class = 0x7ffff8ede8f0, free = 0x7ffff735f5b0 <g_free>, properties = {
tqh_first = 0x7ffff8eec8a0, tqh_last = 0x7ffff8f1dc00}, ref = 1, parent =
0x7ffff8c81d00}, id = 0x7ffff8ba6710 "bah", realized = true, opts = 0x7ffff8ba66c0,
hotplugged = 0, parent_bus = 0x0, num_gpio_out = 0, gpio_out = 0x0, num_gpio_in = 0,
gpio_in = 0x0, child_bus = {lh_first = 0x0}, num_child_bus = 0, instance_id_alias = -1,
alias_required_for_version = 0}
(gdb)
$6 = {parent_obj = {class = 0x7ffff8ede8f0, free = 0x7ffff735f5b0 <g_free>, properties = {
tqh_first = 0x7ffff8eec8a0, tqh_last = 0x7ffff8f1dc00}, ref = 1, parent =
0x7ffff8c81d00}, id = 0x7ffff8ba6710 "bah", realized = true, opts = 0x7ffff8ba66c0,
hotplugged = 0, parent_bus = 0x0, num_gpio_out = 0, gpio_out = 0x0, num_gpio_in = 0,
gpio_in = 0x0, child_bus = {lh_first = 0x0}, num_child_bus = 0, instance_id_alias = -1,
alias_required_for_version = 0}
--
MST
next prev parent reply other threads:[~2013-03-11 17:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 18:46 [Qemu-devel] [PATCH v4] qdev: DEVICE_DELETED event Michael S. Tsirkin
2013-03-07 19:57 ` Markus Armbruster
2013-03-07 20:23 ` Michael S. Tsirkin
2013-03-08 7:58 ` Markus Armbruster
2013-03-08 13:36 ` Anthony Liguori
2013-03-11 17:39 ` Michael S. Tsirkin [this message]
2013-03-11 19:26 ` Anthony Liguori
2013-03-11 19:35 ` Michael S. Tsirkin
2013-03-10 9:30 ` Michael S. Tsirkin
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=20130311173929.GA29465@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=libvir-list@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.