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 | #define KVM_EXIT_EPR 23 | 183 | #define KVM_EXIT_EPR 23 |
| 184 | #define KVM_EXIT_SYSTEM_EVENT 24 | 184 | #define KVM_EXIT_SYSTEM_EVENT 24 |
| 185 | #define KVM_EXIT_S390_STSI 25 | 185 | #define KVM_EXIT_S390_STSI 25 |
| 186 | #define KVM_EXIT_IOAPIC_EOI 26 | ||
| 186 | 187 | ||
| 187 | /* For KVM_EXIT_INTERNAL_ERROR */ | 188 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 188 | /* Emulate instruction failed. */ | 189 | /* Emulate instruction failed. */ |
| @@ -333,6 +334,10 @@ struct kvm_run { · 144 unmodified lines | |||
| 333 | __u8 sel1; | 334 | __u8 sel1; |
| 334 | __u16 sel2; | 335 | __u16 sel2; |
| 335 | } s390_stsi; | 336 | } s390_stsi; |
| 337 | /* KVM_EXIT_IOAPIC_EOI */ | ||
| 338 | struct { | ||
| 339 | __u8 vector; | ||
| 340 | } eoi; | ||
| 336 | /* Fix the size of the union. */ | 341 | /* Fix the size of the union. */ |
| 337 | char padding[256]; | 342 | char padding[256]; |
| 338 | }; | 343 | }; |