From patchwork Mon Oct 15 09:32:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 984034 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42YYC65zBSz9sDP for ; Mon, 15 Oct 2018 20:33:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726400AbeJORRc (ORCPT ); Mon, 15 Oct 2018 13:17:32 -0400 Received: from 107-173-13-209-host.colocrossing.com ([107.173.13.209]:52410 "EHLO ozlabs.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726273AbeJORRc (ORCPT ); Mon, 15 Oct 2018 13:17:32 -0400 Received: from vpl1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 53CB8AE807EA; Mon, 15 Oct 2018 05:33:03 -0400 (EDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , David Gibson , kvm-ppc@vger.kernel.org, Alistair Popple , Frederic Barrat , Alex Williamson Subject: [PATCH kernel 0/5] powerpc/powernv/npu: Reworks for NVIDIA V100 + P9 passthrough (part 2) Date: Mon, 15 Oct 2018 20:32:56 +1100 Message-Id: <20181015093301.1007-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org This is a second 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 patchset reworks NPU DMA code to be used with VFIO. The exported symbols are called from the NVIDIA driver so they must be able to work in both powernv and pseries platforms. This depends on skiboot's "npu2: Clear XTS_BDF_MAP when destroying context for next init_context" posted earlier today. Please comment. Thanks. Alexey Kardashevskiy (5): powerpc/powernv/npu: Add helper to access struct npu for NPU device powerpc/powernv/npu: Collect all static symbols under one struct powerpc/powernv: Detach npu struct from pnv_phb powerpc/powernv/npu: Factor out OPAL calls from context manipulation powerpc/powernv/npu: Add helper to map GPU to LPAR arch/powerpc/include/asm/pci.h | 4 + arch/powerpc/platforms/powernv/pci.h | 18 +- arch/powerpc/platforms/powernv/npu-dma.c | 298 ++++++++++++++++++++---------- arch/powerpc/platforms/powernv/pci-ioda.c | 9 +- 4 files changed, 212 insertions(+), 117 deletions(-)