Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3979147pxb; Mon, 1 Feb 2021 09:19:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgRLFuzg2enwP7km4skSb+pjHWkh8hDc9Un4gjolNPnK3QPnTr5+/lXXO0dlUQrT/3x4Vn X-Received: by 2002:a05:6402:3589:: with SMTP id y9mr20099227edc.344.1612199978500; Mon, 01 Feb 2021 09:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612199978; cv=none; d=google.com; s=arc-20160816; b=VStQ0MalM6nxEIaxbrUtlaTGtpByZcEytGZHIG0bbW1dTgcva2WQ2aztnQkQV5kyvB gQCWfa8EiXMundT2NxdWb/EJVHuHF0cuVpr2gg3MBqykpL8mBAuXK8XZBfQAfK/ndyEU +PG2SO+qefA0+otcKxk8mku8upEl8Scr83QcFOlqy/xFAt7V/+mvcpzuFrlUWgYVxzAp bVBloDdEYtSVh0cq6saY5J5U+l31VEuS39DZPxTdUKcgW8Kyj3TQMVi2tgWj2kXNgqj8 +OOO9aV77YA7q6No9dQUzxNqyOSqw5iJsxHAkSSwsf2Ff2+8ygO1slKEi5lheaAQ3A6O RAfw== 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=zoEgsUnA+6E+zicwySkdMUh9CFwLmdn7EQyiABNkBZY=; b=jbg5riCkBgUU52efsglGjRaSWeYkMegm5Z3+loHR2BvC3YIDlAaWn9VFsdkmB892Tu ea0QuZXUwnkDsQywvVgbnyAjIhEfvRcz945+XxCAa4Y2J1vgaGk77f1bMoNiEpTdquf/ gX19EfVxSUsPM/9tPURl0mHRUmylnsxNHRDDo0EMnE4cofMYAqT95+3T9UXcSgjIx9uH aeGky4K54ZL0bsjNhBco03VhBy0huLDcUEGGmZYuIu2cZu2fx/sk4z8bYE0SNWkjKGEo TgXAkm18bb9X61ihLmPCtYHTQeRbcD7KnYIX4t6mWSB2AXWeTKgL3k8dV/vW/8P4rJCT OaUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Yl3LHwBv; 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 w4si10641145ejb.499.2021.02.01.09.18.56; Mon, 01 Feb 2021 09:19:38 -0800 (PST) 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=Yl3LHwBv; 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 S231826AbhBARQg (ORCPT + 99 others); Mon, 1 Feb 2021 12:16:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52154 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230055AbhBARQe (ORCPT ); Mon, 1 Feb 2021 12:16:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612199708; 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=zoEgsUnA+6E+zicwySkdMUh9CFwLmdn7EQyiABNkBZY=; b=Yl3LHwBv+x5U0mu4JFC7c7gzBLByA6qBM3mmuJe27eIbj+GhKE8bJxRcz6OyimYnzJSBQJ b6ePCr5GiXHw3imr++OQlBg5ElrU1TjEyUwRHHfVnNJiw4ADZMjZI3JPX925eKMLb317vl HOFOgYCafpeEHa/G6BPucMxC8UFxvWg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-ShZAkfjNPAeLanazqPeJtQ-1; Mon, 01 Feb 2021 12:15:06 -0500 X-MC-Unique: ShZAkfjNPAeLanazqPeJtQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A483AAFAA4; Mon, 1 Feb 2021 17:15:03 +0000 (UTC) Received: from gondolin (ovpn-113-126.ams2.redhat.com [10.36.113.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id D693E5D9DC; Mon, 1 Feb 2021 17:14:56 +0000 (UTC) Date: Mon, 1 Feb 2021 18:14:54 +0100 From: Cornelia Huck To: Max Gurtovoy Cc: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd Message-ID: <20210201181454.22112b57.cohuck@redhat.com> In-Reply-To: <20210201162828.5938-9-mgurtovoy@nvidia.com> References: <20210201162828.5938-1-mgurtovoy@nvidia.com> <20210201162828.5938-9-mgurtovoy@nvidia.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Feb 2021 16:28:27 +0000 Max Gurtovoy wrote: > This patch doesn't change any logic but only align to the concept of > vfio_pci_core extensions. Extensions that are related to a platform > and not to a specific vendor of PCI devices should be part of the core > driver. Extensions that are specific for PCI device vendor should go > to a dedicated vendor vfio-pci driver. My understanding is that igd means support for Intel graphics, i.e. a strict subset of x86. If there are other future extensions that e.g. only make sense for some devices found only on AMD systems, I don't think they should all be included under the same x86 umbrella. Similar reasoning for nvlink, that only seems to cover support for some GPUs under Power, and is not a general platform-specific extension IIUC. We can arguably do the zdev -> s390 rename (as zpci appears only on s390, and all PCI devices will be zpci on that platform), although I'm not sure about the benefit. > > For now, x86 extensions will include only igd. > > Signed-off-by: Max Gurtovoy > --- > drivers/vfio/pci/Kconfig | 13 ++++++------- > drivers/vfio/pci/Makefile | 2 +- > drivers/vfio/pci/vfio_pci_core.c | 2 +- > drivers/vfio/pci/vfio_pci_private.h | 2 +- > drivers/vfio/pci/{vfio_pci_igd.c => vfio_pci_x86.c} | 0 > 5 files changed, 9 insertions(+), 10 deletions(-) > rename drivers/vfio/pci/{vfio_pci_igd.c => vfio_pci_x86.c} (100%) (...) > diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c > index c559027def2d..e0e258c37fb5 100644 > --- a/drivers/vfio/pci/vfio_pci_core.c > +++ b/drivers/vfio/pci/vfio_pci_core.c > @@ -328,7 +328,7 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev) > > if (vfio_pci_is_vga(pdev) && > pdev->vendor == PCI_VENDOR_ID_INTEL && > - IS_ENABLED(CONFIG_VFIO_PCI_IGD)) { > + IS_ENABLED(CONFIG_VFIO_PCI_X86)) { > ret = vfio_pci_igd_init(vdev); This one explicitly checks for Intel devices, so I'm not sure why you want to generalize this to x86? > if (ret && ret != -ENODEV) { > pci_warn(pdev, "Failed to setup Intel IGD regions\n");