git: 0e622d39414a - stable/13 - bhyve/vioapic: remove an extra pin masked check

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 26 Jan 2023 18:35:27 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0e622d39414a3cad33a6e1fb254a1537b0cc91bf

commit 0e622d39414a3cad33a6e1fb254a1537b0cc91bf
Author:     Roger Pau Monné <royger@FreeBSD.org>
AuthorDate: 2021-01-19 11:52:44 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-01-26 18:32:36 +0000

    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 a8117da4b879..682e862da63e 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);