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 X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17524C4338F for ; Tue, 3 Aug 2021 16:52:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D4DBF60ED6 for ; Tue, 3 Aug 2021 16:52:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D4DBF60ED6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 719E76E85B; Tue, 3 Aug 2021 16:52:32 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 527446E89A for ; Tue, 3 Aug 2021 16:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009550; 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=sKtEVRvHNGT42iZNHToUtsFsYwSj6OAOl6LkhSWUXzQ=; b=HLV1Uxh/gQiv/X+OpQ5B69XeaYIxGDambTtmAWr5ZJH2dj7N4Z4L/z7Yj1gnzZXn3i9R2B lG9R4VggXRkMLPa9N8Q+o0v1TrFDrBkrrRBzYDyC9aUjDb8L1xpFEdVO8QbrLGotDuWGEm O4cGC8S+awZQszOe82cNu04N+KI6Jbw= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-439-b2GrTRhmPi-71Rh8qiW5bg-1; Tue, 03 Aug 2021 12:52:28 -0400 X-MC-Unique: b2GrTRhmPi-71Rh8qiW5bg-1 Received: by mail-ot1-f69.google.com with SMTP id t19-20020a0568302253b02904f072d1eb71so1256159otd.12 for ; Tue, 03 Aug 2021 09:52:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sKtEVRvHNGT42iZNHToUtsFsYwSj6OAOl6LkhSWUXzQ=; b=MHgG3K3wGMtPGinYNZHP7x2i6g4IVf1wwtafb/11vlMU7ULAqBStD/CKjporb7/v9D D9xFO3seB488CoTMn+a0I0CiBco3nNspa1lifvL8GXdI4E37vO5RfkLRSJpqM7olWxD9 41v+IqxKyEQFkeZCB4d2g8OxT31s1fCvkrphmsxw6rZXrtR8O5FEs18hExGYOmuBrrMZ SGG3zFUwDxziGfZuNLXw97K17MPnY9QVAjeMG3IrlcPiH8kjzpk02GI7FhaevOYj29BR 0ixBeKNlgBAtipxPSIX+jVsnFQfYz37uqD8rUgcDRVKoJ20WEkIDSgU97qjO93IVTsMe XBFw== X-Gm-Message-State: AOAM5308d4SPx8brT9+Q2diS3Ih15/mLHRjUCh4KjPHrTgmRkoiBvJc5 V8phDqOtLlC9k/MEiXwlg8TXCuwE227EUfTGRDn0SiSUN4Lu3j6+rTqORaMG4fVeaNOzjiJdR+O t/v7YKNc43u+57n+Pb9GbF3VxLLGk X-Received: by 2002:a9d:62d4:: with SMTP id z20mr16205599otk.305.1628009548258; Tue, 03 Aug 2021 09:52:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvKOEKD8L0w37wO357XcF+/U3bT3CXb+wzZAe9sXlApc1eVkv2cU2JtkoR7Kvj984JI4QXhg== X-Received: by 2002:a9d:62d4:: with SMTP id z20mr16205581otk.305.1628009548040; Tue, 03 Aug 2021 09:52:28 -0700 (PDT) Received: from redhat.com ([198.99.80.109]) by smtp.gmail.com with ESMTPSA id bd20sm2365330oib.1.2021.08.03.09.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 09:52:27 -0700 (PDT) Date: Tue, 3 Aug 2021 10:52:25 -0600 From: Alex Williamson To: Jason Gunthorpe Cc: David Airlie , Tony Krowiak , Christian Borntraeger , Cornelia Huck , Jonathan Corbet , Daniel Vetter , Diana Craciun , dri-devel@lists.freedesktop.org, Eric Auger , Eric Farman , Harald Freudenberger , Vasily Gorbik , Heiko Carstens , intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, Jani Nikula , Jason Herne , Joonas Lahtinen , kvm@vger.kernel.org, Kirti Wankhede , linux-doc@vger.kernel.org, linux-s390@vger.kernel.org, Matthew Rosato , Peter Oberparleiter , Halil Pasic , Rodrigo Vivi , Vineeth Vijayan , Zhi Wang , "Raj, Ashok" , Christoph Hellwig , Leon Romanovsky , Max Gurtovoy , Yishai Hadas , Zhenyu Wang Message-ID: <20210803105225.2ee7dac2.alex.williamson@redhat.com> In-Reply-To: <20210803164152.GC1721383@nvidia.com> References: <0-v3-6c9e19cc7d44+15613-vfio_reflck_jgg@nvidia.com> <9-v3-6c9e19cc7d44+15613-vfio_reflck_jgg@nvidia.com> <20210803103406.5e1be269.alex.williamson@redhat.com> <20210803164152.GC1721383@nvidia.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=alex.williamson@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Intel-gfx] [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 3 Aug 2021 13:41:52 -0300 Jason Gunthorpe wrote: > On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrote: > > I think the vfio_pci_find_reset_target() function needs to be re-worked > > to just tell us true/false that it's ok to reset the provided device, > > not to anoint an arbitrary target device. Thanks, > > Yes, though this logic is confusing, why do we need to check if any > device needs a reset at this point? If we are being asked to reset > vdev shouldn't vdev needs_reset? > > Or is the function more of a 'synchronize pending reset' kind of > thing? Yes, the latter. For instance think about a multi-function PCI device such as a GPU. The functions have dramatically different capabilities, some might have function level reset abilities and others not. We want to be able to trigger a bus reset as the last device of the set is released, no matter the order they're released and no matter the capabilities of the device we're currently processing. Thanks, Alex