get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217067,
    "url": "http://patchwork.ozlabs.org/api/patches/2217067/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260327160132.2946114-21-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-21-yilun.xu@linux.intel.com>",
    "list_archive_url": null,
    "date": "2026-03-27T16:01:21",
    "name": "[v2,20/31] x86/virt/tdx: Add a helper to loop on TDX_INTERRUPTED_RESUMABLE",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "475b6995f3f7b543638ab3108463d6d2a8e95fca",
    "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-21-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/2217067/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217067/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51306-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=lCsZM/kr;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-51306-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=\"lCsZM/kr\"",
            "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 tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4fj5sp1gmDz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 03:37:50 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 29D18319008D\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 16:28:15 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id AB47135F5FC;\n\tFri, 27 Mar 2026 16:23:50 +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 107B13FBEA3;\n\tFri, 27 Mar 2026 16:23:48 +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:47 -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:44 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774628630; cv=none;\n b=IN+l4+deKLcfm2zZagLeW5GA1ZSgAEU3r6BK2RUvjusX3gAA3AQ2hc03ItwlOnfr02BC1ZOpJxrOT++7DQStkEiEx70Ne6R4yCn3Qh9cbaQl/jKZ/57NIA0vLzHOZ2m2IdZptGOWTYCFprqZQAegBaf8SrcMX7ffTGi/jCTPGok=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774628630; c=relaxed/simple;\n\tbh=JpFljdI5U/a/gNIVQmuIsHGSGIbydMYmkZ3Ia68L6tY=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=H9cnWGF6nKOV27DV8mP5BVllG/coB1myXcZdcUV5ll9fFDb0o9X6Zgm7zELaa0g+i+D/E9ciczlM7IzTaQVpzPld6SFhafpAi9RYapRwzOecsn2OalCUArfuHWoultG1PRI3nqoACe/U8BE0rCRFxYg4+HOeV0SnKUT1RRq6ghE=",
        "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=lCsZM/kr; 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=1774628627; x=1806164627;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=JpFljdI5U/a/gNIVQmuIsHGSGIbydMYmkZ3Ia68L6tY=;\n  b=lCsZM/kr62MegnwBbFhk9vZ+WBHCtPdFk/iI/kfVGYTAcTNCMSdMxhOv\n   pz29OLPo5m86fesM9CwT7Syxqacmg04/GIeFE/Qy/gAAIl7hiQz2DTbgY\n   eGDBhPwrnr0z4mHkjdc/Hqxj8KPZmZmBv81FzID8eSaqGWrQokw1nEEYc\n   HAMI8I1JK0w6DWijsRZq/JooaS8IgZARvNETX7Z+vhOq3Q+zI2YoY7B98\n   RnLhr/BJQSeoy8N8ai6xsaMAzAcE2vRL0qy8fehZY2U5pIqgM3WoLyinF\n   aNBme6E/3+7AlbMKFy/FdaBNd4B+pSlqgeiKQE9m2eUxzniERFa3ZJGZn\n   g==;",
        "X-CSE-ConnectionGUID": [
            "p9lcJTVjRpe9Ha0HhAo4FQ==",
            "kDe/7qQWQEuII0+9rgCC4w=="
        ],
        "X-CSE-MsgGUID": [
            "tmy7QabXT5iNCTRkvm3L6A==",
            "d6DN10EoR3GvEZ5n+2TJQg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11741\"; a=\"79565638\"",
            "E=Sophos;i=\"6.23,144,1770624000\";\n   d=\"scan'208\";a=\"79565638\"",
            "E=Sophos;i=\"6.23,144,1770624000\";\n   d=\"scan'208\";a=\"220516321\""
        ],
        "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 20/31] x86/virt/tdx: Add a helper to loop on\n TDX_INTERRUPTED_RESUMABLE",
        "Date": "Sat, 28 Mar 2026 00:01:21 +0800",
        "Message-Id": "<20260327160132.2946114-21-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": "Add a helper to handle SEAMCALL return code TDX_INTERRUPTED_RESUMABLE.\n\nSEAMCALL returns TDX_INTERRUPTED_RESUMABLE to avoid stalling host for\nlong time. After host has handled the interrupt, it calls the\ninterrupted SEAMCALL again and TDX Module continues to execute. TDX\nModule made progress in this case and would eventually finish. An\ninfinite loop in host should be safe.\n\nThe helper is for SEAMCALL wrappers which output information by using\nseamcall_ret() or seamcall_saved_ret(). The 2 functions overwrite input\narguments by outputs but much SEAMCALLs expect the same inputs to\nresume.\n\nThe helper is not for special cases where the SEAMCALL expects modified\ninputs to resume. The helper is also not for SEAMCALLs with no output,\ndo {...} while (r == TDX_INTERRUPTED_RESUMABLE) just works.\n\nSigned-off-by: Xu Yilun <yilun.xu@linux.intel.com>\n---\n arch/x86/virt/vmx/tdx/tdx.c | 23 +++++++++++++++++++++++\n 1 file changed, 23 insertions(+)",
    "diff": "diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c\nindex cd0948794b6c..294f36048c03 100644\n--- a/arch/x86/virt/vmx/tdx/tdx.c\n+++ b/arch/x86/virt/vmx/tdx/tdx.c\n@@ -2084,6 +2084,29 @@ static inline u64 tdx_tdr_pa(struct tdx_td *td)\n \treturn page_to_phys(td->tdr_page);\n }\n \n+static u64 __maybe_unused __seamcall_ir_resched(sc_func_t sc_func, u64 fn,\n+\t\t\t\t\t\tstruct tdx_module_args *args)\n+{\n+\tstruct tdx_module_args _args;\n+\tu64 r;\n+\n+\twhile (1) {\n+\t\t_args = *(args);\n+\t\tr = sc_retry(sc_func, fn, &_args);\n+\t\tif (r != TDX_INTERRUPTED_RESUMABLE)\n+\t\t\tbreak;\n+\n+\t\tcond_resched();\n+\t}\n+\n+\t*args = _args;\n+\n+\treturn r;\n+}\n+\n+#define seamcall_ret_ir_resched(fn, args)\t\\\n+\t__seamcall_ir_resched(__seamcall_ret, fn, args)\n+\n noinstr u64 tdh_vp_enter(struct tdx_vp *td, struct tdx_module_args *args)\n {\n \targs->rcx = td->tdvpr_pa;\n",
    "prefixes": [
        "v2",
        "20/31"
    ]
}