Anthony Liguori wrote:
On Mon, 2007-09-03 at 18:41 +0300, Blue Swirl wrote:
Sorry to ruin your GSoC project, but the plugin system was discussed
last year, please see this thread:
http://thread.gmane.org/gmane.comp.emulators.qemu/14341/focus=14473

I've always agreed that allowing plugins was not a good idea.  However,
I had a different thought recently.

While I don't think there's much of a reason to allow plugins for QEMU,
it would be interesting to make some of QEMU's device emulation into
more a of a library that could be used by other programs.

With things like KVM making it relatively simple to do CPU emulation, if
QEMU's device emulation was available as a library (even a GPL library),
it would be pretty easy to do interesting things without forking QEMU
which is what everyone seems to be doing these days.

Yes -- it would be valuable to have QEMU's devices available as a separate library(ies), with a simple, well-defined API. Some of us use other CPU emulators (yes, yes, I know we should emulate all architectures under qemu, but that's not always easy :) and would love to use qemu's device emulations.

My initial thought is to make the libraries at the individual device
level.

It would be good to have a general mechanism for bus providers, interrupts, APICs, chipsets, etc. as well, so we could emulate fancier architectures than a simple PC (or simple Sparc/MIPS/ARM/etc. box.) For instance, I'd like to emulate multiple PCIe host bridges, each with an APIC and multiple cards, which might contain PCI-to-PCI bridges. And I'd like to emulate NUMA systems with many memory controllers and a complex memory map, with multiple sets of chipset registers. I don't expect qemu to do this off the shelf, but I'd like to avoid hardcoding PC assumptions into the device libraries, so I can code the fancy machines myself and use the I/O as-is.

Any more thoughts on how to structure the libraries?

Brian J. Johnson


Reply via email to