$NetBSD$ --- hw/mips/mipssim.c.orig 2020-08-11 19:17:15.000000000 +0000 +++ hw/mips/mipssim.c @@ -45,6 +45,7 @@ #include "qemu/error-report.h" #include "sysemu/qtest.h" #include "sysemu/reset.h" +#include "hw/virtio/virtio-mmio.h" static struct _loaderparams { int ram_size; @@ -229,6 +230,16 @@ mips_mipssim_init(MachineState *machine) if (nd_table[0].used) /* MIPSnet uses the MIPS CPU INT0, which is interrupt 2. */ mipsnet_init(0x4200, env->irq[2], &nd_table[0]); + + /* + * virtio extention; register 32 virtio devices just after the ISA space + * at 0x1fd10000 with strave of 512 bytes as per i386s microvm target. + */ + for (int i = 0; i < 32; i++) { + sysbus_create_simple("virtio-mmio", + 0x1fd10000 + i * 512, + env->irq[3]); + } } static void mips_mipssim_machine_init(MachineClass *mc)