@@ -1231,7 +1244,7 @@ Create a file descriptor for event notification by using the `eventfd` function:
// Create a file descriptor for event (hardware interrupts) notification
int fd = eventfd(0, 0);
if (fd == -1) {
err(1, "eventfd failed");
err(1, "eventfd failed: ");
}
```
...
...
@@ -1250,7 +1263,7 @@ if (fd == -1) {
};
if (ioctl(vm->vmfd, KVM_IRQFD, &irqfd) < 0) {
err(1, "KVM_IRQFD error");
err(1, "KVM_IRQFD error: ");
}
```
...
...
@@ -1276,7 +1289,7 @@ 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 it would on a physical machine)}
\textcolor{myred}{Receiving a hardware interrupts for which there is no properly initialized IVT entry will result in a 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