Skip to content

Commit 057a384

Browse files
abrehman94lijinxia
authored andcommitted
HV: bug fix update RTE if trigger mode or polarity is updated
Signed-off-by: Abdul Rehman <abdulrehmanee010@gmail.com>
1 parent a9d04cc commit 057a384

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hypervisor/arch/x86/guest/vioapic.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,13 @@ vioapic_write(struct vioapic *vioapic, uint32_t addr, uint32_t data)
406406

407407
/* remap for active: interrupt mask -> unmask
408408
* remap for deactive: interrupt mask & vector set to 0
409+
* remap for trigger mode change
410+
* remap for polarity change
409411
*/
410-
data64 = vioapic->rtbl[pin].reg;
411-
if ((((data64 & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMCLR)
412-
&& ((last & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMSET))
413-
|| (((data64 & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMSET)
414-
&& ((vioapic->rtbl[pin].reg & IOAPIC_RTE_INTVEC) == 0))) {
412+
if ( (changed & IOAPIC_RTE_INTMASK) != 0UL ||
413+
(changed & IOAPIC_RTE_TRGRMOD) != 0UL ||
414+
(changed & IOAPIC_RTE_INTPOL ) != 0UL ) {
415+
415416
/* VM enable intr */
416417
struct ptdev_intx_info intx;
417418

0 commit comments

Comments
 (0)