Message ID | 20190322115702.10166-1-suravee.suthikulpanit@amd.com (mailing list archive) |
---|---|
Headers | show |
Series | KVM/x86: Add workaround to support ExtINT with AVIC | expand |
2019-03-22 11:57+0000, Suthikulpanit, Suravee: > This series is one of the prerequisites for supporting AMD AVIC with > in-kernel irqchip (kernel_irqchip=on). > > Since AVIC does not support ExtINT interrupt, which is required during > the booting phase of Windows and FreeBSD VMs (e.g. PIT -> PIC -> ExtInt). > This results in VM hang in the boot loader with kernel_irqchip=on mode. > > This series provides workaround by temporary deactivate AVIC and fallback > to use legacy interrupt injection (w/ vINTR and interrupt window). > Then re-activate AVIC once the intrrupts are handled. The solution looks reasonable (although it seems dangerous to me) as we only enable the workaround if the interrupt cannot be immediately injected. The interesting part is that split irqchip works, yet it cannot inject ExtInt correctly either -- does the guest OS behave differently, or does split irqchip just ignore the ExtInt? Thanks.
2019-03-22 11:57+0000, Suthikulpanit, Suravee: > This series is one of the prerequisites for supporting AMD AVIC with > in-kernel irqchip (kernel_irqchip=on). > > Since AVIC does not support ExtINT interrupt, which is required during > the booting phase of Windows and FreeBSD VMs (e.g. PIT -> PIC -> ExtInt). > This results in VM hang in the boot loader with kernel_irqchip=on mode. > > This series provides workaround by temporary deactivate AVIC and fallback > to use legacy interrupt injection (w/ vINTR and interrupt window). > Then re-activate AVIC once the intrrupts are handled. Hm, another idea. It is possible to inject the ExtInt in APICv, but if interrupt injection is currently disabled, we need to wait until the interrupt window opens, which can't be done with int_* controls n. Wouldn't intercepting IRET/STGI/IF writes be enough to eventually reach the point where we can do event_inj? Thanks.