QEMU-based framework exposing several of QEMU-internal APIs to a LuaJIT core injected into QEMU itself. Among other things, this allows fast prototyping of target systems without any native code and minimal effort in Lua.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
accel
audio
backends
block
bsd-user
chardev
contrib
crypto
default-configs
disas
docs
dtc @ 558cd81
examples/bcm4358
fpu
fsdev
gdb-xml
hw
include
io
libdecnumber
linux-headers
linux-user
migration
nbd
net
pc-bios
pixman @ 87eea99
po
qapi
qga
qobject
qom
replay
roms
scripts
slirp
stubs
target
tcg
tests
trace
ui
util
.dir-locals.el
.exrc
.gdbinit
.gitignore
.gitmodules
.mailmap
.shippable.yml
.travis.yml
CODING_STYLE
COPYING
COPYING.LIB
Changelog
HACKING
LICENSE
MAINTAINERS
Makefile
Makefile.objs
Makefile.target
README
README.md
VERSION
arch_init.c
atomic_template.h
balloon.c
block.c
blockdev-nbd.c
blockdev.c
blockjob.c
bootdevice.c
bt-host.c
bt-vhci.c
configure
cpus-common.c
cpus.c
device-hotplug.c
device_tree.c
disas.c
dma-helpers.c
dump.c
exec.c
gdbstub.c
hax-stub.c
hmp-commands-info.hx
hmp-commands.hx
hmp.c
hmp.h
ioport.c
iothread.c
memory.c
memory_ldst.inc.c
memory_mapping.c
module-common.c
monitor.c
numa.c
os-posix.c
os-win32.c
qapi-schema.json
qdev-monitor.c
qdict-test-data.txt
qemu-bridge-helper.c
qemu-doc.texi
qemu-ga.texi
qemu-img-cmds.hx
qemu-img.c
qemu-img.texi
qemu-io-cmds.c
qemu-io.c
qemu-nbd.c
qemu-nbd.texi
qemu-option-trace.texi
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx
qemu-seccomp.c
qemu-tech.texi
qemu.nsi
qemu.sasl
qmp.c
qtest.c
replication.c
replication.h
rules.mak
softmmu_template.h
thunk.c
tpm.c
trace-events
user-exec-stub.c
user-exec.c
version.rc
vl.c

README.md

LuaQEMU

LuaQEMU is a QEMU-based framework exposing several of QEMU-internal APIs to a LuaJIT core injected into QEMU itself. Among other things, this allows fast prototyping of target systems without any native code and minimal effort in Lua.

When initially evaluating the idea of LuaQEMU, we had the following specific functional requirements:

  • Mature multi-architecture support
  • Full-system emulation support, including drivers and peripherals, MMU, interrupts, and timers
  • Ease of long-term maintainability (i.e. little to no QEMU core modifications)
  • Easy target prototyping (e.g. definition of specific boards) without native code

The first two properties are almost provided by QEMU out of the box. We gain flexibility for target prototyping, by being able to completely write board definitions in Lua without native code. We have implemented this such that each hardware architecture comes with a newly introduced Lua-board, which can be used to interact and source from other native board definitions, while not requiring to modify QEMU core code. For the time being we focused on ARM support here, but this approach can be easily transferred to other architectures supported by QEMU.

At the moment there is no API documentation. Please have a look at the files in hw/arm/luaqemu.

Important Notice: At the moment this project is WIP and has to be considered unstable. If you run into issues feel free to let us know (patches welcome!), but don't be surprised about unexpected behaviour.

For more information have a look at our first blog post introducing LuaQEMU.

Building

Install regular QEMU dependencies + luajit, then:

git submodule update --init dtc
./configure  --enable-luajit --target-list=arm-softmmu
make