diff --git a/examples/osv-boottime/osv-boottime.yaml b/examples/osv-boottime/osv-boottime.yaml index 7865f5b..2009416 100644 --- a/examples/osv-boottime/osv-boottime.yaml +++ b/examples/osv-boottime/osv-boottime.yaml @@ -45,8 +45,7 @@ runs: # QEMU statistics using instrumented VMM echo "QEMU statistics: " > /results.txt - script -c '/root/osv/scripts/run.py --qemu-path \ - ../qemu/build/x86_64-softmmu/qemu-system-x86_64' -f /tmp/out + script -c '../qemu/build/x86_64-softmmu/qemu-system-x86_64 -m 40M -device virtio-blk-pci,id=blk0,drive=hd0,scsi=off,bootindex=0 -drive file=/root/osv/build/last/usr.img,if=none,id=hd0,cache=none,aio=native -net none -enable-kvm -cpu host,+x2apic -chardev stdio,mux=on,id=stdio,signal=off -mon chardev=stdio,mode=readline -device isa-serial,chardev=stdio' -f /tmp/out cat /tmp/out | grep "startup" >> /results.txt # Create Firecracker FIFOs diff --git a/examples/unikraft-qemu-boottime/hello.patch b/examples/unikraft-boottime/hello.patch similarity index 64% rename from examples/unikraft-qemu-boottime/hello.patch rename to examples/unikraft-boottime/hello.patch index f88ed44..17dcb96 100644 --- a/examples/unikraft-qemu-boottime/hello.patch +++ b/examples/unikraft-boottime/hello.patch @@ -1,3 +1,15 @@ +diff --git a/Makefile b/Makefile +index 5426bae..5f3cc4f 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + UK_ROOT ?= $(PWD)/../../unikraft + UK_LIBS ?= $(PWD)/../../libs +-LIBS := ++LIBS := $(PWD)/../../plats/plat-solo5 + + all: + @$(MAKE) -C $(UK_ROOT) A=$(PWD) L=$(LIBS) diff --git a/main.c b/main.c index 0a14cb0..6c0b899 100644 --- a/main.c diff --git a/examples/unikraft-boottime/solo5.patch b/examples/unikraft-boottime/solo5.patch new file mode 100644 index 0000000..3964a1d --- /dev/null +++ b/examples/unikraft-boottime/solo5.patch @@ -0,0 +1,15 @@ +diff --git a/Makefile.uk b/Makefile.uk +index b4edae6..364dd7f 100644 +--- a/Makefile.uk ++++ b/Makefile.uk +@@ -11,8 +11,8 @@ $(eval $(call addplatlib,solo5,libsolo5plat)) + ## + ## Solo5 Sources + ## +-SOLO5_VERSION=0.4.1 +-SOLO5_URL=https://github.com/Solo5/solo5/archive/v$(SOLO5_VERSION).zip ++SOLO5_VERSION=0.4.1-instvmm ++SOLO5_URL=https://github.com/hlef/solo5/archive/v$(SOLO5_VERSION).zip + $(eval $(call fetch,libsolo5,$(SOLO5_URL))) + + ## diff --git a/examples/unikraft-qemu-boottime/unikraft-qemu-boottime.yaml b/examples/unikraft-boottime/unikraft-qemu-boottime.yaml similarity index 57% rename from examples/unikraft-qemu-boottime/unikraft-qemu-boottime.yaml rename to examples/unikraft-boottime/unikraft-qemu-boottime.yaml index 8aac8e1..2b8df51 100644 --- a/examples/unikraft-qemu-boottime/unikraft-qemu-boottime.yaml +++ b/examples/unikraft-boottime/unikraft-qemu-boottime.yaml @@ -6,6 +6,8 @@ prams: inputs: - source: hello.patch destination: /root/hello.patch + - source: solo5.patch + destination: /root/solo5.patch - source: /etc/resolv.conf destination: /etc/resolv.conf - source: /etc/environment @@ -32,13 +34,33 @@ runs: touch /results.txt + # patch helloworld application cd /root/.unikraft/app/helloworld git apply --ignore-space-change /root/hello.patch + + # patch solo5 platform + kraft list pull plat/solo5 + cd ../../plats/plat-solo5/ + git checkout 51213c68c03208b547bfc23d02022de87cbbb696 + git apply /root/solo5.patch + cd ../../apps/helloworld + + # enable solo5 platform + echo "CONFIG_PLAT_SOLO5=y" >> .config + echo "CONFIG_SOLO5_HVT_TENDER=y" >> .config + + # build both KVM and solo5 make # QEMU statistics using instrumented VMM + echo "QEMU statistics: " > /results.txt script -c 'qemu-system-x86_64 -enable-kvm -nographic -nodefaults \ -no-reboot -no-user-config -m 2M -kernel \ build/helloworld_kvm-x86_64 \ -cpu host,migratable=no,+invtsc' -f /tmp/out cat /tmp/out | grep "startup" >> /results.txt + + # solo5 statistics using instrumented VMM + echo "solo5 statistics: " >> /results.txt + script -c './build/solo5-hvt ./build/helloworld_solo5-x86_64' -f /tmp/out + cat /tmp/out | grep "startup" >> /results.txt