From 79a50341661c42da0c4d62ba533db893357678be Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sat, 21 Jan 2023 10:57:51 +0100
Subject: debvm-run: also avoid pci networking for m68k

---
 bin/debvm-run | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/debvm-run b/bin/debvm-run
index 4c8bb5a..6a22a49 100755
--- a/bin/debvm-run
+++ b/bin/debvm-run
@@ -213,7 +213,6 @@ set -- \
 	-kernel "$KERNELTMP" \
 	-initrd "$INITRDTMP" \
 	-drive "media=disk,format=raw,discard=unmap,file=$IMAGE,if=virtio,cache=unsafe" \
-	-device "virtio-net-pci,netdev=net0" \
 	-object rng-random,filename=/dev/urandom,id=rng0 \
 	"$@"
 
@@ -221,6 +220,7 @@ QEMU="qemu-system-$VMARCH"
 CPU=
 MACHINE=
 MAX_SMP=
+NIC_DEV=virtio-net-pci,netdev=net0
 RNG_DEV=virtio-rng-pci,rng=rng0
 
 case "$VMARCH" in
@@ -244,6 +244,7 @@ case "$VMARCH" in
 	;;
 	m68k)
 		MACHINE="type=virt"
+		NIC_DEV=virtio-net-device,netdev=net0
 		RNG_DEV=virtio-rng-device,rng=rng0
 	;;
 	mips64el)
@@ -328,6 +329,7 @@ fi
 set -- \
 	-append "$KERNEL_CMDLINE" \
 	-netdev "$NETDEV" \
+	-device "$NIC_DEV" \
 	"$@"
 
 set -ex
-- 
cgit v1.2.3