From nobody Thu Nov 12 14:45:04 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 4jQNTX3Qc1z70jN7 for ; Thu, 12 Nov 2026 14:45:04 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQNTX0h6Gz4rpR for ; Thu, 12 Nov 2026 14:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794494704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b8QgM/SHqx+lX/Lnaw9W4ogCkgszwviPKWh2RbtBbbI=; b=hhD5EfG0ZU27e/HO8kC7kZIZUYVsM0GJgCjiwiuftZEtd4+AU1V0XFnK1j5sBj8yRRCehu 59tyDK6uiptzdnp07L6tDqICQFeIoLe02NVlh9wRLT8Zj6TDazjzrFYWbOZ/ToCP3NhPuQ hwd0NBzDQHPAOXVOe+hhzHBC79E8AXXGyizLSqhParoUJp1VEEtsIn88veUTk8a7iS95Dp F9IWn/v1lzrZJJMfdpItAxAwpcpzgNTMXCn7sADJklfc7uWnZXrAIKSksEUnI7qtH6/kRq lsuvpsF+vUo1y1nKd7xEbj6EpB1heHQUjbCRIYvmMb/vBdZx2h3wOLdhapWn1A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794494704; b=Ml6R2m0Sl5YRcJNllvNptNPaAuTMrBnOHBbw/2Ycrxa4YG1MtLvhVanoQdTI7VTbRHo43n ZCGuMYk9pcK5w8Dg761WvhUWko8fzVg14mdjHdncNe1ZC9ms2izlX3T5tI5Dv9DhvDMG2M syxP4Orl4Hn8Z/AYSkDPTp7HLRelrE6b4p10xObhkGFMIkrfmEW+2SBjc92R8FZw89tEGd sl5/IpHd+GyJqn4oBn8ZZafaxDt9jxbYEmWj5P7QvD+X4d/mI4wmZEP7TClKMEIvQePYuX KMcofcmrNjtrrmOhEiGCVHiOU6K+Su0TPNlfF5Q/PnDP60BuGH9jMReH8Hb6Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794494704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b8QgM/SHqx+lX/Lnaw9W4ogCkgszwviPKWh2RbtBbbI=; b=O++xggr1Z+mez9PUW+TE47BPq9cZFkmDAVlct9YLCquQR8zObw4NUljOKuVwy24Oqriayh WmDs1hzsF32GHnGoT1uFWrFSwi8SjiQ52v9iq2fwMc6hUqK3RPQ++By/WptJri5YG1whGN JMaNXGBUeSA4UebnODH2Zvbg0IF7lTFaFHr8ICdT8OimsJNknANg4946AQdj4bjOvQiPfP EBEtuOEevw3njiCAoMIbMdKQ7/v3PO7RBNmFj6+6S0FayIMqHXNR5yyGwh31jSfSSPcfYt BdUoGMVa7v6+L4m0dgdcrBMP2tG6YE4gXZvZUoz9SOuyqiLUTGpZARujFsuObw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQNTX0LWtz16pC for ; Thu, 12 Nov 2026 14:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 183bb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 14:45:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Hayzam Sherif From: Dave Cottlehuber Subject: git: ad0569f10776 - stable/15 - vmm: Skip TMR rebuilds for edge-to-edge IOAPIC writes List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ad0569f107768c6eaa1ecd1f407b2a42093de917 Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 14:45:04 +0000 Message-Id: <6af5d0f0.183bb.7dbb0a86@gitrepo.freebsd.org> The branch stable/15 has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=ad0569f107768c6eaa1ecd1f407b2a42093de917 commit ad0569f107768c6eaa1ecd1f407b2a42093de917 Author: Hayzam Sherif AuthorDate: 2026-11-02 16:21:36 +0000 Commit: Dave Cottlehuber CommitDate: 2026-11-12 14:44:33 +0000 vmm: Skip TMR rebuilds for edge-to-edge IOAPIC writes IOAPIC redirection-table writes rendezvous all active vCPUs to rebuild their vlapic trigger-mode registers when fields other than mask or polarity change. Retargeting an edge-triggered pin incurs this cost even though it does not contribute to the TMR. vioapic_update_tmr() rebuilds the TMR from level-triggered entries only. Skip the rendezvous when the modified entry is edge-triggered both before and after the write. Check the old and new trigger modes so that edge-to-level and level-to-edge transitions still rebuild the TMR. Retain the existing all-vCPU rebuild path, mask/polarity exclusions and remote-IRR handling. Approved by: markj, cperciva Differential Revision: https://reviews.freebsd.org/D60721 MFC to: releng/15.2 Reported by: Wanpeng Qian Reviewed by: Wanpeng Qian , markj (cherry picked from commit 0340fb03288166091a8cdf694f5fed20e4c4f9ac) --- sys/amd64/vmm/io/vioapic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/amd64/vmm/io/vioapic.c b/sys/amd64/vmm/io/vioapic.c index a3956785d049..e48f8ba66bcf 100644 --- a/sys/amd64/vmm/io/vioapic.c +++ b/sys/amd64/vmm/io/vioapic.c @@ -370,12 +370,14 @@ vioapic_write(struct vioapic *vioapic, struct vcpu *vcpu, uint32_t addr, pin, vioapic->rtbl[pin].reg); /* - * If any fields in the redirection table entry (except mask - * or polarity) have changed then rendezvous all the vcpus - * to update their vlapic trigger-mode registers. + * Only level-triggered pins contribute to the TMR. If fields + * other than mask or polarity changed and the pin was or is + * level-triggered, rendezvous all the vcpus to update their + * vlapic trigger-mode registers. */ changed = last ^ vioapic->rtbl[pin].reg; - if (changed & ~(IOART_INTMASK | IOART_INTPOL)) { + if ((changed & ~(IOART_INTMASK | IOART_INTPOL)) != 0 && + ((last | vioapic->rtbl[pin].reg) & IOART_TRGRLVL) != 0) { VIOAPIC_CTR1(vioapic, "ioapic pin%d: recalculate " "vlapic trigger-mode register", pin); VIOAPIC_UNLOCK(vioapic);