From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44039C43217 for ; Thu, 3 Nov 2022 21:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbiKCV5M (ORCPT ); Thu, 3 Nov 2022 17:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbiKCV5L (ORCPT ); Thu, 3 Nov 2022 17:57:11 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0DB1222A7 for ; Thu, 3 Nov 2022 14:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667512576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d+gPBLcj3yfcNxg3iZDolr/DLSZRZsYZJ+BZEPDd0k8=; b=DpyiiCjoutuz5IZr2y51EINmY9i02n84pK3ZdkXXhu5UoJX5VLMSze9+aSzfQFTwbFzkr1 0nrAsIj/xWzAzYkxjUllbNsCKobuWkS20gosbB+4bY59cNNGwe3gu6fIanQEWIDUN6yYiL et36X0d2KlFNK7wLzG+Df0ZhqM1p+8c= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-251-EhjULkQMNNWjlutwbsQ5FA-1; Thu, 03 Nov 2022 17:56:15 -0400 X-MC-Unique: EhjULkQMNNWjlutwbsQ5FA-1 Received: by mail-io1-f72.google.com with SMTP id j17-20020a5d93d1000000b006bcdc6b49cbso1897307ioo.22 for ; Thu, 03 Nov 2022 14:56:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d+gPBLcj3yfcNxg3iZDolr/DLSZRZsYZJ+BZEPDd0k8=; b=mXNn0eLdo3dccAS8zXyxJHHtBINnfrXU4hust16IxpYcbUuqqlat8S2ss4r9R+HO/y +9oL2gc+X5gS6oUFtWeetT20o9iIhnY+C7rba/JJJBscrhT8PwrrJatcHm/f1c61gKPd TXl9Y4AQ5U35jJOG5ZjQXbDl6TzRmsLKWbvRyF5BHTQcBJmjog2Sd6kiBYdXEmgJmvFT +2WqtVzNwjuY4ZruE+SI8F1W2W3hHGj8sB+sS+660FFbo9fcDK7eixvhwWdGsf6xdsyE +g8YyfF/sctaYlZCbohBAGj0HP4bMOYsoGjKkXRnX8Dv3T9YXlcM45MLAbBSNYn36ymN yKkg== X-Gm-Message-State: ACrzQf2l3kQkqheMvjZ2tPgtlDxm46oZYHpU65IvgpEzFnvHY50BBTjo HngB2D3yAKksBb7XE8DrN0vXuItZZYA39mKzDl32OKK9Ds/+ic2CIMkp13+r3zfzh2//wh/CCfX /pbNuDKPiMV1sil++sO4/qg== X-Received: by 2002:a05:6602:2c09:b0:694:51c4:8282 with SMTP id w9-20020a0566022c0900b0069451c48282mr20182360iov.203.1667512574941; Thu, 03 Nov 2022 14:56:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6XXTGY/jAs7DgmNTFtcqCXPtF5Oitv5ZjT7vsZBKLSnzosYzEC5JgzfurqOGyquHSILSbftA== X-Received: by 2002:a05:6602:2c09:b0:694:51c4:8282 with SMTP id w9-20020a0566022c0900b0069451c48282mr20182338iov.203.1667512574697; Thu, 03 Nov 2022 14:56:14 -0700 (PDT) Received: from redhat.com ([38.15.36.239]) by smtp.gmail.com with ESMTPSA id z27-20020a05663822bb00b00371caa7ef7csm598363jas.2.2022.11.03.14.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 14:56:14 -0700 (PDT) Date: Thu, 3 Nov 2022 15:56:11 -0600 From: Alex Williamson To: Eric Farman Cc: Matthew Rosato , Cornelia Huck , Jason Gunthorpe , Kevin Tian , Yi Liu , 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 Subject: Re: [PATCH v2 0/7] vfio-ccw parent rework Message-ID: <20221103155611.0008075f.alex.williamson@redhat.com> In-Reply-To: <20221102150152.2521475-1-farman@linux.ibm.com> References: <20221102150152.2521475-1-farman@linux.ibm.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On Wed, 2 Nov 2022 16:01:45 +0100 Eric Farman wrote: > Hi all, > > Here is an update to the vfio-ccw lifecycle changes that have been discussed > in various forms over the past year [1][2] or so, and which I dusted off > recently. > > Patches 1-5 rework the behavior of the vfio-ccw driver's private struct. > In summary, the mdev pieces are split out of vfio_ccw_private and into a > new vfio_ccw_parent struct that will continue to follow today's lifecycle. > The remainder (bulk) of the private struct moves to follow the mdev > probe/remove pair. There's opportunity for further separation of the > things in the private struct, which would simplify some of the vfio-ccw > code, but it got too hairy as I started that. Once vfio-ccw is no longer > considered unique, those cleanups can happen at our leisure. > > Patch 6 removes the trickery where vfio-ccw uses vfio_init_device instead of > vfio_alloc_device, and thus removes vfio_init_device from the outside world. > > Patch 7 removes vfio_free_device from vfio-ccw and the other drivers (hello, > CC list!), letting it be handled by vfio_device_release directly. Looks like another spin is pending, but the vfio core and collateral changes in 6 and 7 look good to me. Would this go in through the vfio or s390 tree? I'd be happy to merge or provide a branch, depending on the route. For 6 & 7: Acked-by: Alex Williamson Thanks, Alex > Looking forward to the feedback. > > Thanks, > Eric > > [1] https://lore.kernel.org/kvm/0-v3-57c1502c62fd+2190-ccw_mdev_jgg@nvidia.com/ > [2] https://lore.kernel.org/kvm/20220602171948.2790690-1-farman@linux.ibm.com/ > > v1->v2: > - Rebase to 6.1-rc3 > - Patch 1: > [EF] s/device_initialize/device_register/ and associated adjustments > [MR] Add WARN_ON(!private) in vfio_ccw_sch_quiesce() > [MR] Move struct vfio_ccw_parent to _private.h, instead of standalone file > - Patch 2: > [MR] Added r-b (Thank you!) > - Patch 3: > [MR] Update commit message to point to introduction of private->release_comp > [MR] Replace the remnants of vfio_ccw_alloc_private with a straight kzalloc > [MR] Added r-b (Thank you!) > - Patch 5: > [KT] Added r-b (Thank you!) > - Patch 6: > [JG] Make vfio_init_device static > [KT] Added r-b (Thank you!) > - Patch 7: > [JG, KT] Added r-b (Thank you!) > v1: https://lore.kernel.org/kvm/20221019162135.798901-1-farman@linux.ibm.com/ > > Eric Farman (7): > vfio/ccw: create a parent struct > vfio/ccw: remove private->sch > vfio/ccw: move private initialization to callback > vfio/ccw: move private to mdev lifecycle > vfio/ccw: remove release completion > vfio/ccw: replace vfio_init_device with _alloc_ > vfio: Remove vfio_free_device > > drivers/gpu/drm/i915/gvt/kvmgt.c | 1 - > drivers/s390/cio/vfio_ccw_chp.c | 5 +- > drivers/s390/cio/vfio_ccw_drv.c | 174 +++++++++++--------------- > drivers/s390/cio/vfio_ccw_fsm.c | 27 ++-- > drivers/s390/cio/vfio_ccw_ops.c | 107 +++++++++++----- > drivers/s390/cio/vfio_ccw_private.h | 37 ++++-- > drivers/s390/crypto/vfio_ap_ops.c | 6 - > drivers/vfio/fsl-mc/vfio_fsl_mc.c | 1 - > drivers/vfio/pci/vfio_pci_core.c | 1 - > drivers/vfio/platform/vfio_amba.c | 1 - > drivers/vfio/platform/vfio_platform.c | 1 - > drivers/vfio/vfio_main.c | 32 ++--- > include/linux/vfio.h | 3 - > samples/vfio-mdev/mbochs.c | 1 - > samples/vfio-mdev/mdpy.c | 1 - > samples/vfio-mdev/mtty.c | 1 - > 16 files changed, 197 insertions(+), 202 deletions(-) >