Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4920706pxj; Wed, 9 Jun 2021 05:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEPhYfa7huURcOFbmOF4sTUBKinkE6pqiTcgoxzMTdPd8F024cKwcPKd5GFsa5MveCyYW8 X-Received: by 2002:a17:906:29c8:: with SMTP id y8mr11316242eje.312.1623241023979; Wed, 09 Jun 2021 05:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623241023; cv=none; d=google.com; s=arc-20160816; b=FkQSmlr0UVFdB2bTlyF4e7zVwSiovmokLNSChKwU/UMNheht1JwaVwj3Vhdbe78S2v V0RYB4vmCKepp1Vpd5aL43PR1NP3bU0O9vmxcJrw7+0ZcWmTBmWBQfviOZmvzbjvjmHj 13l8d7K+3CPdxeEeVpgarGu09fMlk84OKa9yme/XqHoeGdu6bMKJG3Lt4eyPUGENJZey 9e6dSv6qNxMvfc4+sk0Qp0l2BMUrGEvaaJIlP9r8vGGxpsweTfBBX7vCOdJKG1cLphl8 oRqYwBaBaIFTD8+yyjeOJmkS81wKJvHyqKacTyiJ3wLQCf+Mx9APJLknnV71eVT+XFj9 20Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=JGp/0RPvZPb+IOMbTE2NveByUxQDrcE60zp+PyvVOGM=; b=Ljx0aD2M0h59KNfwteTxJ2M0yQyHtLkKfgzgliIpMQK4KOke6zo6aUQxcVX211yhTW 1dXWVhXv8X+PQXneJNY1l3srj2I0Y6u5eIf8Zuh0wiYgsNOb4zMSxEOwPYRWvfgtnA+Y NgiI7bn1tfdpOn2O7O0MZmFSs5E3mHB2/ve4b7k4MgoQhkA8ygx94I26+oP9PiPIJoYT 4dGqlKZ6/Wg5ZOjT1gRjM6mRXibdstD7Ke0S+p/reUKgUfRvNGBPJLnnHI7KKy5Id3Qz E/u1N4K60+d3syQ/rq5PkPkRfZ+h6iYEVqGN9x25e0ZAmbTsbgYsgeux970WwivQzdF+ trnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=I1GrLcRC; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e5si2188060ejl.222.2021.06.09.05.16.40; Wed, 09 Jun 2021 05:17:03 -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=@redhat.com header.s=mimecast20190719 header.b=I1GrLcRC; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235413AbhFIB3N (ORCPT + 99 others); Tue, 8 Jun 2021 21:29:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41303 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235074AbhFIB3N (ORCPT ); Tue, 8 Jun 2021 21:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623202039; 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=JGp/0RPvZPb+IOMbTE2NveByUxQDrcE60zp+PyvVOGM=; b=I1GrLcRCUJYZ9LBowuAkCjpofXOgzHVFjrAG6kXDWDVSQ002aQeoeFR53S4sJqA5sHnVS+ Zqdg4tMM/nV5OvmhAcomsTjplI2pgZvm37H1qGeXsgK3kpHqdLkBZxA3OajGmnGaoAjHoJ OCMzTiWxjZlv9kxaHK8E81mPl3hZC3k= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-34-2RdVNNHSP6Kc6eWu91Safg-1; Tue, 08 Jun 2021 21:27:17 -0400 X-MC-Unique: 2RdVNNHSP6Kc6eWu91Safg-1 Received: by mail-ot1-f72.google.com with SMTP id t13-20020a0568301e2db02903db6adef049so10495097otr.20 for ; Tue, 08 Jun 2021 18:27:17 -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:organization:mime-version:content-transfer-encoding; bh=JGp/0RPvZPb+IOMbTE2NveByUxQDrcE60zp+PyvVOGM=; b=QKBDV4xGMEYV76ZK4JwgdMXUe+7/k/qwNIU6NCRKBDIRTcmFWRWt42Q+aOW/Yzmwg2 X/DaB7BHN4QWm7ri+BS9UONMU7SLF6QVseYLRXavN4nETr0fxCUXnRGmr9BGUrN4SxXt miif999TmKh9VfNojNuvA4Yi97n/ZO7txJydbNk6nIIFcNeUqrV6+eWhNgHJASMn82kf /tyXonsfpui47TIPisZ6c/3RPEJCXcnKbXC3n3zRC3Xudx9ngBXORlzWauBkg0LvhTyN mS9RL3/E9Csj+xKwZLpDPdRPRYzRSPfkz7jDBbqRc9Abr1MqIHvpdVioOBtxP5NEJwqi Sr+w== X-Gm-Message-State: AOAM533vMMJl6k4CdXr5mc2JlIHlYTBdmj9V+qgIaxsPgyUWy78eoMo3 xVL0taZ3LZJwYrDq5x0s+ZN/Csz2RWzh6VEYGJF/XjYaT46e1mMZgc1vKF1yzOKJLKExZU+Qq3M 1SnHV/IrGRkk6xEYhZtA/p5ZX X-Received: by 2002:a05:6808:65a:: with SMTP id z26mr2084849oih.85.1623202036847; Tue, 08 Jun 2021 18:27:16 -0700 (PDT) X-Received: by 2002:a05:6808:65a:: with SMTP id z26mr2084831oih.85.1623202036662; Tue, 08 Jun 2021 18:27:16 -0700 (PDT) Received: from redhat.com ([198.99.80.109]) by smtp.gmail.com with ESMTPSA id t14sm3189692ooh.39.2021.06.08.18.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 18:27:16 -0700 (PDT) Date: Tue, 8 Jun 2021 19:27:11 -0600 From: Alex Williamson To: Jason Gunthorpe Cc: Max Gurtovoy , cohuck@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, aviadye@nvidia.com, oren@nvidia.com, shahafs@nvidia.com, parav@nvidia.com, artemp@nvidia.com, kwankhede@nvidia.com, ACurrid@nvidia.com, cjia@nvidia.com, yishaih@nvidia.com, kevin.tian@intel.com, hch@infradead.org, targupta@nvidia.com, shameerali.kolothum.thodi@huawei.com, liulongfang@huawei.com, yan.y.zhao@intel.com Subject: Re: [PATCH 09/11] PCI: add matching checks for driver_override binding Message-ID: <20210608192711.4956cda2.alex.williamson@redhat.com> In-Reply-To: <20210608224517.GQ1002214@nvidia.com> References: <20210603160809.15845-1-mgurtovoy@nvidia.com> <20210603160809.15845-10-mgurtovoy@nvidia.com> <20210608152643.2d3400c1.alex.williamson@redhat.com> <20210608224517.GQ1002214@nvidia.com> Organization: Red Hat X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Jun 2021 19:45:17 -0300 Jason Gunthorpe wrote: > On Tue, Jun 08, 2021 at 03:26:43PM -0600, Alex Williamson wrote: > > > drivers that specifically opt into this feature and the driver now has > > > the opportunity to provide a proper match table that indicates what HW > > > it can properly support. vfio-pci continues to support everything. > > > > In doing so, this also breaks the new_id method for vfio-pci. > > Does it? How? The driver_override flag is per match entry not for the > entire device so new_id added things will work the same as before as > their new match entry's flags will be zero. Hmm, that might have been a testing issue; combining driverctl with manual new_id testing might have left a driver_override in place. > > Sorry, with so many userspace regressions, crippling the > > driver_override interface with an assumption of such a narrow focus, > > creating a vfio specific match flag, I don't see where this can go. > > Thanks, > > On the other hand it overcomes all the objections from the last go > round: how userspace figures out which driver to use with > driver_override and integrating the universal driver into the scheme. > > pci_stub could be delt with by marking it for driver_override like > vfio_pci. By marking it a "vfio driver override"? :-\ > But driverctl as a general tool working with any module is not really > addressable. > > Is the only issue the blocking of the arbitary binding? That is not a > critical peice of this, IIRC We can't break userspace, which means new_id and driver_override need to work as they do now. There are scads of driver binding scripts in the wild, for vfio-pci and other drivers. We can't assume such a narrow scope. Thanks, Alex