{"id":2231975,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2231975/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260501200026.22784-2-oelghoul@linux.ibm.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260501200026.22784-2-oelghoul@linux.ibm.com>","list_archive_url":null,"date":"2026-05-01T20:00:22","name":"[RFC,v1,1/5,do-not-merge] linux-headers: Add definitions for VFIO zPCI FMB passthrough","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"8ac136677586c4dde2535cdb54109212f2fc3b7b","submitter":{"id":93299,"url":"http://patchwork.ozlabs.org/api/1.2/people/93299/?format=json","name":"Omar Elghoul","email":"oelghoul@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260501200026.22784-2-oelghoul@linux.ibm.com/mbox/","series":[{"id":502493,"url":"http://patchwork.ozlabs.org/api/1.2/series/502493/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502493","date":"2026-05-01T20:00:21","name":"s390x/pci: Improved zPCI Function Measurement Support","version":1,"mbox":"http://patchwork.ozlabs.org/series/502493/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2231975/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2231975/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.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=CUE516T7;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6hmZ3TX0z1yJv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 06:03:09 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIu4U-0000ZN-Qg; Fri, 01 May 2026 16:02:46 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <oelghoul@linux.ibm.com>)\n id 1wIu4R-0000YN-SD; Fri, 01 May 2026 16:02:44 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <oelghoul@linux.ibm.com>)\n id 1wIu4Q-0001Au-CD; Fri, 01 May 2026 16:02:43 -0400","from pps.filterd (m0356516.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 64197Xb81317126; Fri, 1 May 2026 20:02:37 GMT","from ppma13.dal12v.mail.ibm.com\n (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4drk1k4cq2-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Fri, 01 May 2026 20:02:37 +0000 (GMT)","from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1])\n by ppma13.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 641Jrnrd000693;\n Fri, 1 May 2026 20:02:36 GMT","from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5])\n by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dsa5grt8q-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Fri, 01 May 2026 20:02:36 +0000 (GMT)","from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com\n [10.241.53.105])\n by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 641K2YgS32571910\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Fri, 1 May 2026 20:02:34 GMT","from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 0E41D58043;\n Fri,  1 May 2026 20:02:34 +0000 (GMT)","from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id E2C4358055;\n Fri,  1 May 2026 20:02:32 +0000 (GMT)","from Mac.ibm.com (unknown [9.61.247.25])\n by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP;\n Fri,  1 May 2026 20:02:32 +0000 (GMT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:in-reply-to:message-id\n :mime-version:references:subject:to; s=pp1; bh=2IaD55tpATj/ZVnph\n n8buKRjOnzNdJxxssi+olLWHzw=; b=CUE516T7ZQklu//l6WdrkQ5unqhOEHYEd\n 7wn0HXdl3fIMYbswL4pcj2JkMQSoRviyh8I1Fr75S/H1aoS3lWyDwYdNvStE+aZ0\n 3F48+YKWbe4N8299KrvW1qYoFWX8Ka51zjdOjrgQFn3V5mVsMHhKybCA9MkEfpop\n 5pmOSQwTeEvwt6AuzB+KwIp4hABiFMnuSssD+yrrBk0g11/2GC6ge06LSsiIHwSq\n JKXa9iT8+/ywhThV3RChrGt61nBRuGrxT+zoZJIxOm6DHFY1GAg2J3vaXcHIQBci\n 2nRgFvccG4rpxsPxStcX+c+suNj4Tgr7KSK4a2YkYbiCYhiMMhlvg==","From":"Omar Elghoul <oelghoul@linux.ibm.com>","To":"qemu-devel@nongnu.org, qemu-s390x@nongnu.org","Cc":"oelghoul@linux.ibm.com, mjrosato@linux.ibm.com, alifm@linux.ibm.com,\n farman@linux.ibm.com, pasic@linux.ibm.com, borntraeger@linux.ibm.com,\n richard.henderson@linaro.org, iii@linux.ibm.com, david@kernel.org,\n cohuck@redhat.com, mst@redhat.com, pbonzini@redhat.com, clg@redhat.com","Subject":"[RFC PATCH v1 1/5] [do-not-merge] linux-headers: Add definitions for\n VFIO zPCI FMB passthrough","Date":"Fri,  1 May 2026 16:00:22 -0400","Message-ID":"<20260501200026.22784-2-oelghoul@linux.ibm.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260501200026.22784-1-oelghoul@linux.ibm.com>","References":"<20260501200026.22784-1-oelghoul@linux.ibm.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTAxMDE5NSBTYWx0ZWRfX6X3WidarEm5T\n wfQKfQF7K/DEgeMJGBoWdvlDx2TTGgxRv7qBYb+SFUeI7yJO3jKgBi2KQ0EVVRv0P4ouB3kOlfY\n SkI+7qwKHuxlZyUprOKbFvrateskNvhXKZozScRC9x4g3JR3P3E9n9ghcc99tydhSp/Ilt1jTCa\n bdhtG9pk0DeO0JVWevPzIMCeDmV3sZmJ7W3Z+30GlETj/VwZ6QcgMD0xPneAfELpNruxTzDTL8d\n COeEOHdMorXZqXXgJOgPXHVru1H0jqA00ROQ8xXjN9qYGbIzcFHS5kGSyYvKu2iR4wcBQ0mP0ay\n 0GiiKx1k2ItKOxRq3lR/JzdECQv7ebtR8aN++C+J/7K8S9YH2E3EssGNPZhLD0qaCUZS4K8nps7\n o6LklKvjhxfyVITq+ZPF90Y2XfHvOQ11lJSUJVL2yBhhuk2zeZ8Ttn4+epOfrC2iQAN1gpJQf8D\n sDHVI/lisoyM5g1OzOQ==","X-Proofpoint-GUID":"PsLjcL_buIwjBmG76iIIBuieJbZmTb_v","X-Proofpoint-ORIG-GUID":"PsLjcL_buIwjBmG76iIIBuieJbZmTb_v","X-Authority-Analysis":"v=2.4 cv=MohiLWae c=1 sm=1 tr=0 ts=69f506dd cx=c_pps\n a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17\n a=NGcC8JguVDcA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8 a=05gaV3nvTOrdMBspcBoA:9","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-05-01_05,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 spamscore=0\n priorityscore=1501 malwarescore=0 clxscore=1011 lowpriorityscore=0\n impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2605010195","Received-SPF":"pass client-ip=148.163.158.5;\n envelope-from=oelghoul@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com","X-Spam_score_int":"-26","X-Spam_score":"-2.7","X-Spam_bar":"--","X-Spam_report":"(-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"This is a temporary patch intended for testing purposes only. It defines\nthe new VFIO device feature for FMB passthrough on zPCI.\n\nSigned-off-by: Omar Elghoul <oelghoul@linux.ibm.com>\n---\n linux-headers/linux/vfio.h | 43 ++++++++++++++++++++++++++++++++++++++\n 1 file changed, 43 insertions(+)","diff":"diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h\nindex 720edfee7a..ee5f8a2276 100644\n--- a/linux-headers/linux/vfio.h\n+++ b/linux-headers/linux/vfio.h\n@@ -1506,6 +1506,49 @@ struct vfio_device_feature_dma_buf {\n \tstruct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges);\n };\n \n+/**\n+ * Upon VFIO_DEVICE_FEATURE_GET, provide FMB passthrough for VFIO zPCI devices.\n+ * \n+ * Upon VFIO_DEVICE_FEATURE_SET, only the flags field is read while the\n+ * remainder of the structure is ignored. This allows the driver to enable or\n+ * disable the FMB while also leaving reserved bits for future flag expansion.\n+ * All reserved fields should be zero for future compatibility.\n+ */\n+#define VFIO_DEVICE_FEATURE_ZPCI_FMB 13\n+#define VFIO_DEVICE_FEATURE_ZPCI_FMB_FLAGS_ENABLED\t0x1\n+\n+struct vfio_device_feature_zpci_fmb {\n+\t__u64 flags;\n+\t__u32 format:\t8;\n+\t__u32 fmt_ind:\t24;\n+\t__u32 samples;\n+\t__u64 last_update;\n+\t__u64 ld_ops;\n+\t__u64 st_ops;\n+\t__u64 stb_ops;\n+\t__u64 rpcit_ops;\n+\tunion {\n+\t\tstruct {\n+\t\t\t__u64 dma_rbytes;\n+\t\t\t__u64 dma_wbytes;\n+\t\t} fmt0;\n+\t\tstruct {\n+\t\t\t__u64 rx_bytes;\n+\t\t\t__u64 rx_packets;\n+\t\t\t__u64 tx_bytes;\n+\t\t\t__u64 tx_packets;\n+\t\t} fmt1;\n+\t\tstruct {\n+\t\t\t__u64 consumed_work_units;\n+\t\t\t__u64 max_work_units;\n+\t\t} fmt2;\n+\t\tstruct {\n+\t\t\t__u64 tx_bytes;\n+\t\t} fmt3;\n+\t};\n+\t__u64 reserved[16];\n+};\n+\n /* -------- API for Type1 VFIO IOMMU -------- */\n \n /**\n","prefixes":["RFC","v1","1/5","do-not-merge"]}