From: Anthony Liguori <aliguori@us.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Wanpeng Li <liwp@linux.vnet.ibm.com>,
Andreas Faerber <afaerber@suse.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 04/14] qdev: don't allow globals to be set by bus name
Date: Tue, 01 May 2012 17:18:38 -0500 [thread overview]
Message-ID: <4FA0613E.9090500@us.ibm.com> (raw)
In-Reply-To: <4FA059EA.1060900@redhat.com>
On 05/01/2012 04:47 PM, Paolo Bonzini wrote:
> Il 01/05/2012 22:46, Anthony Liguori ha scritto:
>>>>
>>>>
>>>> So I think we can safely break it :-)
>>>
>>> Does this work with compat properties set on a bus?
>>
>> No :-(
>>
>> This is pretty easy to fix though. The attached should do the trick,
>> I'll update and send out.
>>
>> Even if it does,
>>> perhaps it's better to avoid the cleverness and wait for my series that
>>> moves bus properties to the appropriate abstract superclass.
>>
>> This series does that FWIW (patch 6/14).
>
> Yeah, it should---modulo bisectability of course.
>
> It's a fairly different approach WRT my series (using
> qdev_add_properties instead of klass->props). In theory I like it, but
> I fail to see right now whether it breaks "-device foo,?" somehow. I
> think it does:
>
> $ qemu-system-x86_64 -device rtl8139,?
> rtl8139.mac=macaddr
> rtl8139.vlan=vlan
> rtl8139.netdev=netdev
> rtl8139.bootindex=int32
> rtl8139.addr=pci-devfn<<< here start bus props
> rtl8139.romfile=string
> rtl8139.rombar=uint32
> rtl8139.multifunction=on/off
> rtl8139.command_serr_enable=on/off
>
> I think it's too late for this series to go into 1.1.
No, this all works as expected (well, almost):
$ qemu-system-x86_64 -device rtl8139,?
rtl8139.vlan=vlan
rtl8139.addr=pci-devfn
rtl8139.romfile=string
rtl8139.multifunction=on/off
rtl8139.command_serr_enable=on/off
But there is stuff missing...
The problem is that qdev_device_help() only prints out legacy properties and
munges them to look the way they used to. But when you refactored some of the
legacy types to be non-legacy, it meant that the legacy- version disappeared and
those options disappeared from -device <type>,?
So we need to fix this either way. I think the simple solution is to store
property info in a list instead of directly printing it. Then we can walk the
list and remove non-legacy properties for given legacy properties and munge the
names in place.
But this is true even with master (but much, much worse):
anthony@titi:~/build/qemu$ x86_64-softmmu/qemu-system-x86_64 -device rtl8139,?
<there is no output>
This is because we only look at DeviceClass::props which only contains what
happens to only contain static properties for rtl8139. We totally ignore static
properties in current master.
So my series makes the situation better and I think it's easier to fix the full
problem. I also don't view the current bug as a -rc0 blocker (although it's
obviously a release blocker). I can send a proper patch later in the week but
I'd still like to commit the bus changes before -rc0.
We have a month before 1.1. I think that's plenty of time to address any fall
out here..
Regards,
Anthony Liguori
>
> Paolo
>
next prev parent reply other threads:[~2012-05-01 22:19 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 18:18 [Qemu-devel] [PATCH 0/14] qom: convert busses to QOM (v2) Anthony Liguori
2012-05-01 18:18 ` [Qemu-devel] [PATCH 01/14] qdev: fix adding of ptr properties Anthony Liguori
2012-05-01 18:18 ` [Qemu-devel] [PATCH 02/14] object: add object_property_foreach Anthony Liguori
2012-05-01 19:02 ` Andreas Färber
2012-05-01 18:18 ` [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties Anthony Liguori
2012-05-01 19:05 ` Andreas Färber
2012-05-01 20:37 ` Anthony Liguori
2012-05-01 20:43 ` Andreas Färber
2012-05-01 20:48 ` Anthony Liguori
2012-05-01 20:57 ` Peter Maydell
2012-05-01 22:01 ` Anthony Liguori
2012-05-01 22:12 ` Paolo Bonzini
2012-05-01 22:23 ` Anthony Liguori
2012-05-01 18:18 ` [Qemu-devel] [PATCH 04/14] qdev: don't allow globals to be set by bus name Anthony Liguori
2012-05-01 20:37 ` Paolo Bonzini
2012-05-01 20:46 ` Anthony Liguori
2012-05-01 21:47 ` Paolo Bonzini
2012-05-01 22:18 ` Andreas Färber
2012-05-01 22:23 ` Anthony Liguori
2012-05-01 22:18 ` Anthony Liguori [this message]
2012-05-02 6:32 ` Paolo Bonzini
2012-05-01 18:18 ` [Qemu-devel] [PATCH 05/14] qdev: use wrapper for qdev_get_path Anthony Liguori
2012-05-01 18:36 ` Anthony Liguori
2012-05-02 12:35 ` Gerd Hoffmann
2012-05-01 18:18 ` [Qemu-devel] [PATCH 06/14] qdev: move properties from businfo to base class instance init Anthony Liguori
2012-05-01 18:18 ` [Qemu-devel] [PATCH 07/14] qdev: fix info qtree/qdm Anthony Liguori
2012-05-02 7:14 ` Paolo Bonzini
2012-05-01 18:18 ` [Qemu-devel] [PATCH 08/14] qdev: convert busses to QEMU Object Model Anthony Liguori
2012-05-01 19:31 ` Andreas Färber
2012-05-01 20:40 ` Anthony Liguori
2012-05-01 18:18 ` [Qemu-devel] [PATCH 09/14] qdev: connect some links and move type to object (v2) Anthony Liguori
2012-05-01 19:47 ` Andreas Färber
2012-05-01 18:18 ` [Qemu-devel] [PATCH 10/14] qbus: move get_dev_path to DeviceState Anthony Liguori
2012-05-02 7:15 ` Paolo Bonzini
2012-05-01 18:18 ` [Qemu-devel] [PATCH 11/14] qbus: move get_fw_dev_path to DeviceClass Anthony Liguori
2012-05-01 19:34 ` Andreas Färber
2012-05-01 22:24 ` Anthony Liguori
2012-05-01 22:36 ` Andreas Färber
2012-05-02 7:22 ` Paolo Bonzini
2012-05-01 18:18 ` [Qemu-devel] [PATCH 12/14] qbus: move print_dev " Anthony Liguori
2012-05-01 19:37 ` Andreas Färber
2012-05-01 18:18 ` [Qemu-devel] [PATCH 13/14] qbus: make child devices links Anthony Liguori
2012-05-01 18:18 ` [Qemu-devel] [PATCH 14/14] qbus: initialize in standard way Anthony Liguori
2012-05-02 8:34 ` Paolo Bonzini
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=4FA0613E.9090500@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=afaerber@suse.de \
--cc=liwp@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).