qemu-devel
[Top][All Lists]
Advanced

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

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


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 0/4][RFC] Add module infrastructure to QEMU
Date: Mon, 11 May 2009 09:26:45 -0500

This is the current state of a patch set to introduce a module infrastructure to
QEMU.  It depends on GCC constructors and GNU ld's --whole-archive.

The dependency on GNU ld's --whole-archive is a problem, but it can be addressed
in a number of ways:

 1) Avoid creating a shared archive and just use object files.  I see no real
    downside to this except that we're just ignoring this problem.

 2) Switch to using dynamic shared libraries.  This has the benefit of reducing
    the QEMU install size.  This is attractive except for the fact that creating
    dynamic shared libraries across multiple host architectures is a pain.

 3) For platforms that don't use GNU ld (Solaris, AIX, ???), add platform
    specific equivalents.  For instance, -z allextract should work for Solaris.

I'm leaning toward #3 as I think it's a reasonable compromise.

This patch series introduces a number of other concepts though beyond
constructors.  It decentralizes the block driver code and moves it to a separate
subdirectory.  It also introduces also decentralizes the Makefile for the block
drivers.

Finally, it allows for a config file to be used during build time to
selectively choose what block drivers are compiled in.  This is done in a
fashion similar to how the Linux kernel's build system works.

There are a number of reasons to allow this level of build customization.  One
reason is that it makes per-platform support more understandable.  Instead of
having #ifdefs all through the code, you have a central place to disable
features for particular platforms.

It also has the advantage of allowing an individual to build a minimal version
of QEMU to support a particular type of machine with a particular set of
functionality.  This is useful for embedded environments and for security
sensitive environments.

I have additional patches that split up qemu-char.c and introduce a similar
structure there but they are not quite ready yet.




reply via email to

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