diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-09-22 07:56:29 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-11-12 12:01:44 +0000 |
commit | 435a82a9d09e6aaca27402a45756de1abd37437f (patch) | |
tree | 7e453e6de028e36514651e257e72c6d937251409 | |
parent | 7a4389a94ecffadf9ece46423c1824280114d5a8 (diff) | |
download | spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.tar spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.tar.gz spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.tar.bz2 spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.tar.lz spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.tar.xz spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.tar.zst spectrum-435a82a9d09e6aaca27402a45756de1abd37437f.zip |
Add IOMMU to other host test targets
This will make it possible to test passthrough in all test targets where it makes sense, rather than just host/rootfs. I think we should consider in future having a single wrapper script that runs QEMU with all the flags necessary to support Spectrum's hardware requirements, because this is only going to get more difficult to maintain once we need to support multiple CPU architectures. Reported-by: Vadim Likholetov <vadim.likholetov@unikie.com> Signed-off-by: Alyssa Ross <hi@alyssa.is> Message-Id: <20220922075629.247058-3-hi@alyssa.is>
-rw-r--r-- | host/initramfs/Makefile | 2 | ||||
-rw-r--r-- | img/combined/run-vm.nix | 3 | ||||
-rw-r--r-- | img/live/Makefile | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile index 596b15e..602b5b3 100644 --- a/host/initramfs/Makefile +++ b/host/initramfs/Makefile @@ -69,7 +69,9 @@ run: build/initramfs build/rootfs.verity.roothash build/live.img -initrd build/initramfs \ -append "ro console=ttyS0 ext=vda intel_iommu=on roothash=$$(< build/rootfs.verity.roothash)" \ -cpu host \ + -machine q35,kernel-irqchip=split \ -display gtk,gl=on \ + -device intel-iommu,intremap=on \ -device virtio-vga-gl \ -device qemu-xhci \ -device usb-storage,drive=drive1,removable=true \ diff --git a/img/combined/run-vm.nix b/img/combined/run-vm.nix index 40eacc4..047bc3f 100644 --- a/img/combined/run-vm.nix +++ b/img/combined/run-vm.nix @@ -13,8 +13,9 @@ writeShellScript "run-spectrum-installer-vm.sh" '' truncate -s 10G "$img" exec 3<>"$img" rm -f "$img" - exec qemu-kvm -cpu host -m 4G -machine q35 -snapshot \ + exec qemu-kvm -cpu host -m 4G -machine q35,kernel-irqchip=split -snapshot \ -display gtk,gl=on \ + -device intel-iommu,intremap=on \ -device virtio-vga-gl \ -device qemu-xhci \ -device usb-storage,drive=drive1,removable=true \ diff --git a/img/live/Makefile b/img/live/Makefile index 5507c2f..773d597 100644 --- a/img/live/Makefile +++ b/img/live/Makefile @@ -61,7 +61,9 @@ clean: run: build/live.img $(QEMU_KVM) -m 4G \ -cpu host \ + -machine q35,kernel-irqchip=split \ -display gtk,gl=on \ + -device intel-iommu,intremap=on \ -device virtio-vga-gl \ -device qemu-xhci \ -device usb-storage,drive=drive1,removable=true \ |