From nobody Thu Apr 16 15:12:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fxM1t1hnjz6Zpvp for ; Thu, 16 Apr 2026 15:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fxM1s5sTwz4N56 for ; Thu, 16 Apr 2026 15:12:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776352337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MphIP0PAi1CXMfndd5levI+PtD8ZNJsqT5rmz1N6+gw=; b=VJd0/fjit6if0Pu/wLse6oypD7z9HkVTx2d6etIWut7SZIMGKDp6zkWYkbBz4JWS6o+/LK rZSWnhEOZWlwID0pzWrMvm6Mt9vREa+Rymlk+PURj3wRYztgpHHb8afXgO/Cx63feAOayh Ckp9d5138LHsYzT4H+9+5UAumq/Xmh4dGpa5gMM9PEh0H/yZgy7uVO9W7A+LZgASMJ+BN/ vI6pIdtmwxkqOKjl5pLZYV6wBxEbhqvX0jIEDfRW9O+z2Ss6oF9gdy+Z7nZK10MUV3W5R1 5leiSdUqxnaaktMed9gFcR8Ei35hsjuEyqt8Ed1w9fMQ1spwaoaQ/ijbmjj/tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776352337; a=rsa-sha256; cv=none; b=ReXvxI+xNekjGO93L8hesSYMgyxV+oH0tSi7mBSpCnd/NMFaih4CJyy9gmu41mXkoyIRKy CWfnnUXqlpe/ccDHcAdQj8Nv91PHw5ITL6EA/fIt+8jG5oLdd6slw4NJv5ouJA7NP9fxnA Jf9nqXeAbKtTMo0L7irrWs3GoDTiLnBNFQoB6uXygR1rexxsHac4eik+EdJnLDSVohS4cN rbms2xWo2Gkrzjx2X27SsZfu7kXqWbzUKh2MRkdjCkDqVVFHag8R0aeGUnbuD/y9XtJSjs N7sA9upIT89M8j/ZpigFrW5hEfnyEg/IYX6lz+9/dxinmxFWM8Ja1/c3OmGCdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776352337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MphIP0PAi1CXMfndd5levI+PtD8ZNJsqT5rmz1N6+gw=; b=Zoq8BOD9IossQar9bEZvGkg6mnmwd2akhieUlVpHkN6lA7ZKCGDHOCgQli1D26UvPqqtfg B48KrGCHKChbM1s9EgzECDXAzIeytJbGtDRx4cCIxOBWQ6dNb+Qbl1qGn0fEMcs74HLvwf 6P5DAyEanS8jURq390YQqXBsV6qc5D7BtMwoOVmkxWhw4JFqkVdiyonBvcpOi7jPgFXJHP XMicopqA6SF70nyuGhTUKYPRN/GzF0XgWbP1JPz6p7EtWSrYtqvppjQL5U7OqRQVJJWG4r qt0WcYu7r/bIGnu32rLBinHXhpH75PzwuHnaa8uNjR67+H1WhrI8LFWNAuDHMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fxM1s5HY8z1C4s for ; Thu, 16 Apr 2026 15:12:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e98f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 16 Apr 2026 15:12:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: b75a566d1fa8 - stable/14 - x86: Add struct ioapic_intsrc.io_valid List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b75a566d1fa800d8307a7faa50ec22c2a93145bf Auto-Submitted: auto-generated Date: Thu, 16 Apr 2026 15:12:17 +0000 Message-Id: <69e0fc51.1e98f.7a384c40@gitrepo.freebsd.org> The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=b75a566d1fa800d8307a7faa50ec22c2a93145bf commit b75a566d1fa800d8307a7faa50ec22c2a93145bf Author: Colin Percival AuthorDate: 2026-03-20 22:02:29 +0000 Commit: Colin Percival CommitDate: 2026-04-16 15:11:54 +0000 x86: Add struct ioapic_intsrc.io_valid As of this commit, io_valid is always set to 1; but a future commit will set it to 0, at which point IOART_INTMSET will be set to forcibly disable interrupt sources regardless of whether they are requested to be "masked". Reviewed by: kib MFC after: 3 weeks Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D56006 (cherry picked from commit 1d0ccd61563d48e914dccf3dd5cf0280d8331ec1) --- sys/x86/x86/io_apic.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/x86/x86/io_apic.c b/sys/x86/x86/io_apic.c index 525547f9482a..5dd1bfc3a068 100644 --- a/sys/x86/x86/io_apic.c +++ b/sys/x86/x86/io_apic.c @@ -85,6 +85,7 @@ struct ioapic_intsrc { u_int io_activehi:1; u_int io_edgetrigger:1; u_int io_masked:1; + u_int io_valid:1; int io_bus:4; uint32_t io_lowreg; u_int io_remap_cookie; @@ -193,7 +194,7 @@ _ioapic_eoi_source(struct intsrc *isrc, int locked) ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin), low1); low1 = src->io_lowreg; - if (src->io_masked != 0) + if (src->io_masked != 0 || src->io_valid == 0) low1 |= IOART_INTMSET; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin), low1); @@ -268,7 +269,9 @@ ioapic_enable_source(struct intsrc *isrc) mtx_lock_spin(&icu_lock); if (intpin->io_masked) { - flags = intpin->io_lowreg & ~IOART_INTMASK; + flags = intpin->io_lowreg; + if (intpin->io_valid) + flags &= ~IOART_INTMASK; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), flags); intpin->io_masked = 0; @@ -375,7 +378,7 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) low |= IOART_INTAHI; else low |= IOART_INTALO; - if (intpin->io_masked) + if (intpin->io_masked || !intpin->io_valid) low |= IOART_INTMSET; switch (intpin->io_irq) { case IRQ_EXTINT: @@ -697,11 +700,13 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase) intpin->io_activehi = 1; intpin->io_edgetrigger = 1; intpin->io_masked = 1; + intpin->io_valid = 1; } else { intpin->io_bus = APIC_BUS_PCI; intpin->io_activehi = 0; intpin->io_edgetrigger = 0; intpin->io_masked = 1; + intpin->io_valid = 1; } /* @@ -806,6 +811,7 @@ ioapic_set_nmi(void *cookie, u_int pin) io->io_pins[pin].io_bus = APIC_BUS_UNKNOWN; io->io_pins[pin].io_irq = IRQ_NMI; io->io_pins[pin].io_masked = 0; + io->io_pins[pin].io_valid = 1; io->io_pins[pin].io_edgetrigger = 1; io->io_pins[pin].io_activehi = 1; if (bootverbose) @@ -829,6 +835,7 @@ ioapic_set_smi(void *cookie, u_int pin) io->io_pins[pin].io_bus = APIC_BUS_UNKNOWN; io->io_pins[pin].io_irq = IRQ_SMI; io->io_pins[pin].io_masked = 0; + io->io_pins[pin].io_valid = 1; io->io_pins[pin].io_edgetrigger = 1; io->io_pins[pin].io_activehi = 1; if (bootverbose) @@ -855,6 +862,7 @@ ioapic_set_extint(void *cookie, u_int pin) io->io_pins[pin].io_masked = 0; else io->io_pins[pin].io_masked = 1; + io->io_pins[pin].io_valid = 1; io->io_pins[pin].io_edgetrigger = 1; io->io_pins[pin].io_activehi = 1; if (bootverbose)