Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9211050ybl; Fri, 17 Jan 2020 08:06:33 -0800 (PST) X-Google-Smtp-Source: APXvYqyviKjfoiHCsgb+yGSOdrtzkMmINuDXqI5lUV0YpZMn/Dny5ddFFwOaiv7wVy0mCHY45wmh X-Received: by 2002:a05:6808:aba:: with SMTP id r26mr3792826oij.4.1579277193719; Fri, 17 Jan 2020 08:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579277193; cv=none; d=google.com; s=arc-20160816; b=R9cMj6QQwUpjfKxLhrJS7LD6bJAkxiYaYFx1AOvHBICThzq0j4BfKzNeRPsGdsJH1Y rQEo6FeBnSgXRdbLOXH5RzZI5k1ZIjyxg3BlJ5tRnV7YnXVj+5YgNv+oGuzms7ona/D6 L7uk8axHYPDrwvZPeEqwuovDGAXzMcNMDacHWlEV92baao9ZW6ZPw7eu4hdIrd+rwV2Z Yn7xZRkM6Mp6Jdpyo118fKehIbXC02NalOuFRlSHWG9dXs6b7gAQK9wapYEFU5xY+Fko uuMB9guasiMts1WZ/Vrkh+Vw6zkSZ0kD8raybRQ7Sg+ZkHWjui+Jnf1+AugtXUzeIL7Q nePg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=ByRAQDUXFYPkLzMguKAbbrnpR62RsTvnJxoaccBVUAk=; b=t7vfdvhkfyOyDvys6jjSRunWTZg+xqG549UVnOIQcMrEW0H+5gItM7v94TTy0aoBPS kf7fErNjGqA7jcjF86AmssATwXeB9yrmnQoliF3Pf/8OwRSQdRMN6sU+F2DL951NlTvl HTRz0c+a4eDcPEtOlWsgnBX9eTjaE823kFWvPDmaRq+obGKnB5lugxpEZ6pkCi9qRI2j xlA9rhdvc+s7+x4NI37iKbKUxOOVlQeH4uhCXl16FqnTvw0Sru4uljNUs41BcodwF6kX Z4qBNNhmMJeCitLajoItcQ0myVmFoe7RUD0LRgGOfzT1SzVsOpSn26QcgrQPHTyS8yT/ KWsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KiIfEVI1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20si14235012oia.159.2020.01.17.08.06.20; Fri, 17 Jan 2020 08:06:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KiIfEVI1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729222AbgAQQFG (ORCPT + 99 others); Fri, 17 Jan 2020 11:05:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:46080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbgAQQFG (ORCPT ); Fri, 17 Jan 2020 11:05:06 -0500 Received: from localhost (mobile-166-170-223-177.mycingular.net [166.170.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D431020842; Fri, 17 Jan 2020 16:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579277105; bh=5lSOK5yogC8sv7K9RGzLvLKiw8y2/XaCPwmh5bPq2tE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=KiIfEVI1g9Gu0OrDOkRaXNFG8y+maXE3WNxw+A0tDaXOOuvjMvavORVkVDx9sj5jn a1+RJE/qe8PHYhuFcqHj7ZYUfmvIwFLQvwaeOJV8868jOcztb5/XYkSx4Mu4jKiSjl AKS9Lr8IJjujZu699JqBSHhIO+fxp8cK6ghPDI/k= Date: Fri, 17 Jan 2020 10:05:02 -0600 From: Bjorn Helgaas To: Nicholas Johnson Cc: Thomas Gleixner , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "H. Peter Anvin" , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org Subject: Re: [[RFC PATCH v1] 1/1] PCI: Add pci=nobbn to ignore ACPI _BBN method to override host bridge bus window Message-ID: <20200117160502.GA92383@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Rafael, linux-acpi, start of thread at https://lore.kernel.org/lkml/PSXP216MB0438F3D8C09957C6A45BC43D80580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM/T/#u] On Fri, Jan 17, 2020 at 03:00:11PM +0000, Nicholas Johnson wrote: > On Thu, Jan 16, 2020 at 11:13:13PM +0100, Thomas Gleixner wrote: > > Nicholas Johnson writes: > > > > > Add pci=nobbn kernel parameter. > > > > > > Override the host bridge bus resource to [bus 00-ff] when specified. > > > > Fine, but you completely fail to explain why this is useful and why > > someone would utilize this command line parameter. > > There are motherboards with single PCIe root complex which give > significantly less than [bus 00-ff] via CRS. I own one with [bus 00-7f] > and have seen some with significantly less. > > A user who wants to use more busses than the motherboard advertises will > want to use this kernel parameter, for instance if they have a lot of > PCIe switches or Thunderbolt 3 devices. I don't think this is a good idea. "pci=nocrs" was mainly useful to work around Linux defects in handling _CRS methods. I don't think we have comparable defects in our handling of _BBN. In your example, the BIOS is telling us the bridge leads to [bus 00-7f]. We don't know what is at [bus 80-ff]. Maybe that range is valid and usable, and maybe it's not. It could be routed to a different host bridge, it could contain devices the BIOS uses for its own purposes, it could be completely invalid. If we *did* decide this is a good idea, "nobbn" is a misleading name. _BBN evaluates to a single bus number, not a range. In your example, BIOS is supplying _BBN=0 and _CRS that contains [bus 00-7f]. "nobbn" suggests that'd we'd ignore _BBN. But this patch actually ignores the bus number range from _CRS, so it has nothing to do with _BBN. > This is similar to how we have pci=nocrs to override motherboards with > issues. The bus resource is not overridden by pci=nocrs, even though it > will usually come from the same method. However, I believe it would be > unwise to change pci=nocrs to include bus resource, as detailed in my > original RFC. For reference, I think this original RFC was https://lore.kernel.org/r/PSXP216MB04385B2C1BB518E5219C30CE80580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Bjorn