From nobody Sun Sep 28 16:28:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1758822718; cv=none; d=zohomail.com; s=zohoarc; b=k0eqyoAIjGyN3+TJJWuUKhMy3R+hg7FkBL5xPAiN+xrcp+tzeeNMZ8nzjlL4uXUPXD5/+gFanxrudKt/g+ZobZ/j0S9q+5M62WA5g2JDXgn1JmuzGgzzwoBO4AIaI5bAGPcAvHgpi1QtFejjy9o8diRtYJUoe5nNEW61auwB5h8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758822718; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=h5Oc3f7CeW37awS+wspcvNS2uIDgLPoWE84YDze3pxk=; b=Z4SFqVgcWRw3zsCybzJ3lK0fZ2ZhRHftfhrL7lAi6gaNDDJIvpg4cDDC+Z9PSsE+NAGtFXfC72dLn78oUS221kvG42wODiRS+iI5gdRvX4gOGPVLCGVJUrufmCuAP0VBolRGXlzYg6or91pnpLvzLzBwaPxkJPJrtWSRB1LsCNA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758822718328481.2369919263426; Thu, 25 Sep 2025 10:51:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v1q5u-0003y3-Ed; Thu, 25 Sep 2025 13:49:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5h-0003uJ-2K; Thu, 25 Sep 2025 13:49:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5X-0008Kg-1m; Thu, 25 Sep 2025 13:49:10 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58PG4mXG030517; Thu, 25 Sep 2025 17:48:56 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 499kwyxhjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:56 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58PHGQu2030370; Thu, 25 Sep 2025 17:48:55 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 49a9a1f28g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:55 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58PHmsio21758576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Sep 2025 17:48:54 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9C3158059; Thu, 25 Sep 2025 17:48:54 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DA5F58055; Thu, 25 Sep 2025 17:48:54 +0000 (GMT) Received: from IBM-D32RQW3.ibm.com (unknown [9.61.251.202]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 25 Sep 2025 17:48:54 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=h5Oc3f7CeW37awS+w spcvNS2uIDgLPoWE84YDze3pxk=; b=KeRyoF1GWhdQsIDGro4abcQBK8fVwPXyI SEcjESbLFR6Pz6BOEzXDUwcOpQIUqEPqARl32p/1+2PCEem4CBI5ZE+6paW50M6m pgzxWa6A+uD51kWM2rWHbEb/J8UO0wm0yz28Rn8J3PmvST/qdUeEHB9W00oz8xi2 91+CXqqchJWGt/fpJgAUEdXrOQNFXXQmD/H2k45Mr8/8ej2qaUU2NRYheabRCIGL Cjliby2xwMpqC+Y/xVPpm+Wi1jfvtrbGLBojqjl5sMCAA4HTMc9wFl3yuhWE5GjF vzewzTuTPbyVUqkxts9FFRVJUs+DUGfgEQ8F8+2r9GbbwgkzrYEgw== From: Farhan Ali To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org Cc: mjrosato@linux.ibm.com, alifm@linux.ibm.com, thuth@redhat.com, alex.williamson@redhat.com, clg@redhat.com Subject: [PATCH v3 1/5] [NOTFORMERGE] linux-headers: Update for zpci vfio device Date: Thu, 25 Sep 2025 10:48:48 -0700 Message-ID: <20250925174852.1302-2-alifm@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174852.1302-1-alifm@linux.ibm.com> References: <20250925174852.1302-1-alifm@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=J5Cq7BnS c=1 sm=1 tr=0 ts=68d58088 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=Ef7EkEwsYO5O5uvjYS4A:9 X-Proofpoint-GUID: Ps9FP8G_g1sbJHBvjpQX2JV8zfPvhMVW X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTIwMDAxNSBTYWx0ZWRfX9msAB8oYF4jK sPrLWG+I2P/02zb9uIQANLZ9c3KFhYCp6IdrityYDjysgh+pD/tOfnyzmZ5wiyjdTxQ9rQsMq/h pYQJcWF4GICL7zRhcp9qAp9vvy38sU89DWFa8/24iw4zM99TrbGqs23StyNkxtAIfLT0UTk6MH2 5ZpDzceqt5PlLQ5RLwvHQvXve9V2Qv+nh3I0HdQJVP2K2ePujK+rFzNC8dp6XvUZ3fb7rtkQsrd b8kRCzvdWqyY3eke0WGM5JSqhd+wisfa3xHPX7lXE/b6zlNz2VzUkptAnknaac6lGw3w38iTw+b FgLEtnk9zusQPwfv+hJDj7j7UHgVaxkE6YeMGCG1mV6bN4iUa3rirg2KHkl3i96rs1TLG28QQib 5Wn3Kc+r X-Proofpoint-ORIG-GUID: Ps9FP8G_g1sbJHBvjpQX2JV8zfPvhMVW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-25_01,2025-09-25_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 malwarescore=0 spamscore=0 bulkscore=0 phishscore=0 clxscore=1015 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509200015 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=alifm@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, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1758822720112116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Farhan Ali --- linux-headers/linux/vfio.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 79bf8c0cc5..2918080ad9 100644 --- a/linux-headers/linux/vfio.h +++ b/linux-headers/linux/vfio.h @@ -1468,6 +1468,21 @@ struct vfio_device_feature_bus_master { }; #define VFIO_DEVICE_FEATURE_BUS_MASTER 10 =20 +/** + * VFIO_DEVICE_FEATURE_ZPCI_ERROR feature provides PCI error information to + * userspace for vfio-pci devices on s390x. On s390x PCI error recovery in= volves + * platform firmware and notification to operating system is done by + * architecture specific mechanism. Exposing this information to userspace + * allows userspace to take appropriate actions to handle an error on the + * device. + */ +struct vfio_device_feature_zpci_err { + __u16 pec; + __u8 pending_errors; + __u8 pad; +}; +#define VFIO_DEVICE_FEATURE_ZPCI_ERROR 11 + /* -------- API for Type1 VFIO IOMMU -------- */ =20 /** --=20 2.43.0 From nobody Sun Sep 28 16:28:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1758822650; cv=none; d=zohomail.com; s=zohoarc; b=a3b75ekQVGpnyUnCJdQ6Vv6rL3Azwxr2F+oZTSEivFudrRir7OJzynazG2MbTviQSuvVkCJelJ/eMDUGYiHgG9pTihDKggVT0X2u9RqidhdQuVYswLhzg5CbDdkEOaOKl6wifi10wWHxYsulHlOH4Um4Gm0Xgs8oQcVTvfDnWIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758822650; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VB1I0L17tgvxsXN2MMzwj2lFCLXpcy+ZiA+OwtiRdaI=; b=AoH2JDMJaTu9JwCUSVADBcbZGbth5171f6pHmlzLxU7cbW7CI/oXHrvz4K+QaJYCBOcRsGnssVLskmn8JjjALcl3UMXs0OJYIpD4ZhIMd/k6GfmROd4M7wWPGWW9ef568UiFcAq3VlwulbeAZo7WgC6KWd1+NMWMgiWo7Jue/Gk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758822650653593.2358701312098; Thu, 25 Sep 2025 10:50:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v1q5z-00044P-Oy; Thu, 25 Sep 2025 13:49:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5g-0003uO-CP; Thu, 25 Sep 2025 13:49:12 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5W-0008Km-Ry; Thu, 25 Sep 2025 13:49:08 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58PGvuJj000866; Thu, 25 Sep 2025 17:48:58 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 499kwyxhju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:57 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58PGs9hu013333; Thu, 25 Sep 2025 17:48:57 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([172.16.1.74]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 49cj34ed5n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:57 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58PHmtH110748494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Sep 2025 17:48:55 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 857B458059; Thu, 25 Sep 2025 17:48:55 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7D3E58055; Thu, 25 Sep 2025 17:48:54 +0000 (GMT) Received: from IBM-D32RQW3.ibm.com (unknown [9.61.251.202]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 25 Sep 2025 17:48:54 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=VB1I0L17tgvxsXN2M Mzwj2lFCLXpcy+ZiA+OwtiRdaI=; b=pA3oVE2zzkPK40yJCQTen9xRMV5PidjeQ Pn1UDVHrvdD84OskmmtlSRmuuYVMz1roJAzKxCtP0Pg2YXttNiQemB7CKkVvlizO 1Ejhtqua18r6XlUX9VQwHBx9Hu8Ffn/0ELtLcGYvlN4bV/UzGDiF1BPOHu2m0TyX O/xbfoOjBktmEvipFUNGDymvQsBQFSLC0PyLtasiei0rOhY0YFAcA9rheHJW6AbB 6H+l4LQzc8RXIaLxbvZenVz28SBMS7LoQvG0yb3pMYchFvE7IHofIQMwxGFTKJet Gz7BOGgMNnXV08+KZ2zui3OqPZO9tNiBbU82stlpnMTRZ0Cpgo80g== From: Farhan Ali To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org Cc: mjrosato@linux.ibm.com, alifm@linux.ibm.com, thuth@redhat.com, alex.williamson@redhat.com, clg@redhat.com Subject: [PATCH v3 2/5] vfio/pci: Add an error handler callback Date: Thu, 25 Sep 2025 10:48:49 -0700 Message-ID: <20250925174852.1302-3-alifm@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174852.1302-1-alifm@linux.ibm.com> References: <20250925174852.1302-1-alifm@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=J5Cq7BnS c=1 sm=1 tr=0 ts=68d58089 cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=2pRrx5hCKfqBIdAPaiEA:9 X-Proofpoint-GUID: pRQJT-KcmsXVtOXnWNWgmaR7iRo1eFDU X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTIwMDAxNSBTYWx0ZWRfX7hzdMsqmqKXb jYITMjw37g4O1dQodxVTvHv2Hza8SncogB2PbKzIeH5/trN67GyF158OmizAkZqFQYXX7IBs07O auXXgXZocmeda/AHJUXPlrKp4rof5R1ZM60BHF8lK+BBConv37evTuxdRTqt0nAAd1txPrVFcmr PzMwl8gvbxzSLZaehtITsod4frLz6Zh4bz35F6tqFtZ/PWyNESnoU0VkW0bPWgDjAGVu3wUeygd rzOcBlZ5ykCGhYoGU4Hl4nRXSLpsPvrEC+tUwl0R1fBFEGyIjOY47XEnI1Vv9kNxiyFuJRnP0Pw oijBdjYKpEU5uIIvyHR6QHJBHlY5Rv6fEhN3GCcxmzz4UM4nVd7nm5iJszBlt+fB/i8BZGVJe17 ezLl27re X-Proofpoint-ORIG-GUID: pRQJT-KcmsXVtOXnWNWgmaR7iRo1eFDU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-25_01,2025-09-25_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 malwarescore=0 spamscore=0 bulkscore=0 phishscore=0 clxscore=1015 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509200015 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=alifm@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, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1758822651518116600 Content-Type: text/plain; charset="utf-8" Provide a vfio error handling callback, that can be used by devices to handle PCI errors for passthrough devices. Signed-off-by: Farhan Ali --- hw/vfio/pci.c | 8 ++++++++ hw/vfio/pci.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index bc0b4c4d56..b02a974954 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3063,11 +3063,19 @@ void vfio_pci_put_device(VFIOPCIDevice *vdev) static void vfio_err_notifier_handler(void *opaque) { VFIOPCIDevice *vdev =3D opaque; + Error *err =3D NULL; =20 if (!event_notifier_test_and_clear(&vdev->err_notifier)) { return; } =20 + if (vdev->err_handler) { + if (vdev->err_handler(vdev, &err)) { + return; + } + error_report_err(err); + } + /* * TBD. Retrieve the error details and decide what action * needs to be taken. One of the actions could be to pass diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index e0aef82a89..faadce487c 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -146,6 +146,7 @@ struct VFIOPCIDevice { EventNotifier err_notifier; EventNotifier req_notifier; int (*resetfn)(struct VFIOPCIDevice *); + bool (*err_handler)(struct VFIOPCIDevice *, Error **); uint32_t vendor_id; uint32_t device_id; uint32_t sub_vendor_id; --=20 2.43.0 From nobody Sun Sep 28 16:28:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1758822658; cv=none; d=zohomail.com; s=zohoarc; b=RxqaeDj4OD5Sfp90VUp7q8N2dmvPYNjPlA1AqVfKWbE86XQs4hLKkrb6lRq8IWfWFpX9xSgK4KV9/wlzBaPZjLKY58fbUUCjoYXyRVa2qVu6JDzjd3cyAw+gol25pMkakyhxuUSNh+xhjrPr7TT4DnoDadQQviQXFbduCfEpVBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758822658; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ryref7Ncbl8bVn3DfXzxZQ1S2xWXXH4QYNNJXdkY7qs=; b=R7gBlgvJt85bz3+cSjsy5WDnQ98pLk5vAzZHIaIy3RTU2ZYf5sY2MKuczzPKVkdiJluw7ObWgysCAdGlx3iLj4ibHeed/VCG+JBoAhquNTkkUfzAtKD/mki2vaodAUU3q/z6wLLi4Rs/d2G7jflm0xuVVYQi3lSk1VHAKMAkJY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17588226582741008.4150978379212; Thu, 25 Sep 2025 10:50:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v1q68-000482-Gg; Thu, 25 Sep 2025 13:49:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5i-0003ul-GW; Thu, 25 Sep 2025 13:49:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5b-0008LC-RX; Thu, 25 Sep 2025 13:49:12 -0400 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58PCoXwt022391; Thu, 25 Sep 2025 17:48:58 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 499jpkpqxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:57 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58PHVCUo013704; Thu, 25 Sep 2025 17:48:57 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 49a8tjq3as-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:57 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58PHmu2L31392462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Sep 2025 17:48:56 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4478858060; Thu, 25 Sep 2025 17:48:56 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A6A1D58055; Thu, 25 Sep 2025 17:48:55 +0000 (GMT) Received: from IBM-D32RQW3.ibm.com (unknown [9.61.251.202]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 25 Sep 2025 17:48:55 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=ryref7 Ncbl8bVn3DfXzxZQ1S2xWXXH4QYNNJXdkY7qs=; b=MfdTW6KyofYicNbmUUGtu5 Blz9eBvYgjoSyyCO0rJDTn2XFblJJG8YCw2ujUe/OaoHCGOHpgf5mpL4Wyvb9Ah9 NVHI0SJWSalsIcEx5fb7z9QEIyBB7XUMF3cQnxQad3WtaGHww2huywcPfXzS/w82 t0vsgkr1cIvprfbppcHXEBPovs/vL4dekV7pmz34KfuHkL2D3+8Qq+54CnEaYlO3 YogmzV0o0JazCw5SGxygfrveth4eO+hgV07azxy/c+ZxFH9jj2AJCeJnd+tuzXSd gOoK5fEjvt67GXfZN17hMVvT+AP7PMyoZu+HxKIqy9wXBL5Wosiclfv3b/Bs09sA == From: Farhan Ali To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org Cc: mjrosato@linux.ibm.com, alifm@linux.ibm.com, thuth@redhat.com, alex.williamson@redhat.com, clg@redhat.com Subject: [PATCH v3 3/5] vfio: Introduce vfio_device_feature helper function Date: Thu, 25 Sep 2025 10:48:50 -0700 Message-ID: <20250925174852.1302-4-alifm@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174852.1302-1-alifm@linux.ibm.com> References: <20250925174852.1302-1-alifm@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=L50dQ/T8 c=1 sm=1 tr=0 ts=68d5808a cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=IkcTkHD0fZMA:10 a=yJojWOMRYYMA:10 a=20KFwNOVAAAA:8 a=VnNF1IyMAAAA:8 a=eXa9mqf8Gm2PLtKtlTcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTIwMDAxMCBTYWx0ZWRfXwS5F2bqHX8+O C5/SCRHHKnGW5zUwvqlA9M8/tNwF3cu5AQurzwhRjDXpXEWYHW5dNdjT5tLvF98tFLs7I5h5XDg lnw/EHcrdBjJOOId0oA6jqcaiuqXYbL9Mk4bDvXlCHNkPuncVq/Vnj8RYvBkzDtp72dmoGwqywz 8PG4ycsnsJeQxCZKXQswmVOXPToPnJCXS4N2Spxl9F8hPD6D9yQ8PkpyZv3FZAZcoczvqMaYFlf kP1FRhxIuW94gTXQs4/xglJEXKLIJvwkLL75zDenU2H33sxtUpbXBfKWDRhwTfgn5mJKK7pFddR Lavj9sZ5j4Mbh+AslQPogFyNVVKts1m/ThdotRA47q6ahRpW6Cl9wCs5G7gcVT5nOmmZbQLgTDc +vIl4SpZ X-Proofpoint-ORIG-GUID: 5oAnZZ95uR9yWwQH2OWVunrVhdfev_FX X-Proofpoint-GUID: 5oAnZZ95uR9yWwQH2OWVunrVhdfev_FX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-25_01,2025-09-25_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509200010 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=alifm@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, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1758822659379116600 Introduce a helper function to call internal VFIODeviceIOOps device_feature(). Suggested-by: C=C3=A9dric Le Goater Signed-off-by: Farhan Ali --- hw/vfio/device.c | 6 ++++++ include/hw/vfio/vfio-device.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/hw/vfio/device.c b/hw/vfio/device.c index 08f12ac31f..2ea2af3f79 100644 --- a/hw/vfio/device.c +++ b/hw/vfio/device.c @@ -504,6 +504,12 @@ void vfio_device_unprepare(VFIODevice *vbasedev) vbasedev->bcontainer =3D NULL; } =20 +int vfio_device_feature(VFIODevice *vbasedev, + struct vfio_device_feature *feature) +{ + return vbasedev->io_ops->device_feature(vbasedev, feature); +} + /* * Traditional ioctl() based io */ diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h index e7e6243e2d..a7f00d2a80 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -157,6 +157,8 @@ bool vfio_device_attach_by_iommu_type(const char *iommu= _type, char *name, Error **errp); void vfio_device_detach(VFIODevice *vbasedev); VFIODevice *vfio_get_vfio_device(Object *obj); +int vfio_device_feature(VFIODevice *vbasedev, + struct vfio_device_feature *feat); =20 typedef QLIST_HEAD(VFIODeviceList, VFIODevice) VFIODeviceList; extern VFIODeviceList vfio_device_list; --=20 2.43.0 From nobody Sun Sep 28 16:28:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1758822648; cv=none; d=zohomail.com; s=zohoarc; b=c/4wRlusYQDAMEiWeWkqgvRwmiiY/epM8CQv2/2vhsO/tqGwhtLJQhvyfc8PJewWVOupXA63/X1Mh9OxpX76n5d5Cqh0GUJB9oH4j5SDapsEoIuYBOHpMJhcW6tLHJaoVzyHr/R3IfobY+74TMOhXijjocbBdnN/cP7yDHshvb0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758822648; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NTte2WvaMIGjBsVteczkP++aZriznHgVIWSU6Q4J+wA=; b=YJ01jtg2sWF1KL5UUrmuaEPomnJOROCockHxFVSDjt3Bs1psXP8jUfGxvJvokCAw7jwCAYTZ3LYVuLJe4OTZHXHvcXxiA9/AWzRKAmprVUmHY/Uhg8/gGBVgHgWN/Rfby5goqIIH+xreM1zoOeJ3J0otla6eWDhXtj2jzkiCojQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17588226486791016.44862563134; Thu, 25 Sep 2025 10:50:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v1q66-00047Q-0X; Thu, 25 Sep 2025 13:49:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5i-0003vI-57; Thu, 25 Sep 2025 13:49:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5a-0008LN-4J; Thu, 25 Sep 2025 13:49:13 -0400 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58PCaS88010177; Thu, 25 Sep 2025 17:49:00 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 499ksc7jag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:49:00 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58PHUBCA030345; Thu, 25 Sep 2025 17:48:59 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 49a9a1f28p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:58 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58PHmk2Y53543366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Sep 2025 17:48:46 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01B4958059; Thu, 25 Sep 2025 17:48:57 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64D0A5805D; Thu, 25 Sep 2025 17:48:56 +0000 (GMT) Received: from IBM-D32RQW3.ibm.com (unknown [9.61.251.202]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 25 Sep 2025 17:48:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=NTte2WvaMIGjBsVte czkP++aZriznHgVIWSU6Q4J+wA=; b=Lq4vTkehTHaGGjyzO2VvKgg/UDiOAHduq zWk9jocbN5KaAkPgMVYzrrRCO8Naox5nH9Td1jYKBcCxDVfH0/c/4gwRZ+Q2PFuc x7ZvlnEUI8KtzvdrqImi461v0ou+h5aJABN50duOUNFCrJ2V9O4CpxMl6uEes7/V v1duNJz+x76FEB9mmh03i+gg/bxO6vQAyfWDzhOY4wwZ3HiXx8vv8gTU72XUmkSA ky9pbD6O4H7bGPMpsce5xgG/pWe5QVLLZD/BIB8E0nuPYU6djS2Vk6iAHbInMoZP 1Q5m1+nBWwpfs6/NrEPSD2fIlNsVj+dhgBv9otVLdqvj/r6JZZndw== From: Farhan Ali To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org Cc: mjrosato@linux.ibm.com, alifm@linux.ibm.com, thuth@redhat.com, alex.williamson@redhat.com, clg@redhat.com Subject: [PATCH v3 4/5] s390x/pci: Add PCI error handling for vfio pci devices Date: Thu, 25 Sep 2025 10:48:51 -0700 Message-ID: <20250925174852.1302-5-alifm@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174852.1302-1-alifm@linux.ibm.com> References: <20250925174852.1302-1-alifm@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 86BdgjFMZNxAmKWqnI_ufGKA55tXkRyt X-Proofpoint-GUID: 86BdgjFMZNxAmKWqnI_ufGKA55tXkRyt X-Authority-Analysis: v=2.4 cv=SdH3duRu c=1 sm=1 tr=0 ts=68d5808c cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=Q7jWXzcZPd0Yemqux3YA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTIwMDAyMCBTYWx0ZWRfX4HHUCuHFJ/D/ 1jjaM0I7+2oFfX9T7GTn5gXsYUBGEf/1FGbKQkQCer4HcMqXraY5/cyn1os/kT3qsaU8ECTvz8P +WTYge10G2uRuRpZZCC3sKhIEZgyhM/1EdlqbCztHjd6W8xJ/umvRqV8/d478SFyzV8dDzgibgw TVC+/ccDpAMFK3QqcX3z0Wzg6RO8wlagRMrYh4VoeUuUCSVxbqJ68xmdm6qUL0UpokdoYXnbf36 vOOyKQ9cbOMfZuf/1pNd30Nw3peU1F7IM7XM7CsH7P1OQAVs9rQ/Djf59tmpO5XRgfBIKBEs/dx QmMPkTQFoETA+/wgSeYEfB+IhFVJdi2b48ws5DTFK7BCvk9dL8/RMP3S7tolVKjpDfQ1W4az4W6 qDwBGN9z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-25_01,2025-09-25_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 spamscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509200020 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=alifm@linux.ibm.com; helo=mx0a-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, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1758822649721116601 Content-Type: text/plain; charset="utf-8" Add an s390x specific callback for vfio error handling. For s390x pci devic= es, we have platform specific error information. We need to retrieve this error information for passthrough devices. This is done via a memory region which exposes that information. Once this error information is retrieved we can then inject an error into the guest, and let the guest drive the recovery. Signed-off-by: Farhan Ali --- hw/s390x/s390-pci-bus.c | 9 ++++ hw/s390x/s390-pci-vfio.c | 81 ++++++++++++++++++++++++++++++++ include/hw/s390x/s390-pci-bus.h | 1 + include/hw/s390x/s390-pci-vfio.h | 6 +++ 4 files changed, 97 insertions(+) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index f87d2748b6..9f7b17e807 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -158,6 +158,8 @@ static void s390_pci_perform_unplug(S390PCIBusDevice *p= bdev) { HotplugHandler *hotplug_ctrl; =20 + qemu_mutex_destroy(&pbdev->err_handler_lock); + if (pbdev->pft =3D=3D ZPCI_PFT_ISM) { notifier_remove(&pbdev->shutdown_notifier); } @@ -1074,6 +1076,7 @@ static void s390_pcihost_plug(HotplugHandler *hotplug= _dev, DeviceState *dev, S390pciState *s =3D S390_PCI_HOST_BRIDGE(hotplug_dev); PCIDevice *pdev =3D NULL; S390PCIBusDevice *pbdev =3D NULL; + Error *local_err =3D NULL; int rc; =20 if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_BRIDGE)) { @@ -1140,6 +1143,7 @@ static void s390_pcihost_plug(HotplugHandler *hotplug= _dev, DeviceState *dev, pbdev->iommu->pbdev =3D pbdev; pbdev->state =3D ZPCI_FS_DISABLED; set_pbdev_info(pbdev); + qemu_mutex_init(&pbdev->err_handler_lock); =20 if (object_dynamic_cast(OBJECT(dev), "vfio-pci")) { /* @@ -1164,6 +1168,11 @@ static void s390_pcihost_plug(HotplugHandler *hotplu= g_dev, DeviceState *dev, pbdev->iommu->dma_limit =3D s390_pci_start_dma_count(s, pbdev); /* Fill in CLP information passed via the vfio region */ s390_pci_get_clp_info(pbdev); + /* Setup error handler for error recovery */ + if (!s390_pci_setup_err_handler(pbdev, &local_err)) { + warn_report_err(local_err); + } + if (!pbdev->interp) { /* Do vfio passthrough but intercept for I/O */ pbdev->fh |=3D FH_SHM_VFIO; diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index 938a551171..1697a84de7 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -103,6 +103,58 @@ void s390_pci_end_dma_count(S390pciState *s, S390PCIDM= ACount *cnt) } } =20 +static bool s390_pci_get_feature_err(VFIOPCIDevice *vfio_pci, + struct vfio_device_feature_zpci_err *e= rr, + Error **errp) +{ + int ret; + uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + + sizeof(struct vfio_device_feature_zpci_err), + sizeof(uint64_t))] =3D {}; + struct vfio_device_feature *feature =3D (struct vfio_device_feature *)= buf; + + feature->argsz =3D sizeof(buf); + feature->flags =3D VFIO_DEVICE_FEATURE_GET | VFIO_DEVICE_FEATURE_ZPCI_= ERROR; + ret =3D vfio_device_feature(&vfio_pci->vbasedev, feature); + + if (ret) { + error_setg(errp, "Failed feature get VFIO_DEVICE_FEATURE_ZPCI_ERRO= R" + " (rc=3D%d)", ret); + return false; + } + + memcpy(err, (struct vfio_device_feature_zpci_err *) feature->data, + sizeof(struct vfio_device_feature_zpci_err)); + + return true; +} + +static bool s390_pci_err_handler(VFIOPCIDevice *vfio_pci, Error **errp) +{ + S390PCIBusDevice *pbdev; + struct vfio_device_feature_zpci_err err; + + pbdev =3D s390_pci_find_dev_by_target(s390_get_phb(), + DEVICE(&vfio_pci->parent_obj)->id); + + QEMU_LOCK_GUARD(&pbdev->err_handler_lock); + + if (!s390_pci_get_feature_err(vfio_pci, &err, errp)) { + return false; + } + + pbdev->state =3D ZPCI_FS_ERROR; + s390_pci_generate_error_event(err.pec, pbdev->fh, pbdev->fid, 0, 0); + + while (err.pending_errors) { + if (!s390_pci_get_feature_err(vfio_pci, &err, errp)) { + return false; + } + s390_pci_generate_error_event(err.pec, pbdev->fh, pbdev->fid, 0, 0= ); + } + return true; +} + static void s390_pci_read_base(S390PCIBusDevice *pbdev, struct vfio_device_info *info) { @@ -369,3 +421,32 @@ void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) s390_pci_read_util(pbdev, info); s390_pci_read_pfip(pbdev, info); } + +bool s390_pci_setup_err_handler(S390PCIBusDevice *pbdev, Error **errp) +{ + int ret; + VFIOPCIDevice *vfio_pci =3D VFIO_PCI_BASE(pbdev->pdev); + uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature), + sizeof(uint64_t))] =3D {}; + struct vfio_device_feature *feature =3D (struct vfio_device_feature *)= buf; + + feature->argsz =3D sizeof(buf); + feature->flags =3D VFIO_DEVICE_FEATURE_PROBE | VFIO_DEVICE_FEATURE_ZPC= I_ERROR; + + ret =3D vfio_device_feature(&vfio_pci->vbasedev, feature); + + if (ret !=3D 0) { + if (ret =3D=3D -ENOTTY) { + error_setg(errp, "Automated error recovery unavailable for dev= ice"); + } else { + error_setg(errp, + "Failed to probe for VFIO_DEVICE_FEATURE_ZPCI_ERROR= (ret=3D%d)", + ret); + } + return false; + } + + vfio_pci->err_handler =3D s390_pci_err_handler; + + return true; +} diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bu= s.h index 04944d4fed..3795e0bbfc 100644 --- a/include/hw/s390x/s390-pci-bus.h +++ b/include/hw/s390x/s390-pci-bus.h @@ -364,6 +364,7 @@ struct S390PCIBusDevice { bool forwarding_assist; bool aif; bool rtr_avail; + QemuMutex err_handler_lock; QTAILQ_ENTRY(S390PCIBusDevice) link; }; =20 diff --git a/include/hw/s390x/s390-pci-vfio.h b/include/hw/s390x/s390-pci-v= fio.h index ae1b126ff7..b45ffa5044 100644 --- a/include/hw/s390x/s390-pci-vfio.h +++ b/include/hw/s390x/s390-pci-vfio.h @@ -22,6 +22,7 @@ S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s, void s390_pci_end_dma_count(S390pciState *s, S390PCIDMACount *cnt); bool s390_pci_get_host_fh(S390PCIBusDevice *pbdev, uint32_t *fh); void s390_pci_get_clp_info(S390PCIBusDevice *pbdev); +bool s390_pci_setup_err_handler(S390PCIBusDevice *pbdev, Error **errp); #else static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail) { @@ -39,6 +40,11 @@ static inline bool s390_pci_get_host_fh(S390PCIBusDevice= *pbdev, uint32_t *fh) return false; } static inline void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) { } +static inline bool s390_pci_setup_err_handler(S390PCIBusDevice *pbdev, Err= or **errp) +{ + error_setg(errp, "VFIO not available, cannot setup error handler\n"); + return false; +} #endif =20 #endif --=20 2.43.0 From nobody Sun Sep 28 16:28:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1758822655; cv=none; d=zohomail.com; s=zohoarc; b=NwkicaxhtYhNYlirOix2xQziZ3s4GOhvm7B8lHZKiGyAmNHIC58bpWu3cuR0VHxC8qdwOWgBq4d9JkUgj80IGh9b4TnR0Oc5JsGHEh4rAJOBv733GAxV40vdrz6OQe2J68bkxOyRGNsgA/tuSXC8/DiuC0+hCQ61gCFN+gngunw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758822655; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jq2i/gelLXmT8TSyq6Z2M6/hJosHLf7AlJNL1I5JmIU=; b=MCyKe7QQfsKFV5CX8dLGCDcPpgsjS1NuZcGBt3qzoOPQ17+sfx2qtxIxgMJLdPbSgKHnlwYPtQpqYHQI1+yjr7c7zo+RfjiO0pqRQvbodvnr92QPm8z6L7v+bbdBY0Yg6rByd+sd+bewouuA0v8E2oe45fOaZQMOQ9zsp3qnjuk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758822655903949.7524822701955; Thu, 25 Sep 2025 10:50:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v1q61-000460-Tz; Thu, 25 Sep 2025 13:49:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5i-0003vQ-HI; Thu, 25 Sep 2025 13:49:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v1q5b-0008LO-HD; Thu, 25 Sep 2025 13:49:14 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58PAQwI2007389; Thu, 25 Sep 2025 17:49:01 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 499n0jyam4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:49:00 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 58PHSr6n030336; Thu, 25 Sep 2025 17:48:59 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 49a9a1f28s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Sep 2025 17:48:59 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 58PHmlMd60686604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Sep 2025 17:48:47 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AFC1258059; Thu, 25 Sep 2025 17:48:57 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20DD55805D; Thu, 25 Sep 2025 17:48:57 +0000 (GMT) Received: from IBM-D32RQW3.ibm.com (unknown [9.61.251.202]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 25 Sep 2025 17:48:57 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=jq2i/gelLXmT8TSyq 6Z2M6/hJosHLf7AlJNL1I5JmIU=; b=pBJfkYRDEd01GhDyJwiAocw4jLsbPKags jdGQEAwhM1xmTgvX/DZKxWBhomESi94bCiLx7EWfbt12R0n6gf7gst/LxGz+Wvf3 Epr6+Y5ZMnsg4ef3znLZaVr02ew/scIr/+YyRAkRVXyMAHTOSCU6ZBhamDIYCCu7 +PUsPkbPaxV0D7pMZlT6WUAIuFGB6634+HdcX3yPH2eitLtxSBzVXAnMMC6wpjpP LOGq9Ghum+qAqlZ99BNahpwCXTMNHOWjJYNL6c9b/Gn880QTAuNWzqV218N4QaN3 27t06w52PxVA8ONwXE3rxIflQRTuS0RSvW+08GlaPLxIbXjXlJzkA== From: Farhan Ali To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org Cc: mjrosato@linux.ibm.com, alifm@linux.ibm.com, thuth@redhat.com, alex.williamson@redhat.com, clg@redhat.com Subject: [PATCH v3 5/5] s390x/pci: Reset a device in error state Date: Thu, 25 Sep 2025 10:48:52 -0700 Message-ID: <20250925174852.1302-6-alifm@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250925174852.1302-1-alifm@linux.ibm.com> References: <20250925174852.1302-1-alifm@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTIwMDAzMyBTYWx0ZWRfX5P1ZqBbEbbEh g7wfUS6gRMsJZ8O1PRXoH/fr3MP1JrHzBqBtMWpVvFSwh1ad9ie58RWUhhhzg5CBYbRPPhtV9iQ SsCmX0LdUg6LWkZbQoswaG22J4i6DDZ+vuZoBZfM9FuTJ33TrTA3mtwjqOiwCuc1SUEIpSzEYzY SKwotB0HQ1dwmeVh4wFRrUZfDZCOk7nS73i5veYTaY8OV7TqI+2UmiA00gTNt7ZBlp2k7ygd1W7 I2dMkmbWWUvqB25IobW1XlNLP5yxqTpDvUEX3fAL0em+81TEfKt/QE5qi+LHb70ooPRQCFErgD8 nvpKZpufZJbTsw80U6A8patjdgWa+b02uabeTQCeTHJev6So+HfPHJMrGK/t8cMmJDI4ecAaoTn NCGk1v8X X-Authority-Analysis: v=2.4 cv=TOlFS0la c=1 sm=1 tr=0 ts=68d5808c cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=A6rq8h5Md1LYvE6mRIYA:9 X-Proofpoint-ORIG-GUID: E6A9tcWviRvGZN3pffGc4obFdVn9pHjp X-Proofpoint-GUID: E6A9tcWviRvGZN3pffGc4obFdVn9pHjp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-25_01,2025-09-25_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 phishscore=0 impostorscore=0 adultscore=0 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509200033 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=alifm@linux.ibm.com; helo=mx0a-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, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1758822657492116600 Content-Type: text/plain; charset="utf-8" For passthrough devices in error state, for a guest driven reset of the device we can attempt a reset to recover the device. A reset of the device will trigger a CLP disable/enable cycle on the host to bring the device into a recovered state. Signed-off-by: Farhan Ali --- hw/s390x/s390-pci-bus.c | 7 +++++++ hw/s390x/s390-pci-vfio.c | 6 ++++++ include/hw/s390x/s390-pci-vfio.h | 2 ++ 3 files changed, 15 insertions(+) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 9f7b17e807..c0216d4a82 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -1497,6 +1497,8 @@ static void s390_pci_device_reset(DeviceState *dev) return; case ZPCI_FS_STANDBY: break; + case ZPCI_FS_ERROR: + break; default: pbdev->fh &=3D ~FH_MASK_ENABLE; pbdev->state =3D ZPCI_FS_DISABLED; @@ -1509,6 +1511,11 @@ static void s390_pci_device_reset(DeviceState *dev) } else if (pbdev->summary_ind) { pci_dereg_irqs(pbdev); } + + if (pbdev->state =3D=3D ZPCI_FS_ERROR) { + s390_pci_reset(pbdev); + } + if (pbdev->iommu->enabled) { pci_dereg_ioat(pbdev->iommu); } diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index 1697a84de7..27e300f95d 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -155,6 +155,12 @@ static bool s390_pci_err_handler(VFIOPCIDevice *vfio_p= ci, Error **errp) return true; } =20 +void s390_pci_reset(S390PCIBusDevice *pbdev) +{ + VFIOPCIDevice *vfio_pci =3D VFIO_PCI_BASE(pbdev->pdev); + ioctl(vfio_pci->vbasedev.fd, VFIO_DEVICE_RESET); +} + static void s390_pci_read_base(S390PCIBusDevice *pbdev, struct vfio_device_info *info) { diff --git a/include/hw/s390x/s390-pci-vfio.h b/include/hw/s390x/s390-pci-v= fio.h index b45ffa5044..5d7f21023f 100644 --- a/include/hw/s390x/s390-pci-vfio.h +++ b/include/hw/s390x/s390-pci-vfio.h @@ -23,6 +23,7 @@ void s390_pci_end_dma_count(S390pciState *s, S390PCIDMACo= unt *cnt); bool s390_pci_get_host_fh(S390PCIBusDevice *pbdev, uint32_t *fh); void s390_pci_get_clp_info(S390PCIBusDevice *pbdev); bool s390_pci_setup_err_handler(S390PCIBusDevice *pbdev, Error **errp); +void s390_pci_reset(S390PCIBusDevice *pbdev); #else static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail) { @@ -45,6 +46,7 @@ static inline bool s390_pci_setup_err_handler(S390PCIBusD= evice *pbdev, Error **e error_setg(errp, "VFIO not available, cannot setup error handler\n"); return false; } +static inline void s390_pci_reset(S390PCIBusDevice *pbdev) { } #endif =20 #endif --=20 2.43.0