Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp722175rwl; Fri, 4 Nov 2022 05:45:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM56t1exiyzDHN1RPMlxrasebt2E8HKYxv7CdcxChE6FyLD00ZtlPouapzFiqSfWqyHX5MP9 X-Received: by 2002:a05:6402:17d9:b0:461:7c3c:926e with SMTP id s25-20020a05640217d900b004617c3c926emr36030650edy.200.1667565945013; Fri, 04 Nov 2022 05:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667565945; cv=none; d=google.com; s=arc-20160816; b=E58TEEd+RhCsnHMWBx5rZ2yVCLcNUZDKvPpX8ONp6PmukUr8LNVpbD7XdI/mzdKVY/ +fz2kVUb0TVPmUfUiqvEk+D8fOR6JFEOvZn6jwToVqncS3Tx5nl7H8s+QmplnlvSom3r sJE8ibi9n5EmyMD8++H519CJcBqMIs9ljO6lXPlB6MN2xKbhgdrnERlDSARYJZ1MQvC5 lFoghaXbqw7O/fIIhlRxGhJMdkjnsjcxKfAZeP9LRAzrRGSBf9eax4GmCfmnG3ndVzHQ sudALlbJ8GDjTeciYxV0TUjD+w7bu4R25oXeEvVobt8XQEIazdeGeGurKDFhndcdJYN9 hUSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=RpfopL9GvWC6BKuueYK3XkrSlHu3oZj4DUYKz7LYdbc=; b=gUwsST2diE6gIsMMIf4H3I+Z3NEduZcL/gWib+jq3VkIQUNm1GX5G+QJe40bOCmuYh yeSqS3jJW/Gb5XKfsTzyQ+DvE6uCDcMb06QZ38jFVo35L4ZTOzaxLBmGTKBnLpHC2xeH jJGiTqBffeQG8ekw4D0lIf3W2bP0D2IpWf0YILK/7ELfexZWlSGSPyM40fOUDWky5kkp xMGgsUySVhZQzY9P2FWz9fheVzDU9blDAuBW8SEzyFIcvmUSn51FO34qKz4BWLHEyCGK RCeEa81sxzROt7FhaM1TnamXOJmS0noO1MEmrXKIZupgEYP2ZdimmebEMsWS7K5GIsHu 7z+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=inixn5ka; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb43-20020a170907162b00b007ae03f7b641si5171828ejc.782.2022.11.04.05.45.21; Fri, 04 Nov 2022 05:45:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=inixn5ka; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231892AbiKDM2Y (ORCPT + 96 others); Fri, 4 Nov 2022 08:28:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbiKDM2U (ORCPT ); Fri, 4 Nov 2022 08:28:20 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 839E12AC63; Fri, 4 Nov 2022 05:28:18 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A4Aealw012853; Fri, 4 Nov 2022 12:28:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=RpfopL9GvWC6BKuueYK3XkrSlHu3oZj4DUYKz7LYdbc=; b=inixn5kaWfd0sR5Q3BvmIJ0daAZArrpNDVV9IO4rjFT8hRhihn5Qh2TCX7Au9nN7PuVE tI5l7hzW3MhcuOp0Ngufj1xOUv8cGtBdDxjaf+Uis0tAH8UHOdrRBETnC8ObtYVgFj+2 EgES6cw60OaMtzrLu8oNUzURTid4amls9BQgg6MtJ9tW75/0J8L5WkvQZ61FScU7BOvo ThwtjazRRuoI3YTLP8kANUwnv+7BGe8ms0VmJSFPC4lEBaK1LLK3mtg6uPxaxFgtdBM2 7dzITiXM1TH1TPKlxB6BGRUoUy8HtUij0hP3D14d1WWcPh57uernETSc66aFW+sbc72P Eg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3kmpt14vdp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Nov 2022 12:28:05 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2A4AYULx023135; Fri, 4 Nov 2022 12:28:04 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3kmpt14vd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Nov 2022 12:28:04 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A4CKkHC008853; Fri, 4 Nov 2022 12:28:03 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma03dal.us.ibm.com with ESMTP id 3kgutb1ykc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Nov 2022 12:28:03 +0000 Received: from smtpav06.dal12v.mail.ibm.com ([9.208.128.130]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A4CS39l25100648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Nov 2022 12:28:03 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F0E458055; Fri, 4 Nov 2022 12:28:01 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA32158043; Fri, 4 Nov 2022 12:27:58 +0000 (GMT) Received: from li-479af74c-31f9-11b2-a85c-e4ddee11713b.ibm.com (unknown [9.65.225.56]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 4 Nov 2022 12:27:58 +0000 (GMT) Message-ID: Subject: Re: [PATCH v2 4/7] vfio/ccw: move private to mdev lifecycle From: Eric Farman To: Matthew Rosato , Alex Williamson , Cornelia Huck , Jason Gunthorpe , Kevin Tian , Yi Liu Cc: Zhenyu Wang , Zhi Wang , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Halil Pasic , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Tony Krowiak , Jason Herne , Harald Freudenberger , Diana Craciun , Eric Auger , Kirti Wankhede , Abhishek Sahu , Yishai Hadas , intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org Date: Fri, 04 Nov 2022 08:27:58 -0400 In-Reply-To: <19ded86a-9574-23d7-8bbc-7dd94c95c144@linux.ibm.com> References: <20221102150152.2521475-1-farman@linux.ibm.com> <20221102150152.2521475-5-farman@linux.ibm.com> <19ded86a-9574-23d7-8bbc-7dd94c95c144@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pU_nA-I-JhlPc6jY1rBRLPpMxJsu9xnc X-Proofpoint-ORIG-GUID: p4pJcAzXB-Uhoh3KM52yU4W3FYgPeLMB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-04_07,2022-11-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211040081 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2022-11-03 at 19:22 -0400, Matthew Rosato wrote: > On 11/2/22 11:01 AM, Eric Farman wrote: > > Now that the mdev parent data is split out into its own struct, > > it is safe to move the remaining private data to follow the > > mdev probe/remove lifecycle. The mdev parent data will remain > > where it is, and follow the subchannel and the css driver > > interfaces. > >=20 > > Signed-off-by: Eric Farman > > --- > > =C2=A0drivers/s390/cio/vfio_ccw_drv.c=C2=A0=C2=A0=C2=A0=C2=A0 | 15 +---= ----------- > > =C2=A0drivers/s390/cio/vfio_ccw_ops.c=C2=A0=C2=A0=C2=A0=C2=A0 | 26 ++++= +++++++++------------ > > - > > =C2=A0drivers/s390/cio/vfio_ccw_private.h |=C2=A0 2 ++ > > =C2=A03 files changed, 16 insertions(+), 27 deletions(-) > >=20 >=20 > ... >=20 > > diff --git a/drivers/s390/cio/vfio_ccw_ops.c > > b/drivers/s390/cio/vfio_ccw_ops.c > > index eb0b8cc210bb..e45d4acb109b 100644 > > --- a/drivers/s390/cio/vfio_ccw_ops.c > > +++ b/drivers/s390/cio/vfio_ccw_ops.c > > @@ -100,15 +100,20 @@ static int vfio_ccw_mdev_probe(struct > > mdev_device *mdev) > > =C2=A0{ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct subchannel *sch = =3D to_subchannel(mdev->dev.parent); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct vfio_ccw_parent = *parent =3D dev_get_drvdata(&sch- > > >dev); > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct vfio_ccw_private *pri= vate =3D dev_get_drvdata(&parent- > > >dev); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct vfio_ccw_private *pri= vate; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int ret; > > =C2=A0 > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (private->state =3D=3D VF= IO_CCW_STATE_NOT_OPER) > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0return -ENODEV; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0private =3D kzalloc(sizeof(*= private), GFP_KERNEL); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (!private) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0return -ENOMEM; >=20 > Ha, looks like you time traveled and took my advice :) Ha, I forgot I did this in the future. :) >=20 > In fact it looks like some of my other comments from patch 1 get > cleaned up here too -- but would still be good to make those changes > in patch 1 for completeness/bisect. Agreed, I'll pull those down to patch 1; thanks. >=20 > Reviewed-by: Matthew Rosato >=20