The IrqFd and IrqFdRoute traits in vmcore::irqfd provide kernel-mediated MSI-X interrupt delivery. Currently only implemented for mshv and KVM (Linux). WHP on Windows has a partial equivalent via WHvCreateTrigger.
WHP API gap
WHvCreateTrigger creates a trigger (event + MSI routing) and WHvDeleteTrigger destroys it, but there is no API to update the MSI address/data or mask/unmask a trigger after creation. This makes several IrqFdRoute methods impossible to implement:
IrqFdRoute method |
WHP status |
new_irqfd_route() |
✅ WHvCreateTrigger |
event() |
✅ Event handle from WHvCreateTrigger |
set_msi(addr, data) |
❌ No update API |
clear_msi() |
✅ WHvDeleteTrigger |
mask() |
❌ No mask/disable API |
unmask() |
❌ No unmask/enable API |
Implementing IrqFd for WHP requires additions to the WHP API surface. Until then, WHP-backed VMs cannot use kernel-mediated MSI-X delivery.
Consumers
MsixEmulator::enable_irqfd() — automatically uses routes for kernel-mediated interrupt delivery
- vhost-user devices (future)
- Any future Windows device passthrough
Related: PR #3248 (VFIO device assignment, which introduced the irqfd integration with MsixEmulator).
The
IrqFdandIrqFdRoutetraits invmcore::irqfdprovide kernel-mediated MSI-X interrupt delivery. Currently only implemented for mshv and KVM (Linux). WHP on Windows has a partial equivalent viaWHvCreateTrigger.WHP API gap
WHvCreateTriggercreates a trigger (event + MSI routing) andWHvDeleteTriggerdestroys it, but there is no API to update the MSI address/data or mask/unmask a trigger after creation. This makes severalIrqFdRoutemethods impossible to implement:IrqFdRoutemethodnew_irqfd_route()WHvCreateTriggerevent()WHvCreateTriggerset_msi(addr, data)clear_msi()WHvDeleteTriggermask()unmask()Implementing
IrqFdfor WHP requires additions to the WHP API surface. Until then, WHP-backed VMs cannot use kernel-mediated MSI-X delivery.Consumers
MsixEmulator::enable_irqfd()— automatically uses routes for kernel-mediated interrupt deliveryRelated: PR #3248 (VFIO device assignment, which introduced the irqfd integration with MsixEmulator).