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

From: Radim KrÄmÃÅ
Date: Wed Mar 07 2018 - 08:54:14 EST


2018-03-05 11:29+0100, Vitaly Kuznetsov:
> Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> writes:
>
> > Devices which use level-triggered interrupts under Windows 2016 with
> > Hyper-V role enabled don't work: Windows disables EOI broadcast in SPIV
> > unconditionally. Our in-kernel IOAPIC implementation emulates an old IOAPIC
> > version which has no EOI register so EOI never happens.
> >
> > The issue was discovered and discussed a while ago:
> > https://www.spinics.net/lists/kvm/msg148098.html
> >
>
> Radim, Paolo,
>
> do we have a consensus here? (I wouldn't mind re-writing commit message
> in case you think we shouldn't blame Windows, I just want to have the
> annoying bug fixed :-)

I have applied the patch, thanks.

I think the commit message is correct (this is a Windows bug):

* Current SDM has a different wording that only talks about
EOI-broadcast suppression capability of the CPU.

* The x2APIC document mentions that "the bit is reserved to 0 if the
processor doesn't support Directed EOI" and IOAPIC is not a part of
the processor, so I would assume that it doesn't hold.

Basically, I think that the document confuses "Directed EOI" CPU
feature and "directed EOI" IOAPIC feature, which got amended in SDM.