get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2197371,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197371/?format=api",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/1.0/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
    },
    "msgid": "<20260217182257.1582-8-alifm@linux.ibm.com>",
    "date": "2026-02-17T18:22:55",
    "name": "[v9,7/9] vfio-pci/zdev: Add a device feature for error information",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4fa4d3b1f4ca97330785a739ecd2ca4fdfca87bb",
    "submitter": {
        "id": 73785,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/73785/?format=api",
        "name": "Farhan Ali",
        "email": "alifm@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260217182257.1582-8-alifm@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 492470,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/492470/?format=api",
            "date": "2026-02-17T18:22:49",
            "name": "Error recovery for vfio-pci devices on s390x",
            "version": 9,
            "mbox": "http://patchwork.ozlabs.org/series/492470/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197371/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-47499-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=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=a/whckNu;\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-47499-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com\n header.b=\"a/whckNu\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=148.163.156.1",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.ibm.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 4fFp3l3bbTz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 05:25:39 +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 F0CD33072D92\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 18:23:22 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8BD0537418E;\n\tTue, 17 Feb 2026 18:23:18 +0000 (UTC)",
            "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\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 A9B7D372B21;\n\tTue, 17 Feb 2026 18:23:14 +0000 (UTC)",
            "from pps.filterd (m0356517.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 61HBn2qv1915831;\n\tTue, 17 Feb 2026 18:23:09 GMT",
            "from ppma12.dal12v.mail.ibm.com\n (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4caj6unjx7-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tTue, 17 Feb 2026 18:23:08 +0000 (GMT)",
            "from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1])\n\tby ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 61HG1VUn023899;\n\tTue, 17 Feb 2026 18:23:07 GMT",
            "from smtprelay04.wdc07v.mail.ibm.com ([172.16.1.71])\n\tby ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4ccb454424-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tTue, 17 Feb 2026 18:23:07 +0000",
            "from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com\n [10.241.53.104])\n\tby smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 61HIN5I861407624\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tTue, 17 Feb 2026 18:23:05 GMT",
            "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 9259E58056;\n\tTue, 17 Feb 2026 18:23:05 +0000 (GMT)",
            "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id C13D658052;\n\tTue, 17 Feb 2026 18:23:04 +0000 (GMT)",
            "from IBM-D32RQW3.ibm.com (unknown [9.61.242.249])\n\tby smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;\n\tTue, 17 Feb 2026 18:23:04 +0000 (GMT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771352598; cv=none;\n b=VAmVY79hnvDQi9hEL7CNJfaoClhbVe/pyQhRmPHnM5LjMKHRxts81iW0p5XNAX+y1xhsYF8t9BsaHh4XfrwKap7DabNRyS0DbiW4L02qIE6wqw+Zyux0YykK8To8aOVx2XJ4HPps+tQY3KmF6fw9rjDGA/n99kaGpzLb96LVNe8=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771352598; c=relaxed/simple;\n\tbh=FC7k6npU4EkqkvyqX0fF1OeBEG2gL272qe/MVOKH8E8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=A4uq3/eChe/kRSdIqezeoL7pMKyGS94o0cVjUrz6qcYKuvrcFudmpZOGbSs0VCSSbBhewCMFzER7yU/zXGtp0rJtdazXn2HXeqJlCAr7XSnJE+b7ZUnnGlTieY17C7xeCxxapzNSB7sArvSxzl384IN9uXgMnG8zxGV5Wv+93Sw=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com;\n spf=pass smtp.mailfrom=linux.ibm.com;\n dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com\n header.b=a/whckNu; arc=none smtp.client-ip=148.163.156.1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n\t:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=pp1; bh=u8WeFfuY8wxbxns7A\n\tzTIs3CrhJUGqqQfuDJbWcxBIqY=; b=a/whckNuCNYIi/4lJVm/UHPysHc8u34d/\n\tOXmHghvLssGMA5I4Deh1kRGfMmP0H0h7R9VRDw3l+4KtIJVQljvZJoH9ax550/cd\n\t+qza9quTT6xIUxz6xyewfgjnzuUD1wLsDSYkwmqiHGMzyVuApzuqG/SIH95iI/FN\n\tTcHv4Tj1vlSc0GR3SaNsNgrn6i5s+P2vQeiOZnuYDwagB1XcP8HW7Q8b6lQEe3Vm\n\tgUlypmcgPZTq7U2GQbDBS4XD7fMRBQxJMAmvtd7ER7U7C0I3cG/Za6GYWWYPs0+J\n\tjt3xyk9xLjg3ZO251dLhCCXxTrftH4x+WXelX/g3K8iDhywFpQxGA==",
        "From": "Farhan Ali <alifm@linux.ibm.com>",
        "To": "linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,\n        linux-pci@vger.kernel.org",
        "Cc": "helgaas@kernel.org, lukas@wunner.de, alex@shazbot.org, clg@redhat.com,\n        stable@vger.kernel.org, alifm@linux.ibm.com, schnelle@linux.ibm.com,\n        mjrosato@linux.ibm.com",
        "Subject": "[PATCH v9 7/9] vfio-pci/zdev: Add a device feature for error\n information",
        "Date": "Tue, 17 Feb 2026 10:22:55 -0800",
        "Message-ID": "<20260217182257.1582-8-alifm@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260217182257.1582-1-alifm@linux.ibm.com>",
        "References": "<20260217182257.1582-1-alifm@linux.ibm.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",
        "X-TM-AS-GCONF": "00",
        "X-Authority-Analysis": "v=2.4 cv=E+/AZKdl c=1 sm=1 tr=0 ts=6994b20c cx=c_pps\n a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17\n a=HzLeVaNsDn8A:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22\n a=GgsMoib0sEa3-_RKJdDe:22 a=VnNF1IyMAAAA:8 a=QIy8Zix3hhx26zbqT_4A:9",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjE3MDE0OCBTYWx0ZWRfX8j5I3zqyuWDX\n apktNaGDPskXpVFxz4cjWCzi9i8ow8Sx43Z2WX4Fx1gxAUbTol5UF2TdJ/X2fLZl14imAZWdIQT\n L9Pmbtm3Bx7FtjJbFobuV7TW+9O6KBOZRCWH4nLPxgMQI1PNnm+cKTgaE8gLDRISneUE8E2zbY+\n 1JKXvh1se64ff3n01+Zey6NBccEQcWZdn/trUEUq0D/dv2ul/Qpvoml59ZgGdUXqtOnP3nutK1z\n RKnZJVziB3Np/+AoybtBQlbAU4wuC5hOqaD+ABV3gZ7DTLfWPTM8a/s/5NIC3MEvoF7RB8bRkQK\n 4wJwvMD15UJ7jeH+oYEW9OiBbWUxqL612LbQXV5mhxSXMNr4t1mo7g7pdyrc0icaRlz3eL7ZB8U\n V7ZXteJoW0mFWCJBa8uYtGENvNNyeDbVHPzKvpnC5mgXjkrbWfMpy1X+T86kiiZ6Ue2XqnpEOlK\n w/yaan+gG3a7WK6+dCA==",
        "X-Proofpoint-ORIG-GUID": "4dwI4RzOKfFK_PMcUh8m-yHv4EhzMjt8",
        "X-Proofpoint-GUID": "4dwI4RzOKfFK_PMcUh8m-yHv4EhzMjt8",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-17_03,2026-02-16_04,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0 priorityscore=1501 malwarescore=0 phishscore=0 bulkscore=0\n suspectscore=0 spamscore=0 clxscore=1015 impostorscore=0 adultscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602170148"
    },
    "content": "For zPCI devices, we have platform specific error information. The platform\nfirmware provides this error information to the operating system in an\narchitecture specific mechanism. To enable recovery from userspace for\nthese devices, we want to expose this error information to userspace. Add a\nnew device feature to expose this information.\n\nSigned-off-by: Farhan Ali <alifm@linux.ibm.com>\n---\n drivers/vfio/pci/vfio_pci_core.c |  2 ++\n drivers/vfio/pci/vfio_pci_priv.h |  9 ++++++++\n drivers/vfio/pci/vfio_pci_zdev.c | 36 ++++++++++++++++++++++++++++++++\n include/uapi/linux/vfio.h        | 17 +++++++++++++++\n 4 files changed, 64 insertions(+)",
    "diff": "diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c\nindex 72c33b399800..d2cb498c026b 100644\n--- a/drivers/vfio/pci/vfio_pci_core.c\n+++ b/drivers/vfio/pci/vfio_pci_core.c\n@@ -1535,6 +1535,8 @@ int vfio_pci_core_ioctl_feature(struct vfio_device *device, u32 flags,\n \t\treturn vfio_pci_core_feature_token(vdev, flags, arg, argsz);\n \tcase VFIO_DEVICE_FEATURE_DMA_BUF:\n \t\treturn vfio_pci_core_feature_dma_buf(vdev, flags, arg, argsz);\n+\tcase VFIO_DEVICE_FEATURE_ZPCI_ERROR:\n+\t\treturn vfio_pci_zdev_feature_err(device, flags, arg, argsz);\n \tdefault:\n \t\treturn -ENOTTY;\n \t}\ndiff --git a/drivers/vfio/pci/vfio_pci_priv.h b/drivers/vfio/pci/vfio_pci_priv.h\nindex 27ac280f00b9..eed69926d8a1 100644\n--- a/drivers/vfio/pci/vfio_pci_priv.h\n+++ b/drivers/vfio/pci/vfio_pci_priv.h\n@@ -89,6 +89,8 @@ int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev,\n \t\t\t\tstruct vfio_info_cap *caps);\n int vfio_pci_zdev_open_device(struct vfio_pci_core_device *vdev);\n void vfio_pci_zdev_close_device(struct vfio_pci_core_device *vdev);\n+int vfio_pci_zdev_feature_err(struct vfio_device *device, u32 flags,\n+\t\t\t      void __user *arg, size_t argsz);\n #else\n static inline int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev,\n \t\t\t\t\t      struct vfio_info_cap *caps)\n@@ -103,6 +105,13 @@ static inline int vfio_pci_zdev_open_device(struct vfio_pci_core_device *vdev)\n \n static inline void vfio_pci_zdev_close_device(struct vfio_pci_core_device *vdev)\n {}\n+\n+static inline int vfio_pci_zdev_feature_err(struct vfio_device *device,\n+\t\t\t\t\t    u32 flags, void __user *arg,\n+\t\t\t\t\t    size_t argsz)\n+{\n+\treturn -ENODEV;\n+}\n #endif\n \n static inline bool vfio_pci_is_vga(struct pci_dev *pdev)\ndiff --git a/drivers/vfio/pci/vfio_pci_zdev.c b/drivers/vfio/pci/vfio_pci_zdev.c\nindex 2be37eab9279..d2748dd67c55 100644\n--- a/drivers/vfio/pci/vfio_pci_zdev.c\n+++ b/drivers/vfio/pci/vfio_pci_zdev.c\n@@ -141,6 +141,42 @@ int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev,\n \treturn ret;\n }\n \n+int vfio_pci_zdev_feature_err(struct vfio_device *device, u32 flags,\n+\t\t\t      void __user *arg, size_t argsz)\n+{\n+\tstruct vfio_device_feature_zpci_err err;\n+\tstruct vfio_pci_core_device *vdev;\n+\tstruct zpci_dev *zdev;\n+\tint head = 0;\n+\tint ret;\n+\n+\tvdev = container_of(device, struct vfio_pci_core_device, vdev);\n+\tzdev = to_zpci(vdev->pdev);\n+\tif (!zdev)\n+\t\treturn -ENODEV;\n+\n+\tret = vfio_check_feature(flags, argsz, VFIO_DEVICE_FEATURE_GET,\n+\t\t\t\t sizeof(err));\n+\tif (ret != 1)\n+\t\treturn ret;\n+\n+\tmutex_lock(&zdev->pending_errs_lock);\n+\tif (zdev->pending_errs.count) {\n+\t\thead = zdev->pending_errs.head % ZPCI_ERR_PENDING_MAX;\n+\t\terr.pec = zdev->pending_errs.err[head].pec;\n+\t\tzdev->pending_errs.head++;\n+\t\tzdev->pending_errs.count--;\n+\t\terr.pending_errors = zdev->pending_errs.count;\n+\t}\n+\tmutex_unlock(&zdev->pending_errs_lock);\n+\n+\terr.version = 1;\n+\tif (copy_to_user(arg, &err, sizeof(err)))\n+\t\treturn -EFAULT;\n+\n+\treturn 0;\n+}\n+\n int vfio_pci_zdev_open_device(struct vfio_pci_core_device *vdev)\n {\n \tstruct zpci_dev *zdev = to_zpci(vdev->pdev);\ndiff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h\nindex bb7b89330d35..21b1473e4779 100644\n--- a/include/uapi/linux/vfio.h\n+++ b/include/uapi/linux/vfio.h\n@@ -1510,6 +1510,23 @@ struct vfio_device_feature_dma_buf {\n \tstruct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges);\n };\n \n+/**\n+ * VFIO_DEVICE_FEATURE_ZPCI_ERROR feature provides PCI error information to\n+ * userspace for vfio-pci devices on s390x. On s390x PCI error recovery involves\n+ * platform firmware and notification to operating system is done by\n+ * architecture specific mechanism.  Exposing this information to userspace\n+ * allows userspace to take appropriate actions to handle an error on the\n+ * device.\n+ */\n+\n+struct vfio_device_feature_zpci_err {\n+\t__u8 version;\n+\t__u8 pending_errors;\n+\t__u16 pec;\n+};\n+\n+#define VFIO_DEVICE_FEATURE_ZPCI_ERROR 12\n+\n /* -------- API for Type1 VFIO IOMMU -------- */\n \n /**\n",
    "prefixes": [
        "v9",
        "7/9"
    ]
}