- Whenever the CPU receives an interrupt, it must handle it, i.e. execute some particular code, e.g.:
- keyboard: read the pressed key and store it in an internal buffer
- mouse: read the new position and display the cursor at the new position
- mouse: read the mouse position and display the cursor at the new position
- etc.
- When the CPU finishes handling the interrupt, it must send a specific command (EOI = End Of Interrupts) to the interrupt controller to indicate it has finished handling the interrupt
- When the CPU finishes handling the interrupt, it must send a specific command (EOI = End Of Interrupts) to the Programmable Interrupt Controller (PIC) to indicate it has finished handling the interrupt
- otherwise that interrupt will never be fired again!
@@ -1240,10 +1276,27 @@ Perform the same steps as on a real physical system[^4]:
- implement ISRs for all potential hardware interrupts that may be triggered
1. Unmask hardware interrupts so that they will be received
\textcolor{myred}{Receiving a hardware interrupts for which there is no properly initialized IVT entry will result in a shutdown/reboot of the guest (as would on a physical machine)}
\textcolor{myred}{Receiving a hardware interrupts for which there is no properly initialized IVT entry will result in a shutdown/reboot of the guest (as it would on a physical machine)}
[^4]: \scriptsize With one exception: in the ISR, no need to send an EOI command to the PIC