Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752580AbdLKPFB (ORCPT ); Mon, 11 Dec 2017 10:05:01 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35822 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553AbdLKPE5 (ORCPT ); Mon, 11 Dec 2017 10:04:57 -0500 X-Google-Smtp-Source: ACJfBou9XCXTQX/OOwJpfo56hFnsf1IYj7eNuD6WZOv0YL824Ak2TXijx7TX87Omd0Ihi+CpWvmDQQ== From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: helgaas@kernel.org Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/PCI: limit the size of the 64bit BAR to 256GB Date: Mon, 11 Dec 2017 16:04:52 +0100 Message-Id: <20171211150452.23518-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1028 Lines: 28 Xen hides a bit of system memory from the OS for its own purpose by intercepting e820. This memory is unfortunately not reported as reserved, but rather completely invisible. Avoid this address space collision and possible similar problems by limiting the size of the newly allocated root hub window to 256GB which should be sufficient for the short term. 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 8f86060f5cf6..ed8bc6ab0573 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -702,7 +702,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