Re: [PATCH] KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use

From: Paolo Bonzini
Date: Mon Feb 12 2018 - 06:31:37 EST


On 12/02/2018 12:30, Vitaly Kuznetsov wrote:
>> - Radim's suggestion was to disable DIRECTED_EOI unconditionally but I'm not
>> that radical :-) In theory, we may have multiple IOAPICs in userspace in
>> future and DIRECTED_EOI can be leveraged.
>
> I sort of agree on this, especially considering that we already have
> IOAPIC version 0x20 support in QEMU already.

Yeah, and directed EOI is faster AFAIU.

> My thoughts were: with in-kernel IOAPIC nobody does EOI broadcast
> disabling today or he's already broken -- there's no way to EOI
> level-triggered interrupts. And the patch changes nothing for QEMU
> ioapic implementation.
>
> What I'm not sure about is if we allow migration between in-kernel and
> QEMU ioapic implementations. I don't think so but in case we do it is
> again already broken because going down from 0x20 to 0x11 will leave you
> without EOI register. Migrating from 0x11 to 0x20 should be fine, the
> guest will continue without knowing there's a new feature available.

No, we don't allow that.

Paolo