Re: [BISECTED] v4.15-rc: Boot regression on x86_64/AMD
From: Aaro Koskinen
Date: Fri Jan 05 2018 - 21:10:56 EST
Hi,
On Fri, Jan 05, 2018 at 04:00:25PM -0800, Linus Torvalds wrote:
> On Fri, Jan 5, 2018 at 2:04 PM, Aaro Koskinen <aaro.koskinen@xxxxxx> wrote:
> > After v4.14, I've been unable to boot my AMD compilation box with the
> > v4.15-rc mainline Linux. It just ends up in a silent reboot loop.
> >
> > I bisected this to:
> >
> > commit fa564ad9636651fd11ec2c79c48dee844066f73a
> > Author: Christian König <christian.koenig@xxxxxxx>
> > Date: Tue Oct 24 14:40:29 2017 -0500
> >
> > x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)
>
> Hmm. That was reported to break boot earlier already.
>
> The breakage was supposedly fixed by three patches from Christian:
>
> a19e2696135e: "x86/PCI: Only enable a 64bit BAR on single-socket AMD
> Family 15h"
>
> 470195f82e4e: "x86/PCI: Fix infinite loop in search for 64bit BAR placement"
>
> and a third one that was apparently never applied.
>
> I'm not sure why that third patch was never applied, I'm including it here.
>
> Does the system work for you if you apply that patch (instead of
> reverting all of them)?
Yes, I think it now works.
When booting with kexec from v4.14:
89876f275e8d562912d9c238cd888b52065cf25c alone ==> boot fails.
89876f275e8d562912d9c238cd888b52065cf25c and the patch ==> boot OK.
However, I noticed I cannot do multiple kexecs in a row - it works only
once, and the second one just silently fails/reboots the CPU regardless
what the kernel is. But this behaviour is already the same with v4.14. :-/
A.
> I wonder why that patch wasn't applied, but if it doesn't fix things,
> I think we do need to revert it all.
>
> Christian? Bjorn?
>
> Linus
> From e5d5c9682aa02a6b9c0c6bd446d433b924441679 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@xxxxxxx>
> Date: Tue, 28 Nov 2017 10:02:35 +0100
> Subject: [PATCH 3/3] x86/PCI: limit the size of the 64bit BAR to 256GB
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> This avoids problems with Xen which hides some memory resources from the
> OS and potentially also allows memory hotplug while this fixup is
> enabled.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> ---
> 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
>