[Top][All Lists]

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

Re: [Qemu-devel] Unified device model

From: Jim C. Brown
Subject: Re: [Qemu-devel] Unified device model
Date: Sun, 9 Apr 2006 10:55:55 -0400
User-agent: Mutt/

On Sun, Apr 09, 2006 at 11:38:28AM +0100, Paul Brook wrote:
> I think to be acceptable to qemu (and probably also for Xen) the devices 
> would 
> have to be written in C. C++ is more pain that it's worth in this context.
> Of course there's no reason why we couldn't use the subset of C that's also 
> valid C++. You could also write C++ wrappers round the interface for bochs to 
> use.

Same here.

> I'm not a fan of binary plugins (for the same reasons I'm don't like binary 
> kernel modules), and don't think there's any real need to them.

A binary plugin API and a source plugin API (one that requires each driver
device to be recompiled for each of the platforms (Xen, qemu, bochs, etc.)
would probably be equally hard to design and maintain.

With a binary plugin API you at least win out.

> I can't see 
> any good reasons why open source devices would need to be broken out into a 
> separate shared library.

I think the case was already made for this.

Xen's hardware emulation, while based on qemu's, is already ahead in several
aspects. A separate library would make it more convenient for these changes
to be shared back with qemu. Or with E/OS.

This is actually a completely separate issue from a unified device driver API
(as qemu could support the API, but only in source code form, or could require
that drivers be linked in statically, etc) and should be recognized as such.

> If you do want to accommodate proprietary binary plugins then C++ is a really 
> bad idea. The C++/libstdc++ ABI simply isn't stable enough to make this a 
> realistic option.

Considering that the ABI does not guarantee compatibility between versions, I
am inclined to agree.

No reason the drivers themselves can't be done in C++, but the API itself
should be pure C.

> Paul
> _______________________________________________
> Qemu-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

reply via email to

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