linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Juergen Gross <jgross@suse.com>
Subject: Re: [BISECTED] v4.15-rc: Boot regression on x86_64/AMD
Date: Tue, 9 Jan 2018 11:57:11 -0800	[thread overview]
Message-ID: <CA+55aFyQchgcmZFJqYD3jpka82G76SYs3dZka5v9_3q5=tJR2w@mail.gmail.com> (raw)
In-Reply-To: <5d794f18-f54c-3ca6-3869-5f5e2825b1ad@amd.com>

On Tue, Jan 9, 2018 at 11:31 AM, Christian König
<christian.koenig@amd.com> wrote:
>>
>> For example, was there a reason for that random 756GB address? Is the
>> limit of the particular AMD 64-bit bar perhaps at the 1TB mark (and
>> that "res->end" value is because "close to it, but not at the top")?
>
> That is actually a hardware limit documented in the BIOS and Kernel
> developers guide for AMD CPUs
> (https://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf).
>
> I should probably add a comment explaining this.

Ok, good. So at least some of those values have reasons.

And yes, documenting it would be great.

>> A starting point like "halfway to from the hardware limit" would
>> actually be a better reason. Or just "we picked an end-point, let's
>> pick a starting point that gives us a _sufficient_ - but not excessive
>> - window".
>
>
> Well that is exactly what the 256GB patch was doing.

Ahh, so 0xbd00000000ull is basically 256GB from the end point, and the
end point is basically specified by hardware.

So yes, I think that's a starting point that can at least be
explained: let's try to make it something "big enough" (and 256GB
seems to be big enough).

Of course, since this is all "pick a random number", maybe that breaks
something _else_.

We do traditionally have a very similar issue for the 32-bit PCI
starting address, where we used to have tons of issues with "we don't
know all resources, we want to try to come up with a range that is out
of the way".

There we try to find a big enough gap in th e820 memory map
(e820_search_gap()), and the end result is pci_mem_start (which is
then exposed as PCIBIOS_MIN_MEM to the PCI resource allocation).

If worst comes to worst, maybe we should look at having something
similar for the full 64-bit range.

             Linus

      reply	other threads:[~2018-01-09 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 22:04 [BISECTED] v4.15-rc: Boot regression on x86_64/AMD Aaro Koskinen
2018-01-06  0:00 ` Linus Torvalds
2018-01-06  2:10   ` Aaro Koskinen
2018-01-06 12:02     ` Aaro Koskinen
2018-01-06 16:47       ` Christian König
2018-01-06 17:58         ` Aaro Koskinen
2018-01-08 23:23   ` Bjorn Helgaas
2018-01-09 10:37     ` Christian König
2018-01-09 18:38       ` Bjorn Helgaas
2018-01-10 12:29         ` Christian König
2018-01-09 19:18       ` Linus Torvalds
2018-01-09 19:31         ` Christian König
2018-01-09 19:57           ` Linus Torvalds [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+55aFyQchgcmZFJqYD3jpka82G76SYs3dZka5v9_3q5=tJR2w@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=andy.shevchenko@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=christian.koenig@amd.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).