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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 C20D8C43387 for ; Wed, 9 Jan 2019 16:58:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B4AC20859 for ; Wed, 9 Jan 2019 16:58:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="Aaa8OF7k"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="kEdiLyb7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726854AbfAIQ66 (ORCPT ); Wed, 9 Jan 2019 11:58:58 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:51649 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726639AbfAIQ65 (ORCPT ); Wed, 9 Jan 2019 11:58:57 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 5803EC9C3; Wed, 9 Jan 2019 11:58:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 09 Jan 2019 11:58:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm2; bh=6 FovQFO2AgejyrsB3wce5dlpU5UTkrtXR63KKxQm3fw=; b=Aaa8OF7ky9GajHsNF Vnd2VUbHMhEy0lHl9uKlH5VrLKrNQsnwIBzCxxUOn+FN9+1HQCIKtdW+chYug85M 5Lvs+FHwkrqebNLTAUpxNYSPK4Equ0f7gGLjkjxnt5KT3gDXr//SnWWDiSLYZ140 kcnBGUGItK+tjPb2D8ahP/LD+t6T9Y5Zq6SodEPI3dk4jOwM0/ZGlwh4DLthBJMd s15WXQkhCLIOiHvYA6Irp0WLl5wcqU3lufjOBqCFsXMMfAnU6+K5y1TCW9Hug7Im k/2hNe2qh2Y8e06bQsZLRl+pp1Ef+jpJVSoK1hqHBT0DlRMWCFhGfkqscvbflT2S viwqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=6FovQFO2AgejyrsB3wce5dlpU5UTkrtXR63KKxQm3 fw=; b=kEdiLyb7NRZlQaevxbSGj0l6eUQtJz0KA8ST7FuUVbOkygJYZ1wg70JCd SQJD+xg13+eDlEmMPgiX/+GEjucOWNmx5UkdvvOefBKCKRR2Hh252deCvgc0omMv kYCc4THYy84sFXyEza9mLHmUPeZ1px058vMXza0tXfKBhG1Bgwq0UotwmW5xIXg/ wTnEL0L/M/IwLuDjzkPiBYqd1OnfkwExL2OE+XClkgp8fRvW5mbpo1TPlj/2BHjL u65eDrRGUzB6sdVqGNoI3aKlOGWIGpGvlV2dmLJ/eRK3G1YTYSPJxCR2aC7am+lI t69CGr7tAo4VNbuda3AZao0Riooiw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrfedugdelieculddtuddrgedtkedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhprghmkfhpucdlfedttddmnecujfgurhepfffhvffukfhfgggtugfgjggfsehtkeer tddtredunecuhfhrohhmpefirhgvghcumffjuceoghhrvghgsehkrhhorghhrdgtohhmqe enucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehg rhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 548EB10106; Wed, 9 Jan 2019 11:58:53 -0500 (EST) Date: Wed, 9 Jan 2019 17:58:51 +0100 From: Greg KH To: Frederic Barrat Cc: Greg Kurz , linuxppc-dev@lists.ozlabs.org, aik@ozlabs.ru, andrew.donnellan@au1.ibm.com, stable@vger.kernel.org Subject: Re: [PATCH] powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group() Message-ID: <20190109165851.GA9424@kroah.com> References: <20190109151342.19953-1-fbarrat@linux.ibm.com> <20190109172529.10c45ce6@bahia.lan> <41fc8267-7a40-a3e0-df39-773771b661d2@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <41fc8267-7a40-a3e0-df39-773771b661d2@linux.ibm.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Jan 09, 2019 at 05:45:53PM +0100, Frederic Barrat wrote: > > > Le 09/01/2019 à 17:25, Greg Kurz a écrit : > > On Wed, 9 Jan 2019 16:13:42 +0100 > > Frederic Barrat wrote: > > > > > With a recent change around IOMMU group, a system with an opencapi > > > adapter is no longer booting and we get a kernel oops: > > > > > > BUG: Kernel NULL pointer dereference at 0x00000028 > > > Faulting instruction address: 0xc0000000000aa38c > > > Oops: Kernel access of bad area, sig: 7 [#1] > > > LE SMP NR_CPUS=2048 NUMA PowerNV > > > Modules linked in: > > > CPU: 5 PID: 1 Comm: swapper/4 Not tainted 5.0.0-rc1-fxb-00001-g3bd6e94bec12 > > > NIP: c0000000000aa38c LR: c0000000000a6608 CTR: c000000000097480 > > > REGS: c000000005783700 TRAP: 0300 Not tainted (5.0.0-rc1-fxb-00001-g3bd6 > > > MSR: 9000000002009033 CR: 28000228 XER: 20 > > > CFAR: c0000000000a6604 DAR: 0000000000000028 DSISR: 00080000 IRQMASK: 0 > > > GPR00: c0000000000a6608 c000000005783990 c000000001036100 c0000007bf761860 > > > GPR04: 0000000000000000 c000000005783834 0000000000000000 0000000000000000 > > > GPR08: 69626d2c6e707500 0000000000000000 0000000000000000 9000000002001003 > > > GPR12: 0000000000000000 c0000007bfff8300 c000000000010450 0000000000000000 > > > GPR16: c000000000ced938 0000000000000100 c000000000ced948 00000000000a0000 > > > GPR20: 00000000000bfffe c000000000ced9a8 0000000000000200 c000000000ced978 > > > GPR24: 00000000006080c0 c000000716d09828 c00000002e6fd000 0000000000000000 > > > GPR28: c0000007bf4aff68 c0000007bf8d0080 c000000000f23938 c0000007bf761860 > > > NIP [c0000000000aa38c] pnv_try_setup_npu_table_group+0x1c/0x1a0 > > > LR [c0000000000a6608] pnv_pci_ioda_fixup+0x1f8/0x660 > > > Call Trace: > > > [c000000005783990] [c0000000000aa3d0] pnv_try_setup_npu_table_group+0x60/0x > > > [c0000000057839d0] [c0000000000a661c] pnv_pci_ioda_fixup+0x20c/0x660 > > > [c000000005783ab0] [c000000000e1d4c0] pcibios_resource_survey+0x2c8/0x31c > > > [c000000005783b90] [c000000000e1caf4] pcibios_init+0xb0/0xe4 > > > [c000000005783c10] [c000000000010054] do_one_initcall+0x64/0x264 > > > [c000000005783ce0] [c000000000e1132c] kernel_init_freeable+0x36c/0x468 > > > [c000000005783db0] [c000000000010474] kernel_init+0x2c/0x148 > > > [c000000005783e20] [c00000000000b794] ret_from_kernel_thread+0x5c/0x68 > > > > > > An opencapi device is using a device PE, so the current code breaks > > > because pe->pbus is not defined. > > > > > > More generally, there's no need to define an IOMMU group for opencapi, > > > as the device sends real addresses directly (admittedly, the > > > virtualization story is yet to be written). So let's fix it by > > > > Current plan is to go for mediated VFIO. The real HW stays under the control > > of the host ocxl driver, and we still don't need an IOMMU group. > > > > > skipping the IOMMU group setup for opencapi PHBs. > > > > > > Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups") > > > Signed-off-by: Frederic Barrat > > > --- > > > > Reviewed-by: Greg Kurz > > > > and > > > > Cc: stable@vger.kernel.org # v4.20 > > Thanks for the review! But why did you add stable? that problem is only seen > on 5.0-rc1, isn't it? No, this is fixing a patch that got backported to stable. Well, attempted to be backported, I dropped it because of the problem :) thanks, greg k-h