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

2014-08-06 Thread Zhang, Yang Z
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

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

2014-08-06 Thread Paolo Bonzini
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

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

2014-08-06 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-08-06: > Il 06/08/2014 16:03, Zhang, Yang Z ha scritto: >> Paolo Bonzini wrote on 2014-07-31: >>> Probably, the guest is masking the interrupt in the redirection >>> table in the interrupt routine, i.e. while the interrupt is set in a >>> LAPIC's ISR. >>> The simplest f

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

2014-08-06 Thread Paolo Bonzini
Il 06/08/2014 16:03, Zhang, Yang Z ha scritto: > Paolo Bonzini wrote on 2014-07-31: >> Probably, the guest is masking the interrupt in the redirection table in >> the interrupt routine, i.e. while the interrupt is set in a LAPIC's ISR. >> The simplest fix is to ignore the masking state, we would ra

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

2014-08-06 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-07-31: > Currently, the EOI exit bitmap (used for APICv) does not include > interrupts that are masked. However, this can cause a bug that manifests > as an interrupt storm inside the guest. Alex Williamson reported the > bug and is the one who really debugged this; I

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

2014-07-30 Thread Alex Williamson
On Wed, 2014-07-30 at 18:12 +0200, Paolo Bonzini wrote: > Currently, the EOI exit bitmap (used for APICv) does not include > interrupts that are masked. However, this can cause a bug that manifests > as an interrupt storm inside the guest. Alex Williamson reported the > bug and is the one who rea

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

2014-07-30 Thread Paolo Bonzini
Currently, the EOI exit bitmap (used for APICv) does not include interrupts that are masked. However, this can cause a bug that manifests as an interrupt storm inside the guest. Alex Williamson reported the bug and is the one who really debugged this; I only wrote the patch. :) The scenario invo