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=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 AA936C433E0 for ; Thu, 18 Mar 2021 17:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EDAE64F38 for ; Thu, 18 Mar 2021 17:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbhCRRWv (ORCPT ); Thu, 18 Mar 2021 13:22:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:44634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbhCRRWW (ORCPT ); Thu, 18 Mar 2021 13:22:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A821D64E37; Thu, 18 Mar 2021 17:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616088142; bh=dc75pwbsctWQPsOF4qhXgHwdNZ7A2PS9JI4jzCZQtD8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JZquC8xKhoSzFRHEFApwcMDGqaxFIaw1hdX8EMc6uJcHjXZz7Bvai5zy5e/xpSEV+ 9x+OWs1JUskfQZ+s0rAit/FFHL3zuzREq4oKeFq4qIUaTBfzGJRtzZ4md5oCjA+nxe t3lV5Kz9peMkKTeQZeXyxeXls3WFApHPH3T7nqFmfpkfx0YQHXYM1cBMCn/GaLK0V2 0b9fNDz0Ck/GrLwPBIjrWPr7RDW+2Cw1XFOOitESs0PRhNfgz62wxwdpF1pix/5PkC PSJ6PIDL6J2V9jYUVHDcGqQQXObkEXSe3mKFURT0a9iHgCwoJ36co6UuYqscCeG8nA 1QfpjO0Z06xkw== Date: Thu, 18 Mar 2021 19:22:18 +0200 From: Leon Romanovsky To: Alex Williamson Cc: Amey Narkhede , raphael.norwitz@nutanix.com, linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org, alay.shah@nutanix.com, suresh.gumpula@nutanix.com, shyam.rajendran@nutanix.com, felipe@nutanix.com Subject: Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism Message-ID: References: <20210317102447.73no7mhox75xetlf@archlinux> <20210317112309.nborigwfd26px2mj@archlinux> <20210317131718.3uz7zxnvoofpunng@archlinux> <20210317113140.3de56d6c@omen.home.shazbot.org> <20210318103935.2ec32302@omen.home.shazbot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210318103935.2ec32302@omen.home.shazbot.org> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, Mar 18, 2021 at 10:39:35AM -0600, Alex Williamson wrote: > On Thu, 18 Mar 2021 11:09:34 +0200 > Leon Romanovsky wrote: <...> > > I'm lost here, does vfio-pci use sysfs interface or internal to the kernel API? > > > > If it is latter then we don't really need sysfs, if not, we still need > > some sort of DB to create second policy, because "supported != working". > > What am I missing? > > vfio-pci uses the internal kernel API, ie. the variants of > pci_reset_function(), which is the same interface used by the existing > sysfs reset mechanism. This proposed configuration of the reset method > would affect any driver using that same core infrastructure and from my > perspective that's really the goal. In the case where a supported > reset mechanism fails for a device, continuing to quirk those out for > the best default behavior makes sense, I'd be disappointed for a vendor > to not pursue improving the default behavior where it clearly makes > sense. However, there's also a policy decision, the kernel imposes a > preferential ordering of reset mechanism. Is that ordering the best > case for all users? I've presented above a case where a userspace may > prefer a policy of preferring a bus reset to a PM reset. So I think > the question is not only are there supported mechanisms that don't > work, where this interface allows userspace to more readily identify > and work around those sorts of issues, but it also enables user > preference and easier evaluation whether all of the supported reset > mechanisms work rather than just the first one we encounter in the > ordering we've decided to impose today. Thanks, Alex, Which email client do you use? Your responses are grouped as one huge block without any chance to respond to you on specific point or answer to your question. I see your flow and understand your position, but will repeat my position. We need to make sure that vendors will have incentive to supply quirks. And regarding vendors, see Amey response below about his touchpad troubles. The cheap electronics vendors don't care about their users. Thanks > > Alex >