summaryrefslogtreecommitdiffstats
path: root/Documentation/ja_JP/stable_api_nonsense.txt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-07-30 18:07:24 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-07-30 20:22:30 +0200
commit0f6c0a740b7d3e1f3697395922d674000f83d060 (patch)
treeebd3d3ded7c699afda555d1332788c4f8e931533 /Documentation/ja_JP/stable_api_nonsense.txt
parent296f047502f1b3ddfd63adbc192624ce80740081 (diff)
KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table
Currently, the EOI exit bitmap (used for APICv) does not include interrupts that are masked. However, this can cause a bug that manifests as an interrupt storm inside the guest. Alex Williamson reported the bug and is the one who really debugged this; I only wrote the patch. :) The scenario involves a multi-function PCI device with OHCI and EHCI USB functions and an audio function, all assigned to the guest, where both USB functions use legacy INTx interrupts. As soon as the guest boots, interrupts for these devices turn into an interrupt storm in the guest; the host does not see the interrupt storm. Basically the EOI path does not work, and the guest continues to see the interrupt over and over, even after it attempts to mask it at the APIC. The bug is only visible with older kernels (RHEL6.5, based on 2.6.32 with not many changes in the area of APIC/IOAPIC handling). Alex then tried forcing bit 59 (corresponding to the USB functions' IRQ) on in the eoi_exit_bitmap and TMR, and things then work. What happens is that VFIO asserts IRQ11, then KVM recomputes the EOI exit bitmap. It does not have set bit 59 because the RTE was masked, so the IOAPIC never sees the EOI and the interrupt continues to fire in the guest. My guess was that the guest is masking the interrupt in the redirection table in the interrupt routine, i.e. while the interrupt is set in a LAPIC's ISR, The simplest fix is to ignore the masking state, we would rather have an unnecessary exit rather than a missed IRQ ACK and anyway IOAPIC interrupts are not as performance-sensitive as for example MSIs. Alex tested this patch and it fixed his bug. [Thanks to Alex for his precise description of the problem and initial debugging effort. A lot of the text above is based on emails exchanged with him.] Reported-by: Alex Williamson <alex.williamson@redhat.com> Tested-by: Alex Williamson <alex.williamson@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/ja_JP/stable_api_nonsense.txt')
0 files changed, 0 insertions, 0 deletions