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=-5.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6CE70C433DB for ; Tue, 9 Feb 2021 01:56:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32D2664E75 for ; Tue, 9 Feb 2021 01:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230443AbhBIB4Z (ORCPT ); Mon, 8 Feb 2021 20:56:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbhBIB4M (ORCPT ); Mon, 8 Feb 2021 20:56:12 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 595BDC061786 for ; Mon, 8 Feb 2021 17:55:32 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id t29so10894578pfg.11 for ; Mon, 08 Feb 2021 17:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ozlabs-ru.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=H9vusQPG3gc7CnqBMhQxm3rI+btv7MJBpSMfnycyGPs=; b=vq4d+UIYc6Cl9yqExRIKp4B8DULlrvlymru63jPGQqkwtoeaoV/cspyWcruJlWW5Hf xdwyxeJLbCx2IztvzS27yIh4iv6MeooPbPgHDTZnMgoTuTofYfP7joBLTs1wt8RrHwWF TmYLCei3kNrowIBM2KN9gFL/7joKVYFHhs66bk3oxpRdfVz2uJtFSaJ5AeR9XCXVhpRr 76DSm+PYZRsVJ000k9027035XLEnoP2A4N2dHb5/3dN3z4riLS1JFuRzprN0T+yrXn1v SwfTi8//hMaOSUHSKiT87BFRNTZKOn0Crl/ueBW+4cctLq0+OblxnzTsIHMxSIRSE9ir PxHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=H9vusQPG3gc7CnqBMhQxm3rI+btv7MJBpSMfnycyGPs=; b=daPLPn9EsihMeZSQpLbN42fMlfTnostXIFarHHylht6RZJSgTKIPx8BmnS9RxrXgy9 YS+tMzfxiNGxu+BF+KJHPEi1mnU5Ix48TrDWQZCzmS50/pHfHlOtpGCYpyjG2DWHlja6 aAhPhOnGTOwi5PSkZ6dAHBecL7xVgb72TwhVpLzyTmZcPqEy8FK9kAuPx8w+RVV7F8Ak 5o+aDhw9PbQSBLTzxRjIc4cgFD86RRDjHtiwPBUDvyZ06wx/pEdyIS/PUNwnP/XnxhUx 8p0mswBxN1v7B3YIz3nKa6Erjg5g6EF82amdw8AZUxTpBsHsNDKGq/cwOcQRVo8Woc2P VYJA== X-Gm-Message-State: AOAM530CO3tjSL3td7U+MT7Hla6wb/EaDlOJhDcyPktict34RfY3x2XE lOljGQnXDBSLzZ15/7NiXqpEvg== X-Google-Smtp-Source: ABdhPJwf881m9YNqJrjAFSQitrS2uf6hPc9RQ/zxIn3JTvQT2S3bQVI8HL4MpOfFXJFuWot327n1TA== X-Received: by 2002:a63:d246:: with SMTP id t6mr19473913pgi.283.1612835731840; Mon, 08 Feb 2021 17:55:31 -0800 (PST) Received: from [192.168.10.23] (124-171-107-241.dyn.iinet.net.au. [124.171.107.241]) by smtp.gmail.com with UTF8SMTPSA id e23sm6180782pfd.145.2021.02.08.17.55.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Feb 2021 17:55:31 -0800 (PST) Subject: Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd To: Max Gurtovoy , Jason Gunthorpe Cc: Cornelia Huck , Alex Williamson , Matthew Rosato , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, liranl@nvidia.com, oren@nvidia.com, tzahio@nvidia.com, leonro@nvidia.com, yarong@nvidia.com, aviadye@nvidia.com, shahafs@nvidia.com, artemp@nvidia.com, kwankhede@nvidia.com, ACurrid@nvidia.com, gmataev@nvidia.com, cjia@nvidia.com, yishaih@nvidia.com References: <20210201162828.5938-1-mgurtovoy@nvidia.com> <20210201162828.5938-9-mgurtovoy@nvidia.com> <20210201181454.22112b57.cohuck@redhat.com> <599c6452-8ba6-a00a-65e7-0167f21eac35@linux.ibm.com> <20210201114230.37c18abd@omen.home.shazbot.org> <20210202170659.1c62a9e8.cohuck@redhat.com> <806c138e-685c-0955-7c15-93cb1d4fe0d9@ozlabs.ru> <34be24e6-7f62-9908-c56d-9e469c3b6965@nvidia.com> <83ef0164-6291-c3d1-0ce5-2c9d6c97469e@ozlabs.ru> <20210204125123.GI4247@nvidia.com> <5bf0b8f7-38fb-bfdf-d093-d8d9b28b9679@nvidia.com> From: Alexey Kardashevskiy Message-ID: <63632419-ddf2-a6d9-d479-3a9548406018@ozlabs.ru> Date: Tue, 9 Feb 2021 12:55:15 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Thunderbird/85.0 MIME-Version: 1.0 In-Reply-To: <5bf0b8f7-38fb-bfdf-d093-d8d9b28b9679@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2021 23:44, Max Gurtovoy wrote: > > On 2/5/2021 2:42 AM, Alexey Kardashevskiy wrote: >> >> >> On 04/02/2021 23:51, Jason Gunthorpe wrote: >>> On Thu, Feb 04, 2021 at 12:05:22PM +1100, Alexey Kardashevskiy wrote: >>> >>>> It is system firmware (==bios) which puts stuff in the device tree. The >>>> stuff is: >>>> 1. emulated pci devices (custom pci bridges), one per nvlink, >>>> emulated by >>>> the firmware, the driver is "ibmnpu" and it is a part on the nvidia >>>> driver; >>>> these are basically config space proxies to the cpu's side of nvlink. >>>> 2. interconnect information - which of 6 gpus nvlinks connected to >>>> which >>>> nvlink on the cpu side, and memory ranges. >>> >>> So what is this vfio_nvlink driver supposed to be bound to? >>> >>> The "emulated pci devices"? >> >> Yes. >> >>> A real GPU function? >> >> Yes. >> >>> A real nvswitch function? >> >> What do you mean by this exactly? The cpu side of nvlink is "emulated >> pci devices", the gpu side is not in pci space at all, the nvidia >> driver manages it via the gpu's mmio or/and cfg space. >> >>> Something else? >> >> Nope :) >> In this new scheme which you are proposing it should be 2 drivers, I >> guess. > > I see. > > So should it be nvidia_vfio_pci.ko ? and it will do the NVLINK stuff in > case the class code matches and otherwise just work as simple vfio_pci > GPU ? "nvidia_vfio_pci" would be too generic, sounds like it is for every nvidia on every platform. powernv_nvidia_vfio_pci.ko may be. > What about the second driver ? should it be called ibmnpu_vfio_pci.ko ? This will do. > >> >>> >>> Jason >>> >> -- Alexey