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.
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.