rust-vmm / vfio

14 stars 20 forks source link

Uses resamplefd to bypass userspace VMM INTx EOI handling #24

Closed zsdaka closed 1 year ago

zsdaka commented 1 year ago

KVM uses resamplefd to enables level triggered interrupts to be posted and re-enabled from vfio with no userspace intervention. Currently vfio-ioctl doesn't provide an interface for registering resamplefd, so vmm must guess the intx eoi by trapping the write/read_bar, and re-enable(unmask) the interrupt in write/read_bar. Here we introduce a new interface set_irq_resample_fd() to set resamplefd to vfio that allow vfio automatically unmask the interrupt in the kernel.