From nobody Thu Nov 12 23:41:54 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 4jQcNz1Pfjz6xnR1 for ; Thu, 12 Nov 2026 23:41:55 +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 4jQcNy6YT9z4RcP for ; Thu, 12 Nov 2026 23:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794526914; 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=twzuXylOrefSp7tgfPbIL/8WV3P0Cc+K7us7B715whk=; b=JIddZLaKHNejt/mYbIj8ATtx83mN8pJblJ5xx0xJ15aDdTBbegi58qtrIAVA7UpSoNn+D4 t5p/SG/ZYOn9XsBqt/qh694eT1OJNjI8YaHTR2YM3TDaNIrgC6y8cg8bD2VUHgNO0G+KDr ++ck7Lp+rVyhEeJW+l4x4QUyCK8u5mk6B4x4SJkLIN9U0tk4wC8gC/YFYAUrIQ9kR9YqPm 9M1F6OLst+YoDgTzH695lS4uX8NrQgTnfpoWbOVFg4v1LThSOJ10wx6rGMPoQd15hUcchY d5nW0mi10fQgMU846UXK9zftxvXpzg7XYgT2n9qiAhcyzsiCkhqGV+cwXDJR/A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794526914; b=hyg80m9nKXBYUbdwcRhxpuk83AxqNwWQylB4yvZnKjMZaODDA76dvoVpDPYQK6Q5fANkV7 iKPH1cMNjYQYX3qyhSgskGk5pRa2RXemM9Kgvo4SF+kO9brn8RU/7XIK6HzqeZLLlWz5K1 NhYYpsDtCg3PSNvSEsd1HBilrW4ixRy1+VBDzbLZ7vPsEJ0mj7varKuJsWZUd2Os6muE8s HN7db9C/RClHOj6KKXKs/arbry/1j8JPiRNoe8IH7YjwWw1gFEkgUxaSF2CWmi1tyumsdw VprovjNyYexwQsJ6gQPJbrKmeyMoN3c+Q7Z3DXaRKONHCzT3Sts+ta9ziJXqAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794526914; 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=twzuXylOrefSp7tgfPbIL/8WV3P0Cc+K7us7B715whk=; b=Vj3bIHYpkJTZNuLAfHPLDdfIgzedPsxfsDxEe0e/Df8DnvaFMjEahr15Pn/hJ5WyHca0CY JhclOTbhSr4pmxK2zSjpVJnB2NYG8gVB9zotGzypVGpd+GOZJKv3hHcWas+DtG4uJDEFKe 0Gkbys8gOMfFkgDquMIflL8wOGt6CUxPhz1smItlP2Tqb+Mv87TkqY6ehmmZk6TulncTjg jl76mlD2BzmyapU3adT4KC+S5Iaysg0kE39EhGpbuIGvomUNAORdjI3ziGIs69JuVdQ3m/ iNMHOAzu0dpB0TaCAsu+g6wrhN0/Hj3xmwNZiTxeLwDFglxkyoT2CJ82JV6PGg== 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 4jQcNy6DLRz1NKQ for ; Thu, 12 Nov 2026 23:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e96a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 23:41:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Hayzam Sherif From: Colin Percival Subject: git: 81c09c2f4105 - releng/15.2 - 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.2 X-Git-Reftype: branch X-Git-Commit: 81c09c2f4105cbd7b2bcdfe11d490bcd04e1aa4b Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 23:41:54 +0000 Message-Id: <6af64ec2.e96a.109ae0af@gitrepo.freebsd.org> The branch releng/15.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=81c09c2f4105cbd7b2bcdfe11d490bcd04e1aa4b commit 81c09c2f4105cbd7b2bcdfe11d490bcd04e1aa4b Author: Hayzam Sherif AuthorDate: 2026-11-02 16:21:36 +0000 Commit: Colin Percival CommitDate: 2026-11-12 23:41:30 +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: re (cperciva) 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) (cherry picked from commit ad0569f107768c6eaa1ecd1f407b2a42093de917) --- 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);