Skip to content

Commit 3feb426

Browse files
krady21dbaluta
authored andcommitted
tools: labs: qemu: Add option for nested virtualization
1 parent 409c6f0 commit 3feb426

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/labs/qemu/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ QEMU_OPTS = -kernel $(ZIMAGE) \
2727
--append "root=/dev/vda loglevel=15 console=hvc0" \
2828
--display $(QEMU_DISPLAY) -s -m 256
2929

30+
ifdef ENABLE_KVM
31+
QEMU_OPTS += -enable-kvm -cpu host
32+
ENABLE_KVM_SUDO = sudo
33+
endif
34+
3035
boot: .modinst tap0 tap1 pipe1.in pipe1.out pipe2.in pipe2.out disk1.img disk2.img nttcp-run
31-
ARCH=$(ARCH) qemu/qemu.sh $(QEMU_OPTS)
36+
$(ENABLE_KVM_SUDO) ARCH=$(ARCH) qemu/qemu.sh $(QEMU_OPTS)
3237

3338
TEMPDIR := $(shell mktemp -u)
3439

0 commit comments

Comments
 (0)