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