Patch: Build acceleration module within linux kernel source (builtin or as module)
Hi,
attached is a patch for the linux 2.6.16 kernel that enables you to build the qemu accelerator from within the kernel source builtin or as a module. Due to the restricting license the binary module is not included of course.
It's currently only for x86, but it should be very easy to adapt it for x86_64. If someone is interested in it and not able to do it himself I could provide an updated patch (but I dont have a x86_64 box here, so I can not test it).
Please cc me in any replies, since I'm not subscribed to the list.
Regards,
Robert
arch/i386/Kconfig +33 -0
@@ -687,6 +687,39 @@ source kernel/Kconfig.hz +config QEMU_ACCEL + tristate "QEMU Accelerator" + depends on X86 + depends on EXPERIMENTAL + ---help--- + Qemu is a processor emulator that is used to run an x86 Linux Kernel + on x86 Linux. + + The QEMU Accelerator increases the speed of QEMU when a PC is + emulated on a PC. It runs most of the target application code + directly on the host processor to achieve near native performance. + It is very useful when you want to run another Operating System + (for example Windows) on a Linux desktop. + + The QEMU Accelerator module is binary only and under a proprietary + license. + Read http://fabrice.bellard.free.fr/qemu/license.html for details. + +config QEMU_ACCEL_PATH + string "Qemu binary module directory path" + default "" + depends on QEMU_ACCEL + help + Specify the directory where kqemu-mod-i386.o is in. + + Download page: + http://fabrice.bellard.free.fr/qemu/download.html + + The QEMU Accelerator module is binary only and under a proprietary + license. + Read http://fabrice.bellard.free.fr/qemu/license.html for details. + + config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on EXPERIMENTAL
arch/i386/kernel/Makefile +1 -0
@@ -25,6 +25,7 @@ obj-$(CONFIG_X86_IO_APIC) += io_apic.o obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o +obj-$(CONFIG_QEMU_ACCEL) += qemu/ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_X86_NUMAQ) += numaq.o obj-$(CONFIG_X86_SUMMIT_NUMA) += summit.o
arch/i386/kernel/qemu/Makefile +7 -0
@@ -0,0 +1,7 @@ +kqemu-objs:= kqemu-linux.o kqemu-mod.o +qemu_path := $(shell echo $(CONFIG_QEMU_ACCEL_PATH)) + +$(obj)/kqemu-mod.o: $(qemu_path)/kqemu-mod-i386.o + cp $< $@ + +obj-$(CONFIG_QEMU_ACCEL):= kqemu.o
arch/i386/kernel/qemu/kqemu-kernel.h +47 -0
47 lines not on this page · raw message
arch/i386/kernel/qemu/kqemu-linux.c +372 -0
372 lines not on this page · raw message
arch/i386/kernel/qemu/kqemu.h +132 -0
132 lines not on this page · raw message