HV: bug fix update RTE if trigger mode or polarity is updated

Signed-off-by: Abdul Rehman <abdulrehmanee010@gmail.com>
This commit is contained in:
Abdul Rehman 2018-07-10 13:01:56 +05:00 committed by lijinxia
parent a9d04cc5ce
commit 057a384f8e

View File

@ -406,12 +406,13 @@ vioapic_write(struct vioapic *vioapic, uint32_t addr, uint32_t data)
/* remap for active: interrupt mask -> unmask /* remap for active: interrupt mask -> unmask
* remap for deactive: interrupt mask & vector set to 0 * remap for deactive: interrupt mask & vector set to 0
* remap for trigger mode change
* remap for polarity change
*/ */
data64 = vioapic->rtbl[pin].reg; if ( (changed & IOAPIC_RTE_INTMASK) != 0UL ||
if ((((data64 & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMCLR) (changed & IOAPIC_RTE_TRGRMOD) != 0UL ||
&& ((last & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMSET)) (changed & IOAPIC_RTE_INTPOL ) != 0UL ) {
|| (((data64 & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMSET)
&& ((vioapic->rtbl[pin].reg & IOAPIC_RTE_INTVEC) == 0))) {
/* VM enable intr */ /* VM enable intr */
struct ptdev_intx_info intx; struct ptdev_intx_info intx;