From patchwork Thu Mar 14 17:56:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Ricardo Ziviani X-Patchwork-Id: 1056628 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=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44KxHd0Rx3z9s6w; Fri, 15 Mar 2019 04:57:17 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1h4UbN-0006JY-Sd; Thu, 14 Mar 2019 17:57:09 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1h4UbM-0006JP-M3 for kernel-team@lists.ubuntu.com; Thu, 14 Mar 2019 17:57:08 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2EHrmZF038827 for ; Thu, 14 Mar 2019 13:57:07 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2r7u0pj8h3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Mar 2019 13:57:06 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Mar 2019 17:57:05 -0000 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 14 Mar 2019 17:57:04 -0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2EHv3XQ21168342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Mar 2019 17:57:03 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A550112069 for ; Thu, 14 Mar 2019 17:57:03 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BFF0F112064 for ; Thu, 14 Mar 2019 17:57:02 +0000 (GMT) Received: from pacoca.br.ibm.com (unknown [9.7.47.58]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 14 Mar 2019 17:57:02 +0000 (GMT) From: Jose Ricardo Ziviani To: kernel-team@lists.ubuntu.com Subject: [Bionic][PATCH 00/12] Enable NVLink2 devices on guests Date: Thu, 14 Mar 2019 14:56:40 -0300 X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19031417-0072-0000-0000-0000040B23DE X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010758; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01174327; UDB=6.00614057; IPR=6.00954991; MB=3.00025978; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-14 17:57:04 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031417-0073-0000-0000-00004B7D2545 Message-Id: <20190314175652.1647-1-joserz@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-14_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903140126 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1819989 Based on master-next (currently UBUNTU: Ubuntu-4.15.0-47.50) This patchset enables QEMU/KVM guests to use passed through NVLink2 devices. The host side runs a custom version of Ubuntu Bionic (kernel/QEMU) but it is very important for clients to use the image that they get from Canonical's website. To accomplish that we've worked on a small patchset to cover only the guest side - avoiding changes beyond that. All patches are upstream. Thank you very much, Jose R. Ziviani Alexey Kardashevskiy (9): powerpc/powernv/npu: Do not try invalidating 32bit table when 64bit table is enabled powerpc/powernv/idoa: Remove unnecessary pcidev from pci_dn powerpc/powernv: Move npu struct from pnv_phb to pci_controller powerpc/powernv/npu: Move OPAL calls away from context manipulation powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation powerpc/pseries/npu: Enable platform support powerpc/pseries: Remove IOMMU API support for non-LPAR systems powerpc/powernv/npu: Check mmio_atsd array bounds when populating powerpc/powernv/npu: Fault user page into the hypervisor's pagetable Haren Myneni (1): powerpc/powernv: Export opal_check_token symbol Nicholas Piggin (1): powerpc/powernv: call OPAL_QUIESCE before OPAL_SIGNAL_SYSTEM_RESET Vaibhav Jain (1): powerpc/powernv: Make possible for user to force a full ipl cec reboot arch/powerpc/include/asm/opal-api.h | 8 + arch/powerpc/include/asm/opal.h | 1 + arch/powerpc/include/asm/pci-bridge.h | 3 +- arch/powerpc/include/asm/pci.h | 3 + arch/powerpc/platforms/powernv/npu-dma.c | 198 +++++++++++------- .../powerpc/platforms/powernv/opal-wrappers.S | 1 + arch/powerpc/platforms/powernv/opal.c | 1 + arch/powerpc/platforms/powernv/pci-ioda.c | 45 +++- arch/powerpc/platforms/powernv/pci.h | 19 +- arch/powerpc/platforms/powernv/setup.c | 36 +++- arch/powerpc/platforms/powernv/smp.c | 17 +- arch/powerpc/platforms/pseries/iommu.c | 42 +++- arch/powerpc/platforms/pseries/pci.c | 23 ++ 13 files changed, 282 insertions(+), 115 deletions(-) Acked-by: Kleber Sacilotto de Souza Acked-by: Kamal Mostafa