Re: Virtio-IOMMU interrupt remapping design

2025-06-16 Thread Jason Gunthorpe
On Mon, Jun 16, 2025 at 12:53:40PM -0400, Demi Marie Obenour wrote: > > AFAIK hyperv shows how to build something like this. > Would this need KVM patches? I'm concerned that implementing this > in userspace would interact badly with the irqfd fast path. I don't know. I think you get the same is

Re: Virtio-IOMMU interrupt remapping design

2025-06-16 Thread Demi Marie Obenour
On 6/16/25 09:20, Jason Gunthorpe wrote: > On Sun, Jun 15, 2025 at 02:47:15PM -0400, Demi Marie Obenour wrote: > >> Is a paravirtualized IOMMU with interrupt remapping something that makes >> sense? > > IMHO linking interrupt remapping to the iommu is a poor design, > interrupt routing belongs in

Re: Virtio-IOMMU interrupt remapping design

2025-06-16 Thread Jason Gunthorpe
On Sun, Jun 15, 2025 at 02:47:15PM -0400, Demi Marie Obenour wrote: > Is a paravirtualized IOMMU with interrupt remapping something that makes > sense? IMHO linking interrupt remapping to the iommu is a poor design, interrupt routing belongs in the irq subsystem, not in the iommu. The fact AMD a

Virtio-IOMMU interrupt remapping design

2025-06-15 Thread Demi Marie Obenour
Virtio-IOMMU interrupt remapping turned out to be much harder than I realized. The main problem is that interrupt remapping is set up very early in boot. In fact, Linux calls the interrupt remapping probe function from the APIC initialization code: x86_64_probe_apic -> enable_IR_x2apic -> irq_rem