Re: Adding a new interrupt handler to the IDT




I have a system which will be creating CPU interrupts via a user-supplied IDT value. I have a kernel module which will handle the interrupt - I just need to hook this code into the interrupt handler mechanism. I cannot find any documentation on how to create an entry in the IDT or to identify the linkage protocol (assuming I can create an IDT entry).

Note: These are NOT IRQs and, therefore, the request_irq() services cannot be used. This would be equivalent to creating a handler for the INT instruction.

Are you intending to create a back-door to the kernel via
an int instruction?

Where are the non-irq interrupts coming from, and how do
the get onto the CPU chip?


No, this is not a kernel backdoor. I will be running Linux under a custom hipervisor. The hipervisor can signal the guest (i.e. Linux) via an interrupt to handle certain events. I want to insert a handler into the IDT to handle these events. I want my device driver code to use Linux services if they are available rather than writing my custom code to tweak the IDT. I just haven't found these services...
.