get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217059,
    "url": "http://patchwork.ozlabs.org/api/patches/2217059/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260327160132.2946114-8-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-8-yilun.xu@linux.intel.com>",
    "list_archive_url": null,
    "date": "2026-03-27T16:01:08",
    "name": "[v2,07/31] x86/virt/tdx: Embed version info in SEAMCALL leaf function definitions",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "79c5050c186aeb4c99bd8823b819afaf2c3be85d",
    "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-8-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/2217059/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217059/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51293-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=kdvQIbGI;\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-51293-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=\"kdvQIbGI\"",
            "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 4fj5pD3MlJz1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 03:34:44 +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 8E3BC3131505\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 16:24:30 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E01423559E4;\n\tFri, 27 Mar 2026 16:23:00 +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 949A63644D7;\n\tFri, 27 Mar 2026 16:22:59 +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:22:59 -0700",
            "from yilunxu-optiplex-7050.sh.intel.com ([10.239.159.165])\n  by fmviesa006.fm.intel.com with ESMTP; 27 Mar 2026 09:22:55 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774628580; cv=none;\n b=bRVD9Euj+TsI2XIrNwfLIYnBK81zfiziz0jzaokHPdG5wvAFfjpHtPfp5El1i9DNyVyWHZhazs+0YaBindhrjLoIbQmn829hxGI0tHubAPlr5L5c8lN+zO/Gy2zjg8Y6g45vZPGNH+juI2B8yBNO2z9ht1SNwCChiGOqJY2SOWI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774628580; c=relaxed/simple;\n\tbh=Bt+AXgtn75w+rtXbNgQtMbF5XGKAtT1/wyjaqcGdGfU=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=mtgqIp2ccU9yrHW75bvhEf9tQZ6gVYfFj+ps9c/FFtbATrDOFAhOjQOOHSbMtD6WXlXmvYVZUD3caxe4wo5LOzZF6RYDuFUgCwxol3Xs7tcFdnieJ5dt9rQwiVaVaUFrJ4i9rd99zCfOSEIjGDkB2hkSMc1XJx8EOUemutfb6OE=",
        "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=kdvQIbGI; 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=1774628579; x=1806164579;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=Bt+AXgtn75w+rtXbNgQtMbF5XGKAtT1/wyjaqcGdGfU=;\n  b=kdvQIbGIn7Mdt8FrOPmoHAq+5P/fLBy0z2dv2Ojtl6Kv5Rrw5MAg4WjP\n   bAX29Bmra7o0GKUrSljXF7PJ5dMV7Zhzcg3cebGpMZUFgrQvuGqlUp7LJ\n   tdMc9s8XDcPcO50o3mXKFGtXkyKv8kLfffW+SNUZq4QsuBtk9uEWyjAVv\n   xODzEmkDXeBHsa6iY59ajyvB71bPo3Ie1ZjdPTvu8Q1MG2aOBbEkAkP75\n   XrCsh5FEosKer9XMGXJ6vth6s9ZuUK64H3SlpiYljZ8nJM479Ps/dNFli\n   GCZhjS6n7mF/yPgsHPSaHzTEZemkvPvV28jQ/zKY2cpra5cAvrJuoJaVw\n   A==;",
        "X-CSE-ConnectionGUID": [
            "QuowUohcQL2C1sE1KCgWng==",
            "YdQUWutwQw+iZMy1w4tZGQ=="
        ],
        "X-CSE-MsgGUID": [
            "sTQu5qcbROamvUvU+EBVxA==",
            "GtvkTFD1RIGQEdOsfwxIdA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11741\"; a=\"79565530\"",
            "E=Sophos;i=\"6.23,144,1770624000\";\n   d=\"scan'208\";a=\"79565530\"",
            "E=Sophos;i=\"6.23,144,1770624000\";\n   d=\"scan'208\";a=\"220516160\""
        ],
        "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 07/31] x86/virt/tdx: Embed version info in SEAMCALL leaf\n function definitions",
        "Date": "Sat, 28 Mar 2026 00:01:08 +0800",
        "Message-Id": "<20260327160132.2946114-8-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": "Embed version information in SEAMCALL leaf function definitions rather\nthan let the caller open code them. For now, only TDH.VP.INIT is\ninvolved.\n\nDon't bother the caller to choose the SEAMCALL version if unnecessary.\nNew version SEAMCALLs are guaranteed to be backward compatible, so\nideally kernel doesn't need to keep version history and only uses the\nlatest version SEAMCALLs.\n\nThe concern is some old TDX Modules don't recognize new version\nSEAMCALLs. Multiple SEAMCALL versions co-exist when kernel should\nsupport these old Modules. As time goes by, the old Modules deprecate\nand old version SEAMCALL definitions should disappear.\n\nThe old TDX Modules that only support TDH.VP.INIT v0 are all deprecated,\nso only provide the latest (v1) definition.\n\nSigned-off-by: Xu Yilun <yilun.xu@linux.intel.com>\n---\n arch/x86/virt/vmx/tdx/tdx.h | 23 ++++++++++++++---------\n arch/x86/virt/vmx/tdx/tdx.c |  4 ++--\n 2 files changed, 16 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/arch/x86/virt/vmx/tdx/tdx.h b/arch/x86/virt/vmx/tdx/tdx.h\nindex c641b4632826..e5a9331df451 100644\n--- a/arch/x86/virt/vmx/tdx/tdx.h\n+++ b/arch/x86/virt/vmx/tdx/tdx.h\n@@ -2,6 +2,7 @@\n #ifndef _X86_VIRT_TDX_H\n #define _X86_VIRT_TDX_H\n \n+#include <linux/bitfield.h>\n #include <linux/bits.h>\n \n /*\n@@ -11,6 +12,18 @@\n  * architectural definitions come first.\n  */\n \n+/*\n+ * SEAMCALL leaf:\n+ *\n+ * Bit 15:0\tLeaf number\n+ * Bit 23:16\tVersion number\n+ */\n+#define SEAMCALL_LEAF\t\t\tGENMASK(15, 0)\n+#define SEAMCALL_VER\t\t\tGENMASK(23, 16)\n+\n+#define SEAMCALL_LEAF_VER(l, v)\t\t(FIELD_PREP(SEAMCALL_LEAF, l) | \\\n+\t\t\t\t\t FIELD_PREP(SEAMCALL_VER, v))\n+\n /*\n  * TDX module SEAMCALL leaf functions\n  */\n@@ -31,7 +44,7 @@\n #define TDH_VP_CREATE\t\t\t10\n #define TDH_MNG_KEY_FREEID\t\t20\n #define TDH_MNG_INIT\t\t\t21\n-#define TDH_VP_INIT\t\t\t22\n+#define TDH_VP_INIT\t\t\tSEAMCALL_LEAF_VER(22, 1)\n #define TDH_PHYMEM_PAGE_RDMD\t\t24\n #define TDH_VP_RD\t\t\t26\n #define TDH_PHYMEM_PAGE_RECLAIM\t\t28\n@@ -47,14 +60,6 @@\n #define TDH_VP_WR\t\t\t43\n #define TDH_SYS_CONFIG\t\t\t45\n \n-/*\n- * SEAMCALL leaf:\n- *\n- * Bit 15:0\tLeaf number\n- * Bit 23:16\tVersion number\n- */\n-#define TDX_VERSION_SHIFT\t\t16\n-\n /* TDX page types */\n #define\tPT_NDA\t\t0x0\n #define\tPT_RSVD\t\t0x1\ndiff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c\nindex 2b17e0f73dac..130214933c2f 100644\n--- a/arch/x86/virt/vmx/tdx/tdx.c\n+++ b/arch/x86/virt/vmx/tdx/tdx.c\n@@ -2202,8 +2202,8 @@ u64 tdh_vp_init(struct tdx_vp *vp, u64 initial_rcx, u32 x2apicid)\n \t\t.r8 = x2apicid,\n \t};\n \n-\t/* apicid requires version == 1. */\n-\treturn seamcall(TDH_VP_INIT | (1ULL << TDX_VERSION_SHIFT), &args);\n+\t/* apicid requires version == 1. See TDH_VP_INIT definition.*/\n+\treturn seamcall(TDH_VP_INIT, &args);\n }\n EXPORT_SYMBOL_FOR_KVM(tdh_vp_init);\n \n",
    "prefixes": [
        "v2",
        "07/31"
    ]
}