riscv-aia icon indicating copy to clipboard operation
riscv-aia copied to clipboard

Question about wired interrupt pass through to VM

Open matthewgui opened this issue 4 months ago • 2 comments

For PCIe device, it can write msi and using iommu to pass through to VM. But for some device with wired interrupt(using aplic delivery to imsic),how are the interrupts passed through to the VM? How does the virtual machine register interrupts with the physical interrupt controller which is used by Host?

Thanks for your reply!

matthewgui avatar Aug 11 '25 02:08 matthewgui

The implementation of wired interrupt pass-through using APLIC MSI-mode will tend to be hypervisor specific. The general preferred approach would be that hypervisor trap-n-emulate APLIC MSI-mode for Guest/VM and hypervisor will take host interrupt in HS-mode and manually write appropriate IMSIC VS-file based on emulated APLIC MSI-mode configuration.

avpatel avatar Aug 11 '25 11:08 avpatel

Hi avpatel,

thank you for your reply! I feel this method of forwarding interrupts to the Guest/VM via hypervisor is not pass through, are there any other pass-through methods on linux kvm?

matthewgui avatar Aug 11 '25 13:08 matthewgui