From: Anthony Liguori <anthony@codemonkey.ws>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Markus Armbruster <armbru@redhat.com>,
Chris Wright <chrisw@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] KVM call minutes for Feb 8
Date: Wed, 09 Feb 2011 04:43:33 -0600 [thread overview]
Message-ID: <4D526FD5.2090404@codemonkey.ws> (raw)
In-Reply-To: <20110208193033.GG16429@hall.aurel32.net>
On 02/08/2011 01:30 PM, Aurelien Jarno wrote:
> On Tue, Feb 08, 2011 at 06:13:53PM +0100, Markus Armbruster wrote:
>
>> Chris Wright<chrisw@redhat.com> writes:
>>
>> [...]
>>
>>> - qdev/vmstate both examples of partially completed work that need more
>>> attention
>>>
>> As far as qdev's concerned, I can see two kinds of to-dos:
>>
>> * Further develop qdev so that more of the machine init code can becomes
>> qdev declarations. Specific ideas welcome. Patches even more, as
>> always.
>>
>> * Convert the remaining devices. They are typically used only with
>> oddball machines, which makes the conversion hard to test for anyone
>> who's not already using them.
>>
>> I've said this before: at some point in time (sooner rather than
>> later, if you ask me), we need to shoot the stragglers. I'm pretty
>> optimistic that any victims worth keeping will receive timely
>> attention then.
>>
>>
> For those oddball machines, qdev doesn't really bring anything, that's
> why there is so little interest in converting them, and why I prefer to
> spend my time on the emulation correctness than converting those
> remaining to qdev. Of course I agree it's something to do, and with an
> unlimited amount of free time, I'll do them immediately.
>
> Let's take for example the SH4 target. It's nice to be able to create
> the whole machine from a script, except your kernel won't boot if the
> machine:
> - has a different cpu
> - doesn't a SM501 chipset
> - has not the correct memory size
> - doesn't have 2 serial port
>
qdev needs a v2. The object model is very difficult to work with and it
offers little value for the scenario you describe.
A SoC should be modelled as a single object with parameters that can be
set. That object will then have other objects embedded through it with
composition or reference.
So for instance, you might have:
class SH4 {
SH4CPU cpu[n_vcpus];
SM501 chipset;
};
class SM501 : public PCIHostController {
PCIDevice *slots[32];
};
Having a script where you describe this is wrong. This ought to be an
object. For instance, what we really ought to have on x86 is:
qemu -no-machine -device i440fx,id=root -device
rtl8139,bus=/root/pci.0,addr=1.0 -device cpu,chipset=/root
Part of the problem with qdev v1 is that it doesn't allow for meaningful
object composition. The only relationship between devices is through
BusState which presents a hierarchical parent/child relationship.
We really need a way to do composition and referencing. For instance,
if you notice above, SM501 has 32 references to a PCIDevice as opposed
to having a linked list of children. The effect is that a PCIDevice
does not have the PCIHostController as it's "parent" because there's no
intrinsic parent/child hierarchy.
So really, we're talking about a device graph here instead of a tree.
Regards,
Anthony Liguori
> That basically only leaves the PCI and USB devices configurable, but
> those are already using qdev.
>
>
next prev parent reply other threads:[~2011-02-09 10:44 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 15:55 KVM call minutes for Feb 8 Chris Wright
2011-02-08 16:14 ` Stefan Hajnoczi
2011-02-08 16:39 ` [Qemu-devel] " Anthony Liguori
2011-02-08 17:13 ` Markus Armbruster
2011-02-08 19:02 ` Peter Maydell
2011-02-08 21:11 ` Anthony Liguori
2011-02-09 8:11 ` Markus Armbruster
2011-02-09 8:20 ` Peter Maydell
2011-02-09 9:02 ` Markus Armbruster
2011-02-08 19:30 ` Alexander Graf
2011-02-08 19:30 ` Aurelien Jarno
2011-02-09 8:23 ` Markus Armbruster
2011-02-09 10:43 ` Anthony Liguori [this message]
2011-02-09 17:38 ` Blue Swirl
2011-02-08 21:12 ` Anthony Liguori
2011-02-09 8:01 ` Markus Armbruster
2011-02-09 10:31 ` Anthony Liguori
2011-02-09 12:28 ` Markus Armbruster
2011-02-09 14:44 ` Anthony Liguori
2011-02-09 17:48 ` Blue Swirl
2011-02-09 19:53 ` Anthony Liguori
2011-02-09 19:59 ` Anthony Liguori
2011-02-09 20:15 ` Blue Swirl
2011-02-10 7:47 ` Anthony Liguori
2011-02-10 8:16 ` Peter Maydell
2011-02-10 8:36 ` Anthony Liguori
2011-02-10 9:04 ` Peter Maydell
2011-02-10 10:13 ` Anthony Liguori
2011-02-10 10:38 ` Peter Maydell
2011-02-10 11:24 ` Gleb Natapov
2011-02-10 12:23 ` Anthony Liguori
2011-02-10 13:06 ` Peter Maydell
2011-02-10 19:17 ` Scott Wood
2011-02-10 19:22 ` Peter Maydell
2011-02-10 19:29 ` Scott Wood
2011-02-10 9:07 ` Gleb Natapov
2011-02-10 10:00 ` Anthony Liguori
2011-02-10 10:10 ` Gleb Natapov
2011-02-10 10:19 ` Anthony Liguori
2011-02-10 10:49 ` Gleb Natapov
2011-02-10 12:47 ` Anthony Liguori
2011-02-10 13:12 ` Gleb Natapov
2011-02-10 10:25 ` Avi Kivity
2011-02-10 11:13 ` Gleb Natapov
2011-02-10 12:51 ` Anthony Liguori
2011-02-10 13:00 ` Avi Kivity
2011-02-10 13:29 ` Gleb Natapov
2011-02-10 14:00 ` Anthony Liguori
2011-02-10 13:27 ` Gleb Natapov
2011-02-10 14:04 ` Anthony Liguori
2011-02-10 14:20 ` Gleb Natapov
2011-02-10 16:05 ` Anthony Liguori
2011-02-11 18:14 ` Blue Swirl
2011-02-13 9:24 ` Gleb Natapov
2011-02-13 15:31 ` Anthony Liguori
2011-02-13 19:37 ` Blue Swirl
2011-02-13 19:57 ` Anthony Liguori
2011-02-13 21:00 ` Blue Swirl
2011-02-13 22:42 ` Anthony Liguori
2011-02-14 17:31 ` Blue Swirl
2011-02-14 20:53 ` Anthony Liguori
2011-02-14 21:25 ` Blue Swirl
2011-02-14 21:47 ` Anthony Liguori
2011-02-15 17:11 ` Blue Swirl
2011-02-15 23:07 ` Anthony Liguori
2011-02-16 9:52 ` Gleb Natapov
2011-02-14 9:44 ` Paolo Bonzini
2011-02-10 10:29 ` Avi Kivity
2011-02-13 15:38 ` Anthony Liguori
2011-02-13 15:56 ` Avi Kivity
2011-02-13 16:56 ` Anthony Liguori
2011-02-13 18:08 ` Gleb Natapov
2011-02-13 19:38 ` Anthony Liguori
2011-02-14 10:23 ` Gleb Natapov
2011-02-13 21:24 ` Peter Maydell
2011-02-13 22:43 ` Anthony Liguori
2011-02-13 23:35 ` Peter Maydell
2011-02-13 15:39 ` Anthony Liguori
2011-02-11 17:54 ` Blue Swirl
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=4D526FD5.2090404@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=chrisw@redhat.com \
--cc=kvm@vger.kernel.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