Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223410/?format=api
{ "id": 2223410, "url": "http://patchwork.ozlabs.org/api/patches/2223410/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260415090959.53672-5-fengchengwen@huawei.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": "<20260415090959.53672-5-fengchengwen@huawei.com>", "list_archive_url": null, "date": "2026-04-15T09:09:59", "name": "[4/4] vfio/pci: Add PCIe TPH SET_ST interface", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "91141a29655c01aa021a40f92dc99825bbb63dda", "submitter": { "id": 92756, "url": "http://patchwork.ozlabs.org/api/people/92756/?format=api", "name": "fengchengwen", "email": "fengchengwen@huawei.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260415090959.53672-5-fengchengwen@huawei.com/mbox/", "series": [ { "id": 499948, "url": "http://patchwork.ozlabs.org/api/series/499948/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=499948", "date": "2026-04-15T09:09:55", "name": "vfio/pci: Add PCIe TPH support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499948/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223410/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223410/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-52545-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 (1024-bit key;\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=RiMnqqGq;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-52545-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com\n header.b=\"RiMnqqGq\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=113.46.200.222", "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huawei.com" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fwb6229lJz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 19:13:14 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 57C423042C95\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 09:10:28 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 59B7A3254A3;\n\tWed, 15 Apr 2026 09:10:24 +0000 (UTC)", "from canpmsgout07.his.huawei.com (canpmsgout07.his.huawei.com\n [113.46.200.222])\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 799343246EC;\n\tWed, 15 Apr 2026 09:10:22 +0000 (UTC)", "from mail.maildlp.com (unknown [172.19.163.127])\n\tby canpmsgout07.his.huawei.com (SkyGuard) with ESMTPS id 4fwZvQ3ZCVzLlYv;\n\tWed, 15 Apr 2026 17:04:02 +0800 (CST)", "from kwepemk500009.china.huawei.com (unknown [7.202.194.94])\n\tby mail.maildlp.com (Postfix) with ESMTPS id 13D4C40618;\n\tWed, 15 Apr 2026 17:10:20 +0800 (CST)", "from localhost.localdomain (10.50.163.32) by\n kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1544.11; Wed, 15 Apr 2026 17:10:19 +0800" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776244224; cv=none;\n b=ADX8M2wOy8Yhy3cdyi/oulST/er6eif295auIWfAnf8kCeqd5QCsG7720VJ60VQ88TgDjzCQvkoYzw8eknf0iieJm4LpktJUdU+uhFhgjudqnTlBV0Dnygbx1iqCcBAJZmueuKSKrxfoKF84yA8f9iFNYzdHTUD33m6V5evuvpA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776244224; c=relaxed/simple;\n\tbh=2DmwEqgpjTeD8YRid8p8g6d+z0l+n3K8k67pMaUYC5o=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=nqMZ0NqMv1Fi40U1xA+gHuoBVa+fP73FTeFmOrsQ7+Z3RqBmo6VDPb4JDQL0g2Ag7euObDSviBvrls39f35eh+Gb+SU5av4om1o7U9WU+BKZPHvkdHeS/YUBRmX+3B7Wz8Elr4cgK1Eke3nPfSlhOaCwIo2GsEAAP7FickcK7Q4=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com;\n spf=pass smtp.mailfrom=huawei.com;\n dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com\n header.b=RiMnqqGq; arc=none smtp.client-ip=113.46.200.222", "dkim-signature": "v=1; a=rsa-sha256; d=huawei.com; s=dkim;\n\tc=relaxed/relaxed; q=dns/txt;\n\th=From;\n\tbh=+mfvRNpi4d/qeZfHPiEnhG+4qLHhdhTdg8YTDrve9Gc=;\n\tb=RiMnqqGqGELy89eLWbe8IL9DWjKlvNiNCD4vusa/wLgTPZsBtPo5iYtlOjU2Dn/+roezjPexW\n\tpI/GpeE869dYANRJAi0BDalZyTraWKHl0eqMpD3laMbiJKYoLIZnuIlTRiOqqMMgM542FncLAwm\n\tmmnOg7mm/dvrBXQqp6b8JII=", "From": "Chengwen Feng <fengchengwen@huawei.com>", "To": "<alex@shazbot.org>, <jgg@ziepe.ca>", "CC": "<wathsala.vithanage@arm.com>, <kvm@vger.kernel.org>,\n\t<linux-pci@vger.kernel.org>, Chengwen Feng <fengchengwen@huawei.com>", "Subject": "[PATCH 4/4] vfio/pci: Add PCIe TPH SET_ST interface", "Date": "Wed, 15 Apr 2026 17:09:59 +0800", "Message-ID": "<20260415090959.53672-5-fengchengwen@huawei.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20260415090959.53672-1-fengchengwen@huawei.com>", "References": "<20260415090959.53672-1-fengchengwen@huawei.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-Type": "text/plain", "X-ClientProxiedBy": "kwepems200001.china.huawei.com (7.221.188.67) To\n kwepemk500009.china.huawei.com (7.202.194.94)" }, "content": "Add support to batch program Steering Tag table entries\nfor standard TPH modes.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n drivers/vfio/pci/vfio_pci_core.c | 51 ++++++++++++++++++++++++++++++++\n 1 file changed, 51 insertions(+)", "diff": "diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c\nindex 3fe8a48b1cc0..a3146056397a 100644\n--- a/drivers/vfio/pci/vfio_pci_core.c\n+++ b/drivers/vfio/pci/vfio_pci_core.c\n@@ -1573,6 +1573,55 @@ static int vfio_pci_tph_get_st(struct vfio_pci_core_device *vdev,\n \treturn err;\n }\n \n+static int vfio_pci_tph_set_st(struct vfio_pci_core_device *vdev,\n+\t\t\t struct vfio_device_pci_tph_op *op,\n+\t\t\t void __user *uarg)\n+{\n+\tstruct vfio_pci_tph_entry *ents;\n+\tstruct vfio_pci_tph_st st;\n+\tenum tph_mem_type mtype;\n+\tint i, err, size;\n+\tu16 st_val;\n+\n+\tif (copy_from_user(&st, uarg, sizeof(st)))\n+\t\treturn -EFAULT;\n+\n+\tif (!st.count || st.count > 2048)\n+\t\treturn -EINVAL;\n+\n+\tsize = st.count * sizeof(*ents);\n+\tents = kvmalloc(size, GFP_KERNEL);\n+\tif (!ents)\n+\t\treturn -ENOMEM;\n+\n+\tif (copy_from_user(ents, uarg + sizeof(st), size)) {\n+\t\terr = -EFAULT;\n+\t\tgoto out;\n+\t}\n+\n+\tfor (i = 0; i < st.count; i++) {\n+\t\tif (ents[i].mem_type == VFIO_PCI_TPH_MEM_TYPE_VM) {\n+\t\t\tmtype = TPH_MEM_TYPE_VM;\n+\t\t} else if (ents[i].mem_type == VFIO_PCI_TPH_MEM_TYPE_PM) {\n+\t\t\tmtype = TPH_MEM_TYPE_PM;\n+\t\t} else {\n+\t\t\terr = -EINVAL;\n+\t\t\tgoto out;\n+\t\t}\n+\n+\t\terr = pcie_tph_get_cpu_st(vdev->pdev, mtype, ents[i].cpu, &st_val);\n+\t\tif (err)\n+\t\t\tgoto out;\n+\t\terr = pcie_tph_set_st_entry(vdev->pdev, ents[i].index, st_val);\n+\t\tif (err)\n+\t\t\tgoto out;\n+\t}\n+\n+out:\n+\tkvfree(ents);\n+\treturn err;\n+}\n+\n static int vfio_pci_ioctl_tph(struct vfio_pci_core_device *vdev,\n \t\t\t void __user *uarg)\n {\n@@ -1595,6 +1644,8 @@ static int vfio_pci_ioctl_tph(struct vfio_pci_core_device *vdev,\n \t\treturn vfio_pci_tph_disable(vdev);\n \tcase VFIO_PCI_TPH_GET_ST:\n \t\treturn vfio_pci_tph_get_st(vdev, &op, uarg + minsz);\n+\tcase VFIO_PCI_TPH_SET_ST:\n+\t\treturn vfio_pci_tph_set_st(vdev, &op, uarg + minsz);\n \tdefault:\n \t\t/* Other ops are not implemented yet */\n \t\treturn -EINVAL;\n", "prefixes": [ "4/4" ] }