Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3582027pxb; Wed, 13 Oct 2021 08:48:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv2hl9CmSiJv0i6uRY8gi6td1vrZzsdBCUdsRqqZPFDYovOg2ysljYgmJKSOc5qJ4g8doO X-Received: by 2002:a50:cfc2:: with SMTP id i2mr226803edk.72.1634140089363; Wed, 13 Oct 2021 08:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634140089; cv=none; d=google.com; s=arc-20160816; b=LU/T/KTVYDdiN7mKOJm0F6Z6I5ameJe/ZN7ES/xqXkAw+DHNstgrgqcBfIgwygGRWw +5sxjIjzCnAB5HSewoSurFvA0DncX6eUCeVGzVhzT+cQoiAH5L0A/DC9drPDrBxIz1Qh ykCNFlpzz7oISFafl3vjBSmFoNDpNVXIEmWPYa6vBMy4YQ9mPgJmYd3ou2xtwIfeL4L0 b8YKRoU2wCNnAoE+bXnz1dJcYx5IMmqXSGsOQJpUHtGvGvlqvr7dynwIQhLmyCW0diDI CvVLSrbi5/3CJB3e0oZY7RoVttZ46UPsrzjH0cSc7dqHLyTF9Z6oF4/7PL01X0/4/AME c4sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5P0ocxXM0vPODGkh8na4Mfy39/EYyFv4GMRrvhNNOUo=; b=ZCaxz5Gsa7xqxhyzb8GwhLmp/ws7M5jNjuZBSypDn84YJla+t+mgUt6RZCbf/HnHt5 73dLS8LHTWreVPGyHb76f0Xqj5O6Th1r8FU0uZ8qnBHafeNQs9DKK+eCIgtSR0MvI4Tr uqWdXfWZhtcdDAUU2sdX0SAQXcztsbh3P0mOmqXU4QV47iM9GfN8gyJKmrQZAx4yLqfG qp20xuujyp27n0QWCS1THSuCtc6N0OAQ/LpWc8G/nQDBl+YCCbXZa7CZwd0Cp8rnqcc0 SXw7LKjnK70CEuzirWOLdi98Od9JKSq0Cpx9Didmv4jn54x2OawYMP3Q9Lttfc0byJLJ FOmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gfAizaxT; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs9si14421840ejc.109.2021.10.13.08.47.41; Wed, 13 Oct 2021 08:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gfAizaxT; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234675AbhJMPtN (ORCPT + 99 others); Wed, 13 Oct 2021 11:49:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234388AbhJMPsO (ORCPT ); Wed, 13 Oct 2021 11:48:14 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEFADC061764 for ; Wed, 13 Oct 2021 08:46:10 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id g184so2710326pgc.6 for ; Wed, 13 Oct 2021 08:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5P0ocxXM0vPODGkh8na4Mfy39/EYyFv4GMRrvhNNOUo=; b=gfAizaxTiwRe31oPHuSEfCuoU3UyNzjvSGFjRtR0+20ybGnOJHR2SNvIUYXuMY2xpD gjbOwicFvptk+HxbA9gztDS/NFb/B9PCmms4ywTb+W6ZfybGlSGnqIF9BrEyW3lnzugF 1xOsRizGgXSxqW3rE2o7H3pOyE6LnVUrXJS6JM8CS2LKu70yomZ+jIXvV9GC/9hEoAdh pZgLdZj46NdkkNldf1y6Zal4VF0OHZO5HByoWBC8S5+MsG5/UJx0h6V+EfRdjNyAV2md QHEhpyLmWUQN/xdLKYedMbdiT11toyum2MbaAnr8R6GfEwVc/Pi4akUF4ElQql0esd+K tzhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5P0ocxXM0vPODGkh8na4Mfy39/EYyFv4GMRrvhNNOUo=; b=Zc59cClUvJMW1UhUZhXc2URM3km183OOGJozrKcaPndGwTWqMJqhg0xyMDrFXYlO2O QoXgauJ3HzCBmO0D8Mf8TqRjWjqreydPe7j1xOidDTO1RwN/uMt/PraqvsgNcA0FaGl9 OOn1ivGA9l7G++ybwHxzUXprz8SB5oo1DcORVOJSbVdTLAFVSmt7shLyWK3S3Bu9kBcC WFAOPvPEdbzL2yBFf0yvoJ/HCUJ1rTQKS9IuKIlTG/9nJts5bRVDaT+6lNFVjmDJXKkg zek4pxQBBAOon4VHOB36I1a5qYEec4HfCwIliCvrG83WJu4PdAr6F+5bas31N0mzkGUl m6qg== X-Gm-Message-State: AOAM531HlA9YsmniAFbtpijP94O3JhoQY+gzXA9HaM0xwe5d/4fZMVMm bg/uS0GCMHCkwLtqanSqEUjOXQ== X-Received: by 2002:aa7:949c:0:b0:44c:a0df:2c7f with SMTP id z28-20020aa7949c000000b0044ca0df2c7fmr128668pfk.34.1634139970091; Wed, 13 Oct 2021 08:46:10 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id x27sm2452841pfo.90.2021.10.13.08.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 08:46:09 -0700 (PDT) Date: Wed, 13 Oct 2021 09:46:04 -0600 From: Mathieu Poirier 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 , "James E.J. Bottomley" , "Martin K. Petersen" , David Hildenbrand , Vivek Goyal , 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: <20211013154604.GB4135908@p14s> 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> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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 ++-- > include/linux/virtio.h | 1 + > net/9p/trans_virtio.c | 2 +- > net/vmw_vsock/virtio_transport.c | 4 ++-- > sound/virtio/virtio_card.c | 4 ++-- > 26 files changed, 39 insertions(+), 33 deletions(-) > > static struct virtio_driver virtio_pmem_driver = { > diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c > index 8e49a3bacfc7..6a11952822df 100644 > --- a/drivers/rpmsg/virtio_rpmsg_bus.c > +++ b/drivers/rpmsg/virtio_rpmsg_bus.c > @@ -1015,7 +1015,7 @@ static void rpmsg_remove(struct virtio_device *vdev) > size_t total_buf_space = vrp->num_bufs * vrp->buf_size; > int ret; > > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > Reviewed-by: Mathieu Poirier > ret = device_for_each_child(&vdev->dev, NULL, rpmsg_remove_device); > if (ret)