> Date: Tue, 19 Dec 2023 08:55:32 +0100 > From: Emile 'iMil' Heitor <i...@home.imil.net> > > Maybe related: the interrupt handler function I wrote uses > softint_establish() as there's no "real" hardware behind this > block device, is this the correct way to deal with it?
You need to use softint_schedule in order for the softint to run. Otherwise it doesn't do anything. It doesn't matter whether there's any physical manifestation of the hardware in any philosophical sense of the real world; what matters is how the host triggers some kind of entry into the guest. softint(9) doesn't know anything about hardware/host -- it's purely a NetBSD-internal software abstraction, like workqueue(9), for software to queue a task and then run it. Normally softint_schedule is called from a hard interrupt handler. Here, you need something in the host to get hard interrupts. For example, on ACPI systems there are ACPI interrupt resources that can be used with acpi_intr_establish; on FDT systems, device nodes have interrupt properties that can be used with fdtbus_intr_establish. How does FreeBSD get x86 mmio intrs on these systems?