qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] device_add error handling regressed in v1.5.0
@ 2014-01-17 10:23 Markus Armbruster
  2014-01-17 12:41 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2014-01-17 10:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Andreas Färber

Watch this:

    $ upstream-qemu -nodefaults -S -display none -monitor stdio
    QEMU 1.7.50 monitor - type 'help' for more information
    (qemu) device_add e1000,netdev=xxx
    Property 'e1000.netdev' can't find value 'xxx'
    (qemu) info qtree
    bus: main-system-bus
      type System
      dev: hpet, id ""
        gpio-in 2
        gpio-out 1
        timers = 3
        msi = off
        hpet-intcap = 4
        irq 32
        mmio 00000000fed00000/0000000000000400
      dev: ioapic, id ""
        gpio-in 24
        irq 0
        mmio 00000000fec00000/0000000000001000
      dev: i440FX-pcihost, id ""
        pci-hole64-size = 16777216.000T
        short_root_bus = 0
        irq 0
        bus: pci.0
          type PCI
          dev: e1000, id ""
            mac = 00:00:00:00:00:00
            vlan = <null>
            netdev = <null>
            bootindex = -1
            autonegotiation = on
            mitigation = on
            addr = <unset>
            romfile = <null>
            rombar = 1
            multifunction = off
            command_serr_enable = on
    Segmentation fault (core dumped)

Even though device_add failed, it still created a node in the qtree!

Same issue observed with scsi-hd.  Looks like a qdev problem, not a
device problem.

git-bisect blames this one:

e0a83fc2c1582dc8d4453849852ebe6c258b7c3a is the first bad commit
commit e0a83fc2c1582dc8d4453849852ebe6c258b7c3a
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Tue Apr 2 15:50:00 2013 +0200

    qom: do nothing on unparent of object without parent
    
    Otherwise, device_unparent will fail to get a canonical path of
    the object.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Message-id: 1364910600-3418-1-git-send-email-pbonzini@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] device_add error handling regressed in v1.5.0
  2014-01-17 10:23 [Qemu-devel] device_add error handling regressed in v1.5.0 Markus Armbruster
@ 2014-01-17 12:41 ` Paolo Bonzini
  2014-01-20 12:41   ` Markus Armbruster
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2014-01-17 12:41 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, Andreas Färber

Il 17/01/2014 11:23, Markus Armbruster ha scritto:
> e0a83fc2c1582dc8d4453849852ebe6c258b7c3a is the first bad commit
> commit e0a83fc2c1582dc8d4453849852ebe6c258b7c3a
> Author: Paolo Bonzini <pbonzini@redhat.com>
> Date:   Tue Apr 2 15:50:00 2013 +0200
> 
>     qom: do nothing on unparent of object without parent
>     
>     Otherwise, device_unparent will fail to get a canonical path of
>     the object.
>     
>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>     Message-id: 1364910600-3418-1-git-send-email-pbonzini@redhat.com
>     Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> 

I think Amos had a fix for this.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] device_add error handling regressed in v1.5.0
  2014-01-17 12:41 ` Paolo Bonzini
@ 2014-01-20 12:41   ` Markus Armbruster
  2014-01-20 13:10     ` Markus Armbruster
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2014-01-20 12:41 UTC (permalink / raw)
  To: Amos Kong; +Cc: Paolo Bonzini, qemu-devel, Andreas Färber

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 17/01/2014 11:23, Markus Armbruster ha scritto:
>> Watch this:
>>
>>     $ upstream-qemu -nodefaults -S -display none -monitor stdio
>>     QEMU 1.7.50 monitor - type 'help' for more information
>>     (qemu) device_add e1000,netdev=xxx
>>     Property 'e1000.netdev' can't find value 'xxx'
>>     (qemu) info qtree
[...]
>>     Segmentation fault (core dumped)
>>
>> Even though device_add failed, it still created a node in the qtree!
>>
>> Same issue observed with scsi-hd.  Looks like a qdev problem, not a
>> device problem.
>>
>> git-bisect blames this one:
>>
>> e0a83fc2c1582dc8d4453849852ebe6c258b7c3a is the first bad commit
>> commit e0a83fc2c1582dc8d4453849852ebe6c258b7c3a
>> Author: Paolo Bonzini <pbonzini@redhat.com>
>> Date:   Tue Apr 2 15:50:00 2013 +0200
>>
>>     qom: do nothing on unparent of object without parent
>>
>>     Otherwise, device_unparent will fail to get a canonical path of
>>     the object.
>>
>>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>     Message-id: 1364910600-3418-1-git-send-email-pbonzini@redhat.com
>>     Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>
>
> I think Amos had a fix for this.

Amos, do you?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] device_add error handling regressed in v1.5.0
  2014-01-20 12:41   ` Markus Armbruster
@ 2014-01-20 13:10     ` Markus Armbruster
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2014-01-20 13:10 UTC (permalink / raw)
  To: Amos Kong; +Cc: Paolo Bonzini, qemu-devel, Andreas Färber

Markus Armbruster <armbru@redhat.com> writes:

> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> Il 17/01/2014 11:23, Markus Armbruster ha scritto:
>>> Watch this:
>>>
>>>     $ upstream-qemu -nodefaults -S -display none -monitor stdio
>>>     QEMU 1.7.50 monitor - type 'help' for more information
>>>     (qemu) device_add e1000,netdev=xxx
>>>     Property 'e1000.netdev' can't find value 'xxx'
>>>     (qemu) info qtree
> [...]
>>>     Segmentation fault (core dumped)
>>>
>>> Even though device_add failed, it still created a node in the qtree!
>>>
>>> Same issue observed with scsi-hd.  Looks like a qdev problem, not a
>>> device problem.
>>>
>>> git-bisect blames this one:
>>>
>>> e0a83fc2c1582dc8d4453849852ebe6c258b7c3a is the first bad commit
>>> commit e0a83fc2c1582dc8d4453849852ebe6c258b7c3a
>>> Author: Paolo Bonzini <pbonzini@redhat.com>
>>> Date:   Tue Apr 2 15:50:00 2013 +0200
>>>
>>>     qom: do nothing on unparent of object without parent
>>>
>>>     Otherwise, device_unparent will fail to get a canonical path of
>>>     the object.
>>>
>>>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>     Message-id: 1364910600-3418-1-git-send-email-pbonzini@redhat.com
>>>     Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>>
>>
>> I think Amos had a fix for this.
>
> Amos, do you?

Found it: "[PATCH v2] qdev: add the device to the QOM tree before using
it to set a link" seems to fix it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-20 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17 10:23 [Qemu-devel] device_add error handling regressed in v1.5.0 Markus Armbruster
2014-01-17 12:41 ` Paolo Bonzini
2014-01-20 12:41   ` Markus Armbruster
2014-01-20 13:10     ` Markus Armbruster

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).