From patchwork Mon Oct 15 09:42:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 10641437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44C371508 for ; Mon, 15 Oct 2018 09:42:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33564296A3 for ; Mon, 15 Oct 2018 09:42:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2715F296AB; Mon, 15 Oct 2018 09:42:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC74B296A3 for ; Mon, 15 Oct 2018 09:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbeJOR1G (ORCPT ); Mon, 15 Oct 2018 13:27:06 -0400 Received: from 107-173-13-209-host.colocrossing.com ([107.173.13.209]:51180 "EHLO ozlabs.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726273AbeJOR1G (ORCPT ); Mon, 15 Oct 2018 13:27:06 -0400 Received: from vpl1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 6386EAE807F6; Mon, 15 Oct 2018 05:42:35 -0400 (EDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , David Gibson , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Alex Williamson , Alistair Popple , Reza Arbab Subject: [PATCH kernel 0/3] vfio/spapr_tce: Reworks for NVIDIA V100 + P9 passthrough (part 3) Date: Mon, 15 Oct 2018 20:42:30 +1100 Message-Id: <20181015094233.1324-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a third set of patches required for passing through NVIDIA V100 with coherent memory. The full patchset is here: https://github.com/aik/linux/tree/nv2 The matching QEMU is here: https://github.com/aik/qemu/tree/nv2 This implements a subdriver for NVIDIA V100 GPU with coherent memory and NPU/ATS support available in the POWER9 CPU. This does not address the interconnected GPUs, this will be posted as a separate patchset in a few days. This depends on: [PATCH kernel 0/4] vfio/spapr_tce: Reworks for NVIDIA V100 + P9 passthrough (part 1) [PATCH kernel 0/5] powerpc/powernv/npu: Reworks for NVIDIA V100 + P9 passthrough (part 2) [PATCH kernel RFC 3/3] powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation Please comment. Thanks. Alexey Kardashevskiy (3): vfio_pci: Allow mapping extra regions vfio_pci: Allow regions to add own capabilities vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] [10de:1db1] subdriver drivers/vfio/pci/Makefile | 1 + drivers/vfio/pci/vfio_pci_private.h | 8 + include/uapi/linux/vfio.h | 18 ++ drivers/vfio/pci/vfio_pci.c | 51 ++++- drivers/vfio/pci/vfio_pci_nvlink2.c | 409 ++++++++++++++++++++++++++++++++++++ drivers/vfio/pci/Kconfig | 4 + 6 files changed, 489 insertions(+), 2 deletions(-) create mode 100644 drivers/vfio/pci/vfio_pci_nvlink2.c