Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbdLFTvX (ORCPT ); Wed, 6 Dec 2017 14:51:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:46468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbdLFTvW (ORCPT ); Wed, 6 Dec 2017 14:51:22 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 458CF21878 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Wed, 6 Dec 2017 13:51:18 -0600 From: Bjorn Helgaas To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] x86/PCI: limit the size of the 64bit BAR to 256GB Message-ID: <20171206195118.GL23510@bhelgaas-glaptop.roam.corp.google.com> References: <20171129141229.6107-1-christian.koenig@amd.com> <20171129141229.6107-4-christian.koenig@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171129141229.6107-4-christian.koenig@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 35 On Wed, Nov 29, 2017 at 03:12:29PM +0100, Christian K?nig wrote: > This avoids problems with Xen which hides some memory resources from the > OS and potentially also allows memory hotplug while this fixup is > enabled. The patch itself is OK, but the changelog doesn't say enough about what the problem is. I have no clue about what the Xen issue is or why limiting the BAR to 256GB avoids the problem or what this has to do with memory hotplug. For example, we should be able to tell why 256GB is the right number. Maybe there's something specific in Xen you can reference? Maybe an example of what goes wrong with some details? > Signed-off-by: Christian K?nig > --- > arch/x86/pci/fixup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c > index c817ab85dc82..149adbc7f2a3 100644 > --- a/arch/x86/pci/fixup.c > +++ b/arch/x86/pci/fixup.c > @@ -701,7 +701,7 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev) > res->name = "PCI Bus 0000:00"; > res->flags = IORESOURCE_PREFETCH | IORESOURCE_MEM | > IORESOURCE_MEM_64 | IORESOURCE_WINDOW; > - res->start = 0x100000000ull; > + res->start = 0xbd00000000ull; > res->end = 0xfd00000000ull - 1; > > /* Just grab the free area behind system memory for this */ > -- > 2.11.0 >