From nobody Wed Sep 04 21:50:57 2024 X-Original-To: dev-commits-src-main@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 4Wzblj3gwVz5VS33; Wed, 04 Sep 2024 21:50:57 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wzblj23lxz4hZ1; Wed, 4 Sep 2024 21:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725486657; 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=xjU95wAT60uxAurfGdrh9JfntffLlxofRr2qJlAvaI4=; b=tC5YEBZ4uSRrWJCUUzX9rQqoUXKg7055RkDVNYENtd5hC7BC/z1VPnHShDyDjI78clm9Jv L9m8iuMpODkkibFB/9VntVyPAi/t4p0Atyt1l9GITNhLiAl0odFjKm6/aIWjYGQgH7t5XW OjqAwg57VeUBu/xkszYGA6AkNEQvTnTBUw2rWebLGq1W/4KkUF/Qbmqz6FgVkSRCdw49bU VfcSqsqsQTo0GOqEZzHgv7tCuCvyHgfZLG6Iixfj9QaXObYtyGAwyd1xjW+YBnESuqYEwT D2odMDyeSzhUol8qlpm8d/24k1uLQAKWsfrCmDeRGW5BDLjDLqdFwOXbFKx31A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725486657; a=rsa-sha256; cv=none; b=MCmBiwmFfbBlrpMAY89XKMlKAdzZ/OsXpAh6nJlSQfl0YF2B5PRYg2ODffUuTJVvyEuY6T nhd8ErFcuRoa75kDAjEZDoXjxuP5kLif/JCvLgTtRX/SW3Ai/3Qb6t7lMX6enQ4l8DtF8I M/6qtanTFaZngXOJ98VAS1znilosebXTDOhxM9bnozgN8skOc7ZKax8EoUExPE8LfOa6GC 93ID16egTF5gv2BPa5t113PdMjlZQH4TZwd2Tn5jBgU6ftlkpbWB+sQ74YsRirDuT+jBjR tS4GxZZngwO6RmYVQaLkXIbytTkPbsKYDPIf1hcv0Ae0KClPCNmzQGbF9Uob1Q== 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=1725486657; 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=xjU95wAT60uxAurfGdrh9JfntffLlxofRr2qJlAvaI4=; b=nJOzdDp+H5lKyJFcVFD3y+dd/cNYMxRA6G92Xucueumar4ObnYOEOMjvK8hLeu4vLY50CS EUxo9PNMQhY6X6XAv/J25zHhxDbTbADx3UzE0ylzM4X3Wki5imBOkIUlOkim6Vma7Vf/q7 qSXwSSHsiEyKrBtRSwDuWuEfprY8GzqD+ND2yoQhGHNqBIe/YaRLIXmVLMFhKdHObnkcz4 oLIVmtQLinzPwTnN0MRP4h8yLm5HW/65HWuG7tL0w27Xruf/C/W/Zm0SyejEJZbN8CQaHW 0DFN2ZsE7O9EnTtIE8trFqF4lEJ3fMx/g4tlWnyZ29b/1NuIz8hZuiqzIOAu2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wzblj1VSgzhND; Wed, 4 Sep 2024 21:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 484LovtD033210; Wed, 4 Sep 2024 21:50:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 484LovNe033207; Wed, 4 Sep 2024 21:50:57 GMT (envelope-from git) Date: Wed, 4 Sep 2024 21:50:57 GMT Message-Id: <202409042150.484LovNe033207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e8fc8eb8b8f5 - main - msi_release(): consistently unlock msi_lock around iommu_unmap_msi_intr() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8fc8eb8b8f55072379f65f5f058b81870031b7d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8fc8eb8b8f55072379f65f5f058b81870031b7d commit e8fc8eb8b8f55072379f65f5f058b81870031b7d Author: Konstantin Belousov AuthorDate: 2024-08-27 02:28:49 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-04 21:50:20 +0000 msi_release(): consistently unlock msi_lock around iommu_unmap_msi_intr() Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/x86/msi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c index 177bd7868ec4..c8e7db9469ed 100644 --- a/sys/x86/x86/msi.c +++ b/sys/x86/x86/msi.c @@ -555,7 +555,9 @@ msi_release(int *irqs, int count) KASSERT(msi->msi_first == first, ("message not in group")); KASSERT(msi->msi_dev == first->msi_dev, ("owner mismatch")); #ifdef IOMMU + mtx_unlock(&msi_lock); iommu_unmap_msi_intr(first->msi_dev, msi->msi_remap_cookie); + mtx_lock(&msi_lock); #endif msi->msi_first = NULL; msi->msi_dev = NULL;