0

I am learning VFIO in Linux, and found there is a kernel module irq_bypass, which is being used by VFIO. I read its codes, and found it has functions to add/delete irq producer and consumer. The code submitter described as follows,

The IRQ bypass manager here is meant to provide the shim to connect
interrupt producers, generally the host physical device driver, with
interrupt consumers, generally the hypervisor, in order to configure
these bypass mechanism

So I wrote a module to call the irq_bypass interfaces to figure out its working flow.
The kernel module register irq producer and consumer for an interrupt generated by calling 'int' instruction within this module. But I am not sure if I am doing right, since I did NOT see the consumer is being triggered.

Maybe I am wrong in understanding the mechanism of the irq_bypass module, if so, how does it work in virtualization system or why it is needed in KVM/VFIO in Linux?

wangt13
  • 959
  • 7
  • 17
  • I think you can find the answer here, if you understand that. https://lwn.net/Articles/653706/ – Yaroslav Nikitenko Oct 28 '21 at 13:15
  • Thanks for replying. Yes, I posted my question after reading something like that, but I cannot fully understand how IRQ_BYPASS is working, if there is any code to demonstrate its working flow that will be fine. – wangt13 Dec 29 '21 at 01:23

0 Answers0