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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53821C433EF for ; Thu, 14 Oct 2021 13:50:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C817E610CC for ; Thu, 14 Oct 2021 13:50:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C817E610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0D765168A; Thu, 14 Oct 2021 15:49:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0D765168A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1634219432; bh=J+jyAvuojQSn/hJHjUTC4zRU0OQIX3Akgmrxk5clj0Y=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ug/kjXQHIxbtd6nWcAfir0P3WMwIaD/9QteR9nz3r1UwYi5KqYno/I47+iYBXob/U IKyTzGRv5QgMVM/P/GUQcSOXEK9e3ip0kMJcFXgQx2mccpatT15zddvtRWj45aK6oZ +yxIuvMjcX6c9UUaSP6Npuk6vivj6LL9oyzowgpw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C2684F8050F; Thu, 14 Oct 2021 15:47:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B28CFF80269; Wed, 13 Oct 2021 15:16:40 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 28083F80085 for ; Wed, 13 Oct 2021 15:16:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 28083F80085 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="F5uPftqW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634130995; 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: in-reply-to:in-reply-to:references:references; bh=3UweUBspHinuJSQhguEdx6WU40R4nh4wg670z3EQDCs=; b=F5uPftqWETTIRnnpUnYDz02EAbTDIL9UfcURo1cKmFjihuciKx0s8HYnpXq3SOtsI08URb jWCSWylsy3F+YVp+pZ/EndWZiqAAiSIXjNrA3VxPB98iJIjOVg17keTA/GZLAlpl8Nliww wf6MftvojYyKRwJouhIfLMXt7a/aTmk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-54-lYDb9o67Mf-rDMq57zxd3g-1; Wed, 13 Oct 2021 09:16:31 -0400 X-MC-Unique: lYDb9o67Mf-rDMq57zxd3g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41EC3100CCC0; Wed, 13 Oct 2021 13:16:24 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.33.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9599DADD0; Wed, 13 Oct 2021 13:16:20 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id DEFAB22023A; Wed, 13 Oct 2021 09:16:19 -0400 (EDT) Date: Wed, 13 Oct 2021 09:16:19 -0400 From: Vivek Goyal To: "Michael S. Tsirkin" Subject: Re: [PATCH RFC] virtio: wrap config->reset calls Message-ID: References: <20211013105226.20225-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211013105226.20225-1-mst@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vgoyal@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailman-Approved-At: Thu, 14 Oct 2021 15:47:06 +0200 Cc: Latchesar Ionkov , nvdimm@lists.linux.dev, v9fs-developer@lists.sourceforge.net, Stefan Hajnoczi , kvm@vger.kernel.org, David Hildenbrand , David Airlie , Viresh Kumar , Jason Wang , linux-remoteproc@vger.kernel.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , netdev@vger.kernel.org, Gerd Hoffmann , linux-scsi@vger.kernel.org, Will Deacon , Anton Ivanov , Jean-Philippe Brucker , Linus Walleij , Dave Jiang , Herbert Xu , linux-arm-kernel@lists.infradead.org, Miklos Szeredi , Richard Weinberger , Bartosz Golaszewski , Takashi Iwai , Gonglei , Kalle Valo , "Martin K. Petersen" , "James E.J. Bottomley" , Jakub Kicinski , Ira Weiny , virtualization@lists.linux-foundation.org, Jeff Dike , Dominique Martinet , Stefano Garzarella , Ohad Ben-Cohen , Johan Hedberg , Arnd Bergmann , Amit Shah , Eric Van Hensbergen , Marcel Holtmann , linux-um@lists.infradead.org, linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, Vishal Verma , Luiz Augusto von Dentz , Matt Mackall , Dan Williams , Cristian Marussi , Jens Axboe , Jie Deng , Mathieu Poirier , linux-gpio@vger.kernel.org, Greg Kroah-Hartman , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-bluetooth@vger.kernel.org, iommu@lists.linux-foundation.org, Anton Yakovlev , Daniel Vetter , Sudeep Holla , linux-fsdevel@vger.kernel.org, Paolo Bonzini , Johannes Berg , "Enrico Weigelt, metux IT consult" , "David S. Miller" , Joerg Roedel X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: > This will enable cleanups down the road. > The idea is to disable cbs, then add "flush_queued_cbs" callback > as a parameter, this way drivers can flush any work > queued after callbacks have been disabled. > > Signed-off-by: Michael S. Tsirkin > --- > arch/um/drivers/virt-pci.c | 2 +- > drivers/block/virtio_blk.c | 4 ++-- > drivers/bluetooth/virtio_bt.c | 2 +- > drivers/char/hw_random/virtio-rng.c | 2 +- > drivers/char/virtio_console.c | 4 ++-- > drivers/crypto/virtio/virtio_crypto_core.c | 8 ++++---- > drivers/firmware/arm_scmi/virtio.c | 2 +- > drivers/gpio/gpio-virtio.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- > drivers/i2c/busses/i2c-virtio.c | 2 +- > drivers/iommu/virtio-iommu.c | 2 +- > drivers/net/caif/caif_virtio.c | 2 +- > drivers/net/virtio_net.c | 4 ++-- > drivers/net/wireless/mac80211_hwsim.c | 2 +- > drivers/nvdimm/virtio_pmem.c | 2 +- > drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- > drivers/scsi/virtio_scsi.c | 2 +- > drivers/virtio/virtio.c | 5 +++++ > drivers/virtio/virtio_balloon.c | 2 +- > drivers/virtio/virtio_input.c | 2 +- > drivers/virtio/virtio_mem.c | 2 +- > fs/fuse/virtio_fs.c | 4 ++-- fs/fuse/virtio_fs.c changes look good to me. Reviewed-by: Vivek Goyal Vivek [..] > diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c > index 0ad89c6629d7..27c3b74070a2 100644 > --- a/fs/fuse/virtio_fs.c > +++ b/fs/fuse/virtio_fs.c > @@ -895,7 +895,7 @@ static int virtio_fs_probe(struct virtio_device *vdev) > return 0; > > out_vqs: > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > kfree(fs->vqs); > > @@ -927,7 +927,7 @@ static void virtio_fs_remove(struct virtio_device *vdev) > list_del_init(&fs->list); > virtio_fs_stop_all_queues(fs); > virtio_fs_drain_all_queues_locked(fs); > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > > vdev->priv = NULL; Thanks Vivek 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D786C4332F for ; Wed, 13 Oct 2021 13:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58606610E7 for ; Wed, 13 Oct 2021 13:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234198AbhJMNSc (ORCPT ); Wed, 13 Oct 2021 09:18:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43215 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233774AbhJMNSb (ORCPT ); Wed, 13 Oct 2021 09:18:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634130988; 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: in-reply-to:in-reply-to:references:references; bh=3UweUBspHinuJSQhguEdx6WU40R4nh4wg670z3EQDCs=; b=XNP1QDwX2f719a9ZrFnhwucrTmmJi3xG6/ZEi9kIsyI5EgoqN8WKfM1aPjoQSJIbgOQFYV pFRVUyG4/rV6koPl8MKbwi0AXmQTYeRxBCWmzjs1lY2Bl9yZ8PmUbb1llOU47KJzq7j5Ui 2AnDvE9EkAQFUkWYniyGFIldV/jAtHA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-397-51EXKiPTPNOe2wB9MiFWRQ-1; Wed, 13 Oct 2021 09:16:25 -0400 X-MC-Unique: 51EXKiPTPNOe2wB9MiFWRQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85FDA100A95A; Wed, 13 Oct 2021 13:16:22 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.33.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6603219E7E; Wed, 13 Oct 2021 13:16:20 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id DEFAB22023A; Wed, 13 Oct 2021 09:16:19 -0400 (EDT) Date: Wed, 13 Oct 2021 09:16:19 -0400 From: Vivek Goyal To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Jeff Dike , Richard Weinberger , Anton Ivanov , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Jens Axboe , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Matt Mackall , Herbert Xu , Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Gonglei , "David S. Miller" , Sudeep Holla , Cristian Marussi , "Enrico Weigelt, metux IT consult" , Viresh Kumar , Linus Walleij , Bartosz Golaszewski , David Airlie , Gerd Hoffmann , Daniel Vetter , Jie Deng , Jean-Philippe Brucker , Joerg Roedel , Will Deacon , Jakub Kicinski , Johannes Berg , Kalle Valo , Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Ohad Ben-Cohen , Bjorn Andersson , Mathieu Poirier , "James E.J. Bottomley" , "Martin K. Petersen" , David Hildenbrand , Miklos Szeredi , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Stefano Garzarella , Anton Yakovlev , Jaroslav Kysela , Takashi Iwai , linux-um@lists.infradead.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, nvdimm@lists.linux.dev, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, kvm@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH RFC] virtio: wrap config->reset calls Message-ID: References: <20211013105226.20225-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013105226.20225-1-mst@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: > This will enable cleanups down the road. > The idea is to disable cbs, then add "flush_queued_cbs" callback > as a parameter, this way drivers can flush any work > queued after callbacks have been disabled. > > Signed-off-by: Michael S. Tsirkin > --- > arch/um/drivers/virt-pci.c | 2 +- > drivers/block/virtio_blk.c | 4 ++-- > drivers/bluetooth/virtio_bt.c | 2 +- > drivers/char/hw_random/virtio-rng.c | 2 +- > drivers/char/virtio_console.c | 4 ++-- > drivers/crypto/virtio/virtio_crypto_core.c | 8 ++++---- > drivers/firmware/arm_scmi/virtio.c | 2 +- > drivers/gpio/gpio-virtio.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- > drivers/i2c/busses/i2c-virtio.c | 2 +- > drivers/iommu/virtio-iommu.c | 2 +- > drivers/net/caif/caif_virtio.c | 2 +- > drivers/net/virtio_net.c | 4 ++-- > drivers/net/wireless/mac80211_hwsim.c | 2 +- > drivers/nvdimm/virtio_pmem.c | 2 +- > drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- > drivers/scsi/virtio_scsi.c | 2 +- > drivers/virtio/virtio.c | 5 +++++ > drivers/virtio/virtio_balloon.c | 2 +- > drivers/virtio/virtio_input.c | 2 +- > drivers/virtio/virtio_mem.c | 2 +- > fs/fuse/virtio_fs.c | 4 ++-- fs/fuse/virtio_fs.c changes look good to me. Reviewed-by: Vivek Goyal Vivek [..] > diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c > index 0ad89c6629d7..27c3b74070a2 100644 > --- a/fs/fuse/virtio_fs.c > +++ b/fs/fuse/virtio_fs.c > @@ -895,7 +895,7 @@ static int virtio_fs_probe(struct virtio_device *vdev) > return 0; > > out_vqs: > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > kfree(fs->vqs); > > @@ -927,7 +927,7 @@ static void virtio_fs_remove(struct virtio_device *vdev) > list_del_init(&fs->list); > virtio_fs_stop_all_queues(fs); > virtio_fs_drain_all_queues_locked(fs); > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > > vdev->priv = NULL; Thanks Vivek 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D73AC43217 for ; Wed, 13 Oct 2021 13:16:38 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E32B61130 for ; Wed, 13 Oct 2021 13:16:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1E32B61130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CC689826F5; Wed, 13 Oct 2021 13:16:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fk4uS9aWB4NJ; Wed, 13 Oct 2021 13:16:37 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id A5AE182611; Wed, 13 Oct 2021 13:16:36 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6D500C0011; Wed, 13 Oct 2021 13:16:36 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3E544C000D for ; Wed, 13 Oct 2021 13:16:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 12A2A40657 for ; Wed, 13 Oct 2021 13:16:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CNZkXumsfd9U for ; Wed, 13 Oct 2021 13:16:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4741640456 for ; Wed, 13 Oct 2021 13:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634130993; 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: in-reply-to:in-reply-to:references:references; bh=3UweUBspHinuJSQhguEdx6WU40R4nh4wg670z3EQDCs=; b=N9DOpLi6ciGUwBrxKQ9ffOhc5mGMwOI3tkVi5n7Wnt101pu2mf6nRDse+lTnviWvJ77Gtm BUkSyFQdDSFqg6EKfj+ifNOS4dVdzHFtQJNBN2kv/ZipH9hhhvNvJTcYyXsAyHLhwLnd2u 0BwmIpNaoMZu6+GATu1hON/hRB1f9CA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-54-lYDb9o67Mf-rDMq57zxd3g-1; Wed, 13 Oct 2021 09:16:31 -0400 X-MC-Unique: lYDb9o67Mf-rDMq57zxd3g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41EC3100CCC0; Wed, 13 Oct 2021 13:16:24 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.33.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9599DADD0; Wed, 13 Oct 2021 13:16:20 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id DEFAB22023A; Wed, 13 Oct 2021 09:16:19 -0400 (EDT) Date: Wed, 13 Oct 2021 09:16:19 -0400 From: Vivek Goyal To: "Michael S. Tsirkin" Subject: Re: [PATCH RFC] virtio: wrap config->reset calls Message-ID: References: <20211013105226.20225-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211013105226.20225-1-mst@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vgoyal@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: Latchesar Ionkov , nvdimm@lists.linux.dev, v9fs-developer@lists.sourceforge.net, Stefan Hajnoczi , kvm@vger.kernel.org, David Hildenbrand , David Airlie , Viresh Kumar , Jason Wang , linux-remoteproc@vger.kernel.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, netdev@vger.kernel.org, Gerd Hoffmann , linux-scsi@vger.kernel.org, Will Deacon , Anton Ivanov , Jean-Philippe Brucker , Linus Walleij , Dave Jiang , Herbert Xu , linux-arm-kernel@lists.infradead.org, Miklos Szeredi , Richard Weinberger , Bartosz Golaszewski , Takashi Iwai , Gonglei , Kalle Valo , "Martin K. Petersen" , "James E.J. Bottomley" , Jakub Kicinski , Ira Weiny , virtualization@lists.linux-foundation.org, Jeff Dike , Dominique Martinet , Stefano Garzarella , Ohad Ben-Cohen , Johan Hedberg , Arnd Bergmann , Amit Shah , Eric Van Hensbergen , Marcel Holtmann , linux-um@lists.infradead.org, linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, Vishal Verma , Luiz Augusto von Dentz , Matt Mackall , Dan Williams , Jaroslav Kysela , Cristian Marussi , Jens Axboe , Jie Deng , Mathieu Poirier , linux-gpio@vger.kernel.org, Greg Kroah-Hartman , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-bluetooth@vger.kernel.org, iommu@lists.linux-foundation.org, Anton Yakovlev , Daniel Vetter , Sudeep Holla , linux-fsdevel@vger.kernel.org, Paolo Bonzini , Johannes Berg , "Enrico Weigelt, metux IT consult" , "David S. Miller" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: > This will enable cleanups down the road. > The idea is to disable cbs, then add "flush_queued_cbs" callback > as a parameter, this way drivers can flush any work > queued after callbacks have been disabled. > > Signed-off-by: Michael S. Tsirkin > --- > arch/um/drivers/virt-pci.c | 2 +- > drivers/block/virtio_blk.c | 4 ++-- > drivers/bluetooth/virtio_bt.c | 2 +- > drivers/char/hw_random/virtio-rng.c | 2 +- > drivers/char/virtio_console.c | 4 ++-- > drivers/crypto/virtio/virtio_crypto_core.c | 8 ++++---- > drivers/firmware/arm_scmi/virtio.c | 2 +- > drivers/gpio/gpio-virtio.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- > drivers/i2c/busses/i2c-virtio.c | 2 +- > drivers/iommu/virtio-iommu.c | 2 +- > drivers/net/caif/caif_virtio.c | 2 +- > drivers/net/virtio_net.c | 4 ++-- > drivers/net/wireless/mac80211_hwsim.c | 2 +- > drivers/nvdimm/virtio_pmem.c | 2 +- > drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- > drivers/scsi/virtio_scsi.c | 2 +- > drivers/virtio/virtio.c | 5 +++++ > drivers/virtio/virtio_balloon.c | 2 +- > drivers/virtio/virtio_input.c | 2 +- > drivers/virtio/virtio_mem.c | 2 +- > fs/fuse/virtio_fs.c | 4 ++-- fs/fuse/virtio_fs.c changes look good to me. Reviewed-by: Vivek Goyal Vivek [..] > diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c > index 0ad89c6629d7..27c3b74070a2 100644 > --- a/fs/fuse/virtio_fs.c > +++ b/fs/fuse/virtio_fs.c > @@ -895,7 +895,7 @@ static int virtio_fs_probe(struct virtio_device *vdev) > return 0; > > out_vqs: > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > kfree(fs->vqs); > > @@ -927,7 +927,7 @@ static void virtio_fs_remove(struct virtio_device *vdev) > list_del_init(&fs->list); > virtio_fs_stop_all_queues(fs); > virtio_fs_drain_all_queues_locked(fs); > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > > vdev->priv = NULL; Thanks Vivek _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0BB1C4321E for ; Wed, 13 Oct 2021 13:16:39 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B71D610FC for ; Wed, 13 Oct 2021 13:16:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8B71D610FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4E69F607C6; Wed, 13 Oct 2021 13:16:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 65TcG_uox3FZ; Wed, 13 Oct 2021 13:16:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id E2D12607E5; Wed, 13 Oct 2021 13:16:37 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B5B4BC0011; Wed, 13 Oct 2021 13:16:37 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3E6F0C000D for ; Wed, 13 Oct 2021 13:16:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2C77740456 for ; Wed, 13 Oct 2021 13:16:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WmGve1E4-Prv for ; Wed, 13 Oct 2021 13:16:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 473CA40363 for ; Wed, 13 Oct 2021 13:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634130993; 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: in-reply-to:in-reply-to:references:references; bh=3UweUBspHinuJSQhguEdx6WU40R4nh4wg670z3EQDCs=; b=N9DOpLi6ciGUwBrxKQ9ffOhc5mGMwOI3tkVi5n7Wnt101pu2mf6nRDse+lTnviWvJ77Gtm BUkSyFQdDSFqg6EKfj+ifNOS4dVdzHFtQJNBN2kv/ZipH9hhhvNvJTcYyXsAyHLhwLnd2u 0BwmIpNaoMZu6+GATu1hON/hRB1f9CA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-54-lYDb9o67Mf-rDMq57zxd3g-1; Wed, 13 Oct 2021 09:16:31 -0400 X-MC-Unique: lYDb9o67Mf-rDMq57zxd3g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41EC3100CCC0; Wed, 13 Oct 2021 13:16:24 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.33.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9599DADD0; Wed, 13 Oct 2021 13:16:20 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id DEFAB22023A; Wed, 13 Oct 2021 09:16:19 -0400 (EDT) Date: Wed, 13 Oct 2021 09:16:19 -0400 From: Vivek Goyal To: "Michael S. Tsirkin" Subject: Re: [PATCH RFC] virtio: wrap config->reset calls Message-ID: References: <20211013105226.20225-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211013105226.20225-1-mst@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vgoyal@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: nvdimm@lists.linux.dev, v9fs-developer@lists.sourceforge.net, Stefan Hajnoczi , kvm@vger.kernel.org, David Airlie , Viresh Kumar , linux-remoteproc@vger.kernel.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , netdev@vger.kernel.org, linux-scsi@vger.kernel.org, Will Deacon , Anton Ivanov , Jean-Philippe Brucker , Linus Walleij , Dave Jiang , Herbert Xu , linux-arm-kernel@lists.infradead.org, Miklos Szeredi , Richard Weinberger , Bartosz Golaszewski , Takashi Iwai , Kalle Valo , "Martin K. Petersen" , "James E.J. Bottomley" , Jakub Kicinski , Ira Weiny , virtualization@lists.linux-foundation.org, Jeff Dike , Ohad Ben-Cohen , Johan Hedberg , Arnd Bergmann , Amit Shah , Eric Van Hensbergen , Marcel Holtmann , linux-um@lists.infradead.org, linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, Vishal Verma , Luiz Augusto von Dentz , Matt Mackall , Dan Williams , Jaroslav Kysela , Cristian Marussi , Jens Axboe , Mathieu Poirier , linux-gpio@vger.kernel.org, Greg Kroah-Hartman , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-bluetooth@vger.kernel.org, iommu@lists.linux-foundation.org, Daniel Vetter , Sudeep Holla , linux-fsdevel@vger.kernel.org, Paolo Bonzini , Johannes Berg , "Enrico Weigelt, metux IT consult" , "David S. Miller" , Joerg Roedel X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: > This will enable cleanups down the road. > The idea is to disable cbs, then add "flush_queued_cbs" callback > as a parameter, this way drivers can flush any work > queued after callbacks have been disabled. > > Signed-off-by: Michael S. Tsirkin > --- > arch/um/drivers/virt-pci.c | 2 +- > drivers/block/virtio_blk.c | 4 ++-- > drivers/bluetooth/virtio_bt.c | 2 +- > drivers/char/hw_random/virtio-rng.c | 2 +- > drivers/char/virtio_console.c | 4 ++-- > drivers/crypto/virtio/virtio_crypto_core.c | 8 ++++---- > drivers/firmware/arm_scmi/virtio.c | 2 +- > drivers/gpio/gpio-virtio.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- > drivers/i2c/busses/i2c-virtio.c | 2 +- > drivers/iommu/virtio-iommu.c | 2 +- > drivers/net/caif/caif_virtio.c | 2 +- > drivers/net/virtio_net.c | 4 ++-- > drivers/net/wireless/mac80211_hwsim.c | 2 +- > drivers/nvdimm/virtio_pmem.c | 2 +- > drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- > drivers/scsi/virtio_scsi.c | 2 +- > drivers/virtio/virtio.c | 5 +++++ > drivers/virtio/virtio_balloon.c | 2 +- > drivers/virtio/virtio_input.c | 2 +- > drivers/virtio/virtio_mem.c | 2 +- > fs/fuse/virtio_fs.c | 4 ++-- fs/fuse/virtio_fs.c changes look good to me. Reviewed-by: Vivek Goyal Vivek [..] > diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c > index 0ad89c6629d7..27c3b74070a2 100644 > --- a/fs/fuse/virtio_fs.c > +++ b/fs/fuse/virtio_fs.c > @@ -895,7 +895,7 @@ static int virtio_fs_probe(struct virtio_device *vdev) > return 0; > > out_vqs: > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > kfree(fs->vqs); > > @@ -927,7 +927,7 @@ static void virtio_fs_remove(struct virtio_device *vdev) > list_del_init(&fs->list); > virtio_fs_stop_all_queues(fs); > virtio_fs_drain_all_queues_locked(fs); > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > > vdev->priv = NULL; Thanks Vivek _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization