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 54567C433FE for ; Wed, 13 Oct 2021 16:00:17 +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 1135F61168 for ; Wed, 13 Oct 2021 16:00:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1135F61168 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 C5FF783083; Wed, 13 Oct 2021 16:00:16 +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 8BeVBjHdZB2c; Wed, 13 Oct 2021 16:00:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 98CCE83054; Wed, 13 Oct 2021 16:00:15 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 40A58C0023; Wed, 13 Oct 2021 16:00:15 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4AFB3C000D for ; Wed, 13 Oct 2021 16:00:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3608040523 for ; Wed, 13 Oct 2021 16:00:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vcTDorNszsRS for ; Wed, 13 Oct 2021 16:00:10 +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 smtp2.osuosl.org (Postfix) with ESMTPS id 30BA54017B for ; Wed, 13 Oct 2021 16:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634140809; 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=QCm5dOclxo0psHU4qKEkJZZeOXU3321uNZD2ahb33xs=; b=TSnfm/NFpixEq2BSEec+1ixF+owpefULtZk+nZutl+V5VzxBg7QEwGwuVA2nIF4+5fvaDG hX6mTiNHmSKRgt/MeyzkcoMvyalA3jeut0Mh4k8zQmAerwzRa6iHKWgCOVOpvZzUM2hJ8e /99JhCDCjBf27wle7skJU7PfkqxjBII= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-100-oLIslyeaNV-7N2y4Q6ArSA-1; Wed, 13 Oct 2021 12:00:07 -0400 X-MC-Unique: oLIslyeaNV-7N2y4Q6ArSA-1 Received: by mail-wr1-f72.google.com with SMTP id v15-20020adfa1cf000000b00160940b17a2so2329468wrv.19 for ; Wed, 13 Oct 2021 09:00:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=QCm5dOclxo0psHU4qKEkJZZeOXU3321uNZD2ahb33xs=; b=C756P26HxnldKVjEtarpRc/behh6VDWiuYWu+gPEBGZjxR4hOpVwdLHavT4RG6NzJ1 3Jp4ajOpUN2JpTVDgNeTtXbsPZ8e6MhkRlxa/m+HFBpZtez/j0U66YgW0Tt4Xx59S16h PawGA9nHayENuxYu9ComyiwKUFFh6BztBS7BNzBqVZf0SE6OyieWDQdFb+h8JEQtXtu/ qCv3HLDA/8ucdeW8JEp4qCFIqEhvrJUrMSEKstRf8RLiMkeXPdy01Rg63lSJLvxaSluG UB+BlRe7JkFSJlrH+reKDRjKZGYwW6jkjsP+NOBInnS1jZGx8dZIJZbrdTcTgolxfSWy Hljw== X-Gm-Message-State: AOAM530LgMH/iTbdmWjbr8SpZsBbAKxGi/G+xOCrx1LWvAP+GfX1EEdz Q0f8SDQtl+ocdBJlWZI6+hMSnDLZUUoKscbKNH/R9G4ZTEsqLxZCwHUKZQEK2ycLinwZcAIPsGu 8NFipdaSGU9NaugZ5/3LtV6K/snHuBg== X-Received: by 2002:adf:dc0d:: with SMTP id t13mr9651wri.158.1634140805530; Wed, 13 Oct 2021 09:00:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyItkbAA3kGIqmmHgTgrrpf9fCG54WlJV2+wdefB9WU28Q546eZydpGXWHl2Ou3h6lUqYc/hA== X-Received: by 2002:adf:dc0d:: with SMTP id t13mr9603wri.158.1634140805309; Wed, 13 Oct 2021 09:00:05 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6774.dip0.t-ipconnect.de. [91.12.103.116]) by smtp.gmail.com with ESMTPSA id n17sm6521wrq.11.2021.10.13.09.00.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Oct 2021 09:00:04 -0700 (PDT) Message-ID: Date: Wed, 13 Oct 2021 18:00:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH RFC] virtio: wrap config->reset calls To: "Michael S. Tsirkin" References: <20211013105226.20225-1-mst@redhat.com> <2060bd96-5884-a1b5-9f29-7fe670dc088d@redhat.com> <20211013081632-mutt-send-email-mst@kernel.org> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20211013081632-mutt-send-email-mst@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: Latchesar Ionkov , nvdimm@lists.linux.dev, v9fs-developer@lists.sourceforge.net, Stefan Hajnoczi , kvm@vger.kernel.org, Dominique Martinet , 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 , Vivek Goyal , 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 13.10.21 14:17, Michael S. Tsirkin wrote: > On Wed, Oct 13, 2021 at 01:03:46PM +0200, David Hildenbrand wrote: >> On 13.10.21 12:55, 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(-) >>> >>> diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c >>> index c08066633023..22c4d87c9c15 100644 >>> --- a/arch/um/drivers/virt-pci.c >>> +++ b/arch/um/drivers/virt-pci.c >>> @@ -616,7 +616,7 @@ static void um_pci_virtio_remove(struct virtio_device *vdev) >>> int i; >>> /* Stop all virtqueues */ >>> - vdev->config->reset(vdev); >>> + virtio_reset_device(vdev); >>> vdev->config->del_vqs(vdev); >> >> Nit: virtio_device_reset()? >> >> Because I see: >> >> int virtio_device_freeze(struct virtio_device *dev); >> int virtio_device_restore(struct virtio_device *dev); >> void virtio_device_ready(struct virtio_device *dev) >> >> But well, there is: >> void virtio_break_device(struct virtio_device *dev); > > Exactly. I don't know what's best, so I opted for plain english :) Fair enough, LGTM Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu