Adds KVM_EXIT_IOAPIC_EOI which allows the kernel to EOI level-triggered IOAPIC interrupts. Uses a per VCPU exit bitmap to decide whether or not the IOAPIC needs to be informed (which is identical to the EOI_EXIT_BITMAP field used by modern x86 processors, but can also be used to elide kvm IOAPIC EOI exits on older processors). [Note: A prototype using ResampleFDs found that decoupling the EOI from the VCPU's thread made it possible for the VCPU to not see a recent EOI after reentering the guest. This does not match real hardware.] Compile tested for Intel x86.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -183,6 +183,7 @@ struct kvm_s390_skeys { · 182 unmodified lines | ||
| 183 | 183 | #define KVM_EXIT_EPR 23 |
| 184 | 184 | #define KVM_EXIT_SYSTEM_EVENT 24 |
| 185 | 185 | #define KVM_EXIT_S390_STSI 25 |
| 186 | +#define KVM_EXIT_IOAPIC_EOI 26 | |
| 186 | 187 | |
| 187 | 188 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 188 | 189 | /* Emulate instruction failed. */ |
| @@ -333,6 +334,10 @@ struct kvm_run { · 144 unmodified lines | ||
| 333 | 334 | __u8 sel1; |
| 334 | 335 | __u16 sel2; |
| 335 | 336 | } s390_stsi; |
| 337 | + /* KVM_EXIT_IOAPIC_EOI */ | |
| 338 | + struct { | |
| 339 | + __u8 vector; | |
| 340 | + } eoi; | |
| 336 | 341 | /* Fix the size of the union. */ |
| 337 | 342 | char padding[256]; |
| 338 | 343 | }; |