Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp739937pxf; Thu, 18 Mar 2021 10:24:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP0jwD7ahGpmghNDOjJidoa709QhAsbVNro9QOyGI0b7Iaxj3Ol8OHGv97L8+bYK/pRd8i X-Received: by 2002:a05:6402:447:: with SMTP id p7mr5008882edw.89.1616088267234; Thu, 18 Mar 2021 10:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616088267; cv=none; d=google.com; s=arc-20160816; b=S7VrYil71yZXLXCI+bDp1aTO5KQoq+5wk4fK9wSlzZkKmFdsp6ljgc3Yshpwpfc1WP szVLalzRLM1QibIaR1hZ6bRymOJdXYhVEh1/b+PnnY975/D83oPY3TOta5/oyoU+/tuj n5O92HjIiwjhUPFpKwF01DLWh+VTvIC7XRAp+WmfPuOHv4gS9UBKm4TZHjK8XzE5PgkT OhQqpTaYOM2gFLH7fpPlcanBHmgNhgovtd4MBUHlvzk5+h4E8V1VuMETXBaeR+jIK0K8 4Nh1JnXgrEYMSnFEn5aG4lNEqHX6AiyBFTrfQEr8GmAQBMoHgAC2vc4DxkGiWWeOPLNy IJeA== 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=I/Ukqyc10gPKDP+jMvmBav0f1pnTsjwOF6/up4ijebQ=; b=06cnoH74oFqSjQB342JzI6fuKyctXv+KtaB7vIamWERGAx47nlDWFFES4ChSMKbHXO X9P6xpsJVMu6j1nz5HzTexWclY1wCmQrEgR2OmjF8Awkb7i5odvEoss1Em4mlT7drszV paPMXaSvbyKySuNx+RaHe0l5UmGUOwyiw5nNFMqqgvWNTXPSfXyEuX6ARm0SjH/9UpSm 8GplNSlFxNnpJqgpTw7KBadw3GVlasBEfckFo5OZSZMGpatI4E3k5TJ8Gm/61Sg2/p9/ ipbhr9TXjRWdW64d1Yk54adVE94X+o4F87TuT3hqGw1FvwuPaJKeI3p7FJkMkynPshhg 7vPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JZquC8xK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si2202274eja.84.2021.03.18.10.24.04; Thu, 18 Mar 2021 10:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=JZquC8xK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbhCRRWw (ORCPT + 99 others); Thu, 18 Mar 2021 13:22:52 -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-kernel@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 >