get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2217068/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2217068,
    "url": "http://patchwork.ozlabs.org/api/patches/2217068/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260327160132.2946114-23-yilun.xu@linux.intel.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260327160132.2946114-23-yilun.xu@linux.intel.com>",
    "list_archive_url": null,
    "date": "2026-03-27T16:01:23",
    "name": "[v2,22/31] iommu/vt-d: Export a helper to do function for each dmar_drhd_unit",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0d3e25ac3ad1eaba437f0ba40391fec319162426",
    "submitter": {
        "id": 87470,
        "url": "http://patchwork.ozlabs.org/api/people/87470/?format=api",
        "name": "Xu Yilun",
        "email": "yilun.xu@linux.intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260327160132.2946114-23-yilun.xu@linux.intel.com/mbox/",
    "series": [
        {
            "id": 497793,
            "url": "http://patchwork.ozlabs.org/api/series/497793/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=497793",
            "date": "2026-03-27T16:01:02",
            "name": "PCI/TSM: PCIe Link Encryption Establishment via TDX platform services",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/497793/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217068/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217068/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51308-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=EhEqOiPA;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51308-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=\"EhEqOiPA\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.175.65.14",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.intel.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fj5vY5v6Qz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 03:39:21 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 3BFF8319B724\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 16:29:00 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9B6403FF882;\n\tFri, 27 Mar 2026 16:23:56 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.14])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 6312A3FEB1C;\n\tFri, 27 Mar 2026 16:23:55 +0000 (UTC)",
            "from fmviesa006.fm.intel.com ([10.60.135.146])\n  by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2026 09:23:54 -0700",
            "from yilunxu-optiplex-7050.sh.intel.com ([10.239.159.165])\n  by fmviesa006.fm.intel.com with ESMTP; 27 Mar 2026 09:23:51 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774628636; cv=none;\n b=bftN4OLwWUj5r4FUb0vVcVsFTFxJyRDIRoiY6sRqvCFZUkcKnWi3hg10Pmyn9oI6s4g2qVOz1M01nWeIPjIOz1McyJizjv4H1Z+0g24zJzf3KjLK+u3KwNI26+ZjQIWRZPCGQLc2J/Yuz7mrE/JzhBAeD81J/4ip5Kz2NsyjfdA=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774628636; c=relaxed/simple;\n\tbh=4N4OssQklL/B7HyKRZJOSblHOdQoFgXqUseYPZid0EE=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=tjNUI8TptrAcBUAjYcl1ZPP1p1FjoWZ6AbflRkl9kpj9c3AYoHZIyRa8h+jAXmUHsW+q+dF6RqWQmsWa4ulfZseJxF9aJE4s0YLOZqfTfhyqiKIvFnZGtTTwfpSGshOUW4CUl/6jvL+q+eiqxRphE3SdR0OStHL989jkPVcaHMM=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com;\n spf=pass smtp.mailfrom=linux.intel.com;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=EhEqOiPA; arc=none smtp.client-ip=198.175.65.14",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1774628635; x=1806164635;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=4N4OssQklL/B7HyKRZJOSblHOdQoFgXqUseYPZid0EE=;\n  b=EhEqOiPAz2WV/AGZJDDK/TXNOA1DuJbqh0LJPfF9yrhwzezTHj090dac\n   9xSppzvLuYob4zC3hIvPZPG+BatmATngAwhmoyGydmrOaEu4HzXhRU9Ec\n   w/tdEfbu0/KwAZyJjMh5+ahQ5O2dRig6H2iZabr+xi7355xZHgug2VvN9\n   xUE0LC91G5Z7Cq8C2PwKwDM0sjBdO9l2k010ADLl5rIe5xjAJN8GcQw8P\n   sBE73nPXxKfsQ1e27SGKnOis6+WbIDERa5Li122vgl7oA9omXDVXGTxfc\n   vYcFzfa4VZHeMHoiZClvRRfDyPwEyBFz+2Vg2SV5te+Tdi6eL0AgQTBxk\n   g==;",
        "X-CSE-ConnectionGUID": [
            "ZQQ3XzckRuWCbBKvA8d5yg==",
            "dt1l+oQwR5iY4ZOfYTtnEg=="
        ],
        "X-CSE-MsgGUID": [
            "MgCKW7QzSBe3oUMUu3uvRg==",
            "QZ4FgOGYQSOqVGVIpnJ43g=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11741\"; a=\"79565651\"",
            "E=Sophos;i=\"6.23,144,1770624000\";\n   d=\"scan'208\";a=\"79565651\"",
            "E=Sophos;i=\"6.23,144,1770624000\";\n   d=\"scan'208\";a=\"220516341\""
        ],
        "X-ExtLoop1": "1",
        "From": "Xu Yilun <yilun.xu@linux.intel.com>",
        "To": "linux-coco@lists.linux.dev,\n\tlinux-pci@vger.kernel.org,\n\tdan.j.williams@intel.com,\n\tx86@kernel.org",
        "Cc": "chao.gao@intel.com,\n\tdave.jiang@intel.com,\n\tbaolu.lu@linux.intel.com,\n\tyilun.xu@linux.intel.com,\n\tyilun.xu@intel.com,\n\tzhenzhong.duan@intel.com,\n\tkvm@vger.kernel.org,\n\trick.p.edgecombe@intel.com,\n\tdave.hansen@linux.intel.com,\n\tkas@kernel.org,\n\txiaoyao.li@intel.com,\n\tvishal.l.verma@intel.com,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[PATCH v2 22/31] iommu/vt-d: Export a helper to do function for each\n dmar_drhd_unit",
        "Date": "Sat, 28 Mar 2026 00:01:23 +0800",
        "Message-Id": "<20260327160132.2946114-23-yilun.xu@linux.intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20260327160132.2946114-1-yilun.xu@linux.intel.com>",
        "References": "<20260327160132.2946114-1-yilun.xu@linux.intel.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Enable the tdx-host module to get VTBAR address for every IOMMU device.\nThe VTBAR address is for TDX Module to identify the IOMMU device and\nsetup its trusted configuraion.\n\nSuggested-by: Lu Baolu <baolu.lu@linux.intel.com>\nSigned-off-by: Xu Yilun <yilun.xu@linux.intel.com>\n---\n include/linux/dmar.h       |  2 ++\n drivers/iommu/intel/dmar.c | 16 ++++++++++++++++\n 2 files changed, 18 insertions(+)",
    "diff": "diff --git a/include/linux/dmar.h b/include/linux/dmar.h\nindex 692b2b445761..cd8d9f440975 100644\n--- a/include/linux/dmar.h\n+++ b/include/linux/dmar.h\n@@ -86,6 +86,8 @@ extern struct list_head dmar_drhd_units;\n \t\t\t\tdmar_rcu_check())\t\t\t\\\n \t\tif (i=drhd->iommu, 0) {} else \n \n+int do_for_each_drhd_unit(int (*fn)(struct dmar_drhd_unit *));\n+\n static inline bool dmar_rcu_check(void)\n {\n \treturn rwsem_is_locked(&dmar_global_lock) ||\ndiff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c\nindex 4f9571eee1d4..eea9ba691f99 100644\n--- a/drivers/iommu/intel/dmar.c\n+++ b/drivers/iommu/intel/dmar.c\n@@ -2452,3 +2452,19 @@ bool dmar_platform_optin(void)\n \treturn ret;\n }\n EXPORT_SYMBOL_GPL(dmar_platform_optin);\n+\n+int do_for_each_drhd_unit(int (*fn)(struct dmar_drhd_unit *))\n+{\n+\tstruct dmar_drhd_unit *drhd;\n+\tint ret;\n+\n+\tguard(rwsem_read)(&dmar_global_lock);\n+\n+\tfor_each_drhd_unit(drhd) {\n+\t\tret = fn(drhd);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(do_for_each_drhd_unit);\n",
    "prefixes": [
        "v2",
        "22/31"
    ]
}