From: Blue Swirl <blauwirbel@gmail.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Juha Riihimäki" <juha.riihimaki@nokia.com>,
"patches@linaro.org" <patches@linaro.org>,
"Jan Kiszka" <jan.kiszka@siemens.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Avi Kivity" <avi@redhat.com>,
"Paul Brook" <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices
Date: Wed, 15 Jun 2011 23:20:45 +0300 [thread overview]
Message-ID: <BANLkTiksZMH+uUaJWLbwPCE1kmHisQSuQQ@mail.gmail.com> (raw)
In-Reply-To: <4DF90F74.7090206@codemonkey.ws>
On Wed, Jun 15, 2011 at 11:00 PM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 06/15/2011 01:56 PM, Blue Swirl wrote:
>>
>> On Tue, Jun 14, 2011 at 4:21 PM, Anthony Liguori<anthony@codemonkey.ws>
>> wrote:
>>>
>>> Which suggests that we really need to move away from declarative device
>>> definitions. It makes it hard to have variable numbers of properties.
>>
>> I'd suppose the number of slots could be fixed. Then the declaration could
>> be
>> DEFINE_PROP_SOCKETS(I440FXState, slot, 32),
>
> That's fine for something like a PCI controller, but for something like a
> multiport network card, it's really desirable to be able to specify the
> number of ports as part of the config. IOW:
>
> -device virtio-net-pci,ports=8,netdev[0]=tap0,netdev[1]=tap1,...
In the PCI cases, I'd use the maximum allowed by PCI.
>>> In this case, piix3 would be defined as:
>>>
>>> struct I440FXState {
>>> PIIX3 piix3;
>>> PCIDevice slots[32];
>>> };
>>>
>>> Which suggests we need an initfn to do the following:
>>>
>>> void i440fx_initfn(...) {
>>> qdev_init_inplace(&dev->piix3, "PIIX3");
>>> dev->slot[1] =&dev->piix3->bus;
>>> }
>>>
>>> This gets hard to do well in C though. I'm not sure how we could make
>>> DEFINE_PROP_PLUG/SOCKET type safe.
>>
>> DEFINE_PROP_PCI_SOCKET()?
>
> Yeah, that's why I said, "hard to do well". It makes it very hard to add
> new socket types.
PCI, USB, IDE, SCSI, SBus, what else? APICBus? I2C? 8 socket types
ought to be enough for anybody.
next prev parent reply other threads:[~2011-06-15 20:21 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 11:33 [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices Peter Maydell
2011-06-08 11:33 ` [Qemu-devel] [PATCH RFC 1/3] sysbus: Add support for resizing and unmapping MMIOs Peter Maydell
2011-06-08 11:33 ` [Qemu-devel] [PATCH RFC 2/3] sysbus: Allow sysbus MMIO passthrough Peter Maydell
2011-06-08 11:33 ` [Qemu-devel] [PATCH RFC 3/3] sysbus: Allow passthrough of single IRQ Peter Maydell
2011-06-08 12:29 ` [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices Jan Kiszka
2011-06-09 16:40 ` Markus Armbruster
2011-06-09 17:03 ` Jan Kiszka
2011-06-10 8:13 ` Markus Armbruster
2011-06-10 12:51 ` Anthony Liguori
2011-06-10 13:10 ` Peter Maydell
2011-06-10 13:43 ` Jan Kiszka
2011-06-10 13:50 ` Peter Maydell
2011-06-10 14:22 ` Markus Armbruster
2011-06-10 14:45 ` Anthony Liguori
2011-06-10 14:34 ` Anthony Liguori
2011-06-10 14:12 ` Anthony Liguori
2011-06-10 14:18 ` Jan Kiszka
2011-06-10 14:31 ` Anthony Liguori
2011-06-10 14:07 ` Anthony Liguori
2011-06-10 14:59 ` Markus Armbruster
2011-06-10 15:43 ` Anthony Liguori
2011-06-12 17:12 ` Avi Kivity
2011-06-12 19:21 ` Anthony Liguori
2011-06-13 8:05 ` Avi Kivity
2011-06-13 17:53 ` Anthony Liguori
2011-06-13 20:59 ` Blue Swirl
2011-06-14 13:21 ` Anthony Liguori
2011-06-15 18:56 ` Blue Swirl
2011-06-15 20:00 ` Anthony Liguori
2011-06-15 20:20 ` Blue Swirl [this message]
2011-06-20 15:23 ` Paul Brook
2011-06-20 21:32 ` Blue Swirl
2011-06-21 8:16 ` Avi Kivity
2011-06-27 2:26 ` Paul Brook
2011-06-13 9:57 ` Gleb Natapov
2011-06-10 16:28 ` Andreas Färber
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=BANLkTiksZMH+uUaJWLbwPCE1kmHisQSuQQ@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=juha.riihimaki@nokia.com \
--cc=patches@linaro.org \
--cc=paul@codesourcery.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).