On Mon, 2018-09-03 at 10:12 +0000, Paul Durrant wrote: > > I believe APIC assist is intended for fully synthetic interrupts. Hm, if by 'fully synthetic interrupts' you mean vlapic_virtual_intr_delivery_enabled(), then no I think APIC assist doesn't get used in that case at all. > Is it definitely this patch that causes the problem? It was only > intended to fix previous incorrectness but, if this is the culprit, > then it's clearly caused collateral damage in a logically unrelated > area. Not entirely. The performance gain we observed with APIC assist in the first place was basically stolen. It wasn't just bypassing the vmexit for that EOI; it was *so* much faster because it actually didn't ever do the EOI properly at all. You fixed that omission and unsurprisingly it got slower again; most of the apparent benefit of APIC assist is lost. But that's because it was never really doing the right thing in the first place. That EOI handling for unmaskable MSI is really painfully slow, so my  hack bypasses it in the common case where it isn't really necessary. FWIW I've done it in my tree with a single per-domain flag rather than a per-vector bitmap now, which makes it slightly simpler.