Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp754085pxf; Thu, 18 Mar 2021 10:43:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRFJsv7I0V8iZkfSBEKyZsWnE11pUC1s7PvhZzIPAWPq0Re72EVnPgZFG+5iRceptobPGn X-Received: by 2002:a17:907:7249:: with SMTP id ds9mr43000454ejc.9.1616089391318; Thu, 18 Mar 2021 10:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616089391; cv=none; d=google.com; s=arc-20160816; b=1Lh+Z3YJ0GvTPd2RBKi08j889bMhvJ5M4B91YyCWtIOonWN1vdQ6Hv6XwbsKvv13hZ OWGX/DSXeyT/Sc99bFd0S2EMFdB3mh3Wm+GEjx1oYeG8CEZ62N6mG0KW2FQBVE+XZ75m x/Ypuyqp2c/ofoBWjI11emQTDGb8ucizKdOMxkHSq0pziQES0iTOiRjEjkiesgweEbX2 8j2MWIVaR4ZPbX2Se3qf48gouxrz6oeTi/BgGf7yGLk6qramP9XYZYQGK4AmngwOx255 t33nG0HrVGKgVEqjm9qVs0NCLikMIPDG25iq8jC9Xm3pF38XIiB99UQmmksmvuq/+id7 0gGQ== 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=IhkVeMNa3z3bkyHG/n5Yqbdya8Y6YodntxafL1/t7os=; b=mpefQD3nbsn+K9hrIjNncmXDvc4DcRKfgnBkDWb/aInAMJz36zPaMDfakdsQU9Ulq6 AVhFCRGZ9/kYy3StjcptKGw/uQHiMCmpUooockgWKmTcHyxiTRPyWFMUeJxC/AmoGDFK FqLgOa59HUrUAc13D1jhr6kf+SpP/x+7aPre/6gQls6AIz6AuHCz0EJmk9FpgG2P2aSq ia2QYmXcr/06GAcHDcy+6cLRBvDWWqnZdLF2OmXuFRvJ8u4gn4n3IXgPqJN6Gzg9omVg 0iXPNJv/ycQEsITSxW071QXYxQ3aepbss8lQFqUqxug5NNMYmWgHsLIVFKLALeC3pmUT rD+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TUFkNuBa; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si2032629edy.54.2021.03.18.10.42.48; Thu, 18 Mar 2021 10:43:11 -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=@gmail.com header.s=20161025 header.b=TUFkNuBa; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230409AbhCRRjh (ORCPT + 99 others); Thu, 18 Mar 2021 13:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230353AbhCRRj0 (ORCPT ); Thu, 18 Mar 2021 13:39:26 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75A85C06174A; Thu, 18 Mar 2021 10:39:26 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id x7-20020a17090a2b07b02900c0ea793940so5392485pjc.2; Thu, 18 Mar 2021 10:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IhkVeMNa3z3bkyHG/n5Yqbdya8Y6YodntxafL1/t7os=; b=TUFkNuBaFMnmhcxPTzC3mXhgrGfceRtzFYxcJTaxVYT752Oyoo53IQ8Ng3/IwDgApB HPOn2KcroJmLA4uG0h7bOw7ivjvQ8RHrQVoG9VyZelQQFo37hCwr+EXtjqJWrOD3mTk/ cjS+qoW2oKLsCJ6aGNHl74LZpZFJiyDMY9Gv5tnWcJBh9Guz6mSkNz49RFU+Al6iaqQ6 x3AY3VWXOzO6ngjf6t8MkT43QJ0fbyEwFBYbNzxmwhd3B/6xVJLKrY+DnYV4mXLasm4e EGKTgcohDeFq5aTcRHWts4P5dB6GUT/dPRTgR483RTU8AtSjd8Qe+25L+36avyQm4CqL xzPA== 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:references :mime-version:content-disposition:in-reply-to; bh=IhkVeMNa3z3bkyHG/n5Yqbdya8Y6YodntxafL1/t7os=; b=R48uxOeSiJkrc+PeMNkxFDnA+iMkVl46ei11xGrRkpmOKp+PdiSdl8zCl3A0jKqAiq U+WY172VauI26Eu0lLDJj/heGw//Jw8GMBTyPRhvqx2aI0rp3ytwawsZKeSBREdQ0+PG +YgQwtqE0RfiGk+2QDAn23GalJMTTxvXthrL6V3cz1a7htzci0/H1sIRY6Py7UWD90Sq PWDFJVCDbxk+KdBrAX/mtJtXVHOxixkPkbK59k/js4PeM0m8B2gnmFp6Xf0xM3hm52dW 2075ggn/axWM9zNw4tzqR7xIX1CNxv2wcuSU3UTfNDkOYGM4ClKRalSvfgLdQDGg6tcz N70Q== X-Gm-Message-State: AOAM530A+NDeSYr6JflMRfn2NYaRQyTAyIp2UMuFwFhPZCJqWfaEOfWY ashmahlxeYb2ofrptjhK9C0= X-Received: by 2002:a17:90a:2c4b:: with SMTP id p11mr5758297pjm.75.1616089166011; Thu, 18 Mar 2021 10:39:26 -0700 (PDT) Received: from localhost ([103.248.31.158]) by smtp.gmail.com with ESMTPSA id s3sm3133362pfs.185.2021.03.18.10.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 10:39:25 -0700 (PDT) Date: Thu, 18 Mar 2021 23:08:42 +0530 From: Amey Narkhede To: Leon Romanovsky Cc: alex.williamson@redhat.com, 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: <20210318173842.scxuvm2p7ub35wvk@archlinux> 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/03/18 07:22PM, Leon Romanovsky wrote: > 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, > > [...] > And regarding vendors, see Amey response below about his touchpad troubles. > The cheap electronics vendors don't care about their users. > > Thanks > On the side note that vendor probably doesn't care about Linux users because even that reverted patch was submitted by community member. Many vendors are satisfied with windows only drivers. They don't have any reason to support Linux. That doesn't mean we should also abandon those users. Thanks, Amey