[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 0/4][RFC] Add module infrastructure to QEMU

From: Paul Brook
Subject: [Qemu-devel] Re: [PATCH 0/4][RFC] Add module infrastructure to QEMU
Date: Mon, 11 May 2009 17:16:35 +0100
User-agent: KMail/1.9.9

On Monday 11 May 2009, Anthony Liguori wrote:
> Paul Brook wrote:
> > On Monday 11 May 2009, Anthony Liguori wrote:
> >> This is the current state of a patch set to introduce a module
> >> infrastructure to QEMU.
> >
> > I don't think numeric priorities are a good idea. If we have dependencies
> > then we should be dealing with them properly, not hacking round the
> > problem.
> The numeric priorities are an implementation detail.  No one should ever
> consume module_init() directly and I should add appropriately scary
> comments to that affect.

Having looked a bit deeper, you're not actually implementing priorities. 
You're implementing different categories of init function. So this should be 
an enum, and be renames to something less confusing.

> We do have dependencies.  I'd like virtio to be a module, and I'd like
> virtio-net, virtio-blk, etc. to be modules.  This gets exposed as
> virtio.c being a bus_init() and virtio-*.c being virtio_init().  We use
> the integer priorities in module.h to express this.

I'm not convinced virtio is as much of a separate entity as you think it is. 
It's certainly not a bus. It's an implementation detail that happens to be 
shared by several devices.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]