From 0e622d39414a3cad33a6e1fb254a1537b0cc91bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Tue, 19 Jan 2021 12:52:44 +0100 Subject: [PATCH] bhyve/vioapic: remove an extra pin masked check vioapic_send_intr does already check whether the pin is masked before injecting the interrupt, there's no need to do it in vioapic_write also. No functional change intended. Reviewed by: grehan Differential revision: https://reviews.freebsd.org/D28236 (cherry picked from commit 49429cf9be7f43c37723175f90c56b29e29d1680) --- sys/amd64/vmm/io/vioapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/amd64/vmm/io/vioapic.c b/sys/amd64/vmm/io/vioapic.c index a8117da4b87..682e862da63 100644 --- a/sys/amd64/vmm/io/vioapic.c +++ b/sys/amd64/vmm/io/vioapic.c @@ -363,12 +363,10 @@ vioapic_write(struct vioapic *vioapic, int vcpuid, uint32_t addr, uint32_t data) /* * Generate an interrupt if the following conditions are met: - * - pin is not masked * - previous interrupt has been EOIed * - pin level is asserted */ - if ((vioapic->rtbl[pin].reg & IOART_INTMASK) == IOART_INTMCLR && - (vioapic->rtbl[pin].reg & IOART_REM_IRR) == 0 && + if ((vioapic->rtbl[pin].reg & IOART_REM_IRR) == 0 && (vioapic->rtbl[pin].acnt > 0)) { VIOAPIC_CTR2(vioapic, "ioapic pin%d: asserted at rtbl " "write, acnt %d", pin, vioapic->rtbl[pin].acnt); -- 2.45.0