QEMU for the host

You will be running SeKVM on a QEMU emulated a Raspberry Pi 4.

Download QEMU 6.2.0 from: https://download.qemu.org/qemu-6.2.0.tar.xz

To build the QEMU, run the following commands:

tar -xf qemu-6.2.0.tar.xz
sudo apt install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
./configure --target-list=aarch64-softmmu --disable-werror
make -j`nproc`

(Optional to build) QEMU for the guest

To run a VM under SeKVM, you will need another QEMU(guest QEMU) running on the emulated Pi 4. Since guest QEMU is targeting on Arm platform, you need to either compile it natively on a Arm machine or cross compile it on an x86 machine(directly compiling on the emulated platform will be insanely slow!).

To simplify the environment setup, we provide a precompile guest QEMU and in case you want to build it on your own, we provide a docker image with the guest QEMU source code. Make sure you have docker installed properly on your machine.

To build the guest QEMU:

git clone <https://github.com/columbia/fall23-os2-qemu>
cd fall23-os2-qemu
docker build -t qemu-cross .
docker run -it --rm -v `pwd`:/qemu qemu-cross

The docker image will eventually create a deb package for the QEMU.

Linux kernel

If you are on an x86-based machine, you need to configure the cross-compile environment for the linux kernel:

sudo apt install gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu

Guest Linux

https://github.com/columbia/osdi23-paper114-pv-guest/tree/ae

Build:

export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make defconfig
./scripts/config --enable CONFIG_KVM_ARM_PVOPS
make -j`nproc` Image

Host Linux(SeKVM)