RE: [PATCH] KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table

Zhang, Yang Z
2014-08-07T06:17:59Z

Paolo Bonzini wrote on 2014-08-07:
> Il 07/08/2014 03:31, Zhang, Yang Z ha scritto:
>> Let me give an example to see whether my concern is a real problem:
>> Guest allocates a vector and set it in IOAPIC entry to deliver
>> interrupt. Later it masks the IOAPIC entry(means stop the
>> corresponding device) and assign this vector to a MSI device. With
>> this patch, even the vector is not used by IOAPIC, but it still set
>> eoi exit bitmap unconditionally. The subsequent EOIs to MSI device
>> will force vmexit. Could this happen?
>
> Yes, I guess it could. I'm not sure whether it could on Linux or Windows.
>
>> I think the right fixing is to check the ISR plus TMR to construct
>> the eoi exit bitmap.
>
> Do you care enough to propose a patch? :)
>

Sure. I will do it.

> Paolo

Best regards,
Yang