[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] New device API
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [RFC] New device API |
Date: |
Wed, 6 May 2009 01:52:01 +0100 |
User-agent: |
KMail/1.9.9 |
> > The attached patch is my attempt at a new internal API for device
> > creation in qemu.
>
> Instead of recreating constructors, I think we should just use GCC's
> constructor attribute. This gives us ordering which will be important
> when dealing with buses.
The reason I'm not using constructors is because you have to workaround
ordering issues. All constructors are run before main(), so there's a very
limited amount they can actually do, and constructor priorities are not
available on all hosts.
> I think the layering is not quite right with qdev.
>
> Not all devices fit into the parameters of register_mmio/connect_irq.
> When dealing with bus devices (like PCI devices), I think you really
> have to model the constructs that the bus expose. Note, this starts to
> look very similar to the Linux kernel's layered device model.
>
> For instance, the following makes sense to me (from an x86 perspective):
> <snip>
Hmm, I'll think about this a bit.
Paul
- [Qemu-devel] [RFC] New device API, Paul Brook, 2009/05/05
- Re: [Qemu-devel] [RFC] New device API, Anthony Liguori, 2009/05/05
- Re: [Qemu-devel] [RFC] New device API, Edgar E. Iglesias, 2009/05/05
- Re: [Qemu-devel] [RFC] New device API,
Paul Brook <=
- Re: [Qemu-devel] [RFC] New device API, Paul Brook, 2009/05/05
- Re: [Qemu-devel] [RFC] New device API, Anthony Liguori, 2009/05/06
- Re: [Qemu-devel] [RFC] New device API, Anthony Liguori, 2009/05/09
- Re: [Qemu-devel] [RFC] New device API, Paul Brook, 2009/05/09
- Re: [Qemu-devel] [RFC] New device API, Anthony Liguori, 2009/05/09
- Re: [Qemu-devel] [RFC] New device API, malc, 2009/05/09
- Re: [Qemu-devel] [RFC] New device API, Anthony Liguori, 2009/05/09
- Re: [Qemu-devel] [RFC] New device API, Andreas Färber, 2009/05/10
- Re: [Qemu-devel] [RFC] New device API, malc, 2009/05/10
- Re: [Qemu-devel] [RFC] New device API, Anthony Liguori, 2009/05/09