mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arvind Sankar <nivedita@alum.mit.edu>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	linux-efi <linux-efi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] x86/mm/pat: Handle no-GBPAGES case correctly in populate_pud
Date: Wed, 4 Mar 2020 14:10:53 -0500	[thread overview]
Message-ID: <20200304191053.GA291311@rani.riverdale.lan> (raw)
In-Reply-To: <CAKv+Gu-6YoJMLbR8UUsBeRPzk7r_4aKBprqay2kf6cKMPwsHgQ@mail.gmail.com>

On Wed, Mar 04, 2020 at 08:04:04PM +0100, Ard Biesheuvel wrote:
> On Wed, 4 Mar 2020 at 19:50, Arvind Sankar <nivedita@alum.mit.edu> wrote:
> >
> > On Wed, Mar 04, 2020 at 07:44:50PM +0100, Ard Biesheuvel wrote:
> > >
> > > I've tried a couple of different ways, but I can't seem to get my
> > > memory map organized in the way that will trigger the error.
> >
> > What does yours look like? efi_merge_regions doesn't merge everything
> > that will eventually be mapped the same way, so if there are some
> > non-conventional memory regions scattered over the address space, it
> > might be breaking up the mappings to the point where this doesn't
> > trigger.
> 
> I have a region
> 
> [    0.000000] efi: mem07: [Conventional Memory|   |  |  |  |  |  |  |
>  |   |WB|WT|WC|UC] range=[0x0000000001400000-0x00000000b9855fff]
> (2948MB)
> 
> which gets covered correctly
> 
> [    0.401766] 0x0000000000a00000-0x0000000040000000        1014M
> RW         PSE         NX pmd
> [    0.403436] 0x0000000040000000-0x0000000080000000           1G
> RW         PSE         NX pud
> [    0.404645] 0x0000000080000000-0x00000000b9800000         920M
> RW         PSE         NX pmd
> [    0.405844] 0x00000000b9800000-0x00000000b9a00000           2M
> RW                     NX pte
> [    0.407436] 0x00000000b9a00000-0x00000000baa00000          16M
> ro         PSE         x  pmd
> [    0.408591] 0x00000000baa00000-0x00000000bbe00000          20M
> RW         PSE         NX pmd
> [    0.409751] 0x00000000bbe00000-0x00000000bc000000           2M
> RW                     NX pte
> [    0.410821] 0x00000000bc000000-0x00000000be600000          38M
> RW         PSE         NX pmd
> 
> However, the fact that you can provide a case where it does fail
> should be sufficient justification for taking this patch. I was just
> trying to give more than a regression-tested-by

No, this case is exactly one that should break. But I think you're
running on a processor model that _does_ support GB pages, as shown by
the "pud" mapping there for the 1G-2G range.

At least for my version of qemu, -cpu Haswell does not enable the
pdpe1gb feature. Which cpu did you specify?

Thanks.

  reply	other threads:[~2020-03-04 19:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 20:54 [PATCH 0/4] Bugfix + small cleanup to populate_p[mug]d Arvind Sankar
2020-03-03 20:54 ` [PATCH 1/4] x86/mm/pat: Handle no-GBPAGES case correctly in populate_pud Arvind Sankar
2020-03-04  8:17   ` Ard Biesheuvel
2020-03-04 15:49     ` Arvind Sankar
2020-03-04 18:44       ` Ard Biesheuvel
2020-03-04 18:50         ` Arvind Sankar
2020-03-04 19:04           ` Ard Biesheuvel
2020-03-04 19:10             ` Arvind Sankar [this message]
2020-03-04 19:22               ` Ard Biesheuvel
2020-03-04 19:54                 ` Arvind Sankar
2020-03-04 21:51                   ` Ard Biesheuvel
2020-03-04 22:40                     ` Arvind Sankar
2020-03-03 20:54 ` [PATCH 2/4] x86/mm/pat: Ensure that populate_pud only handles one PUD Arvind Sankar
2020-03-03 20:54 ` [PATCH 3/4] x86/mm/pat: Propagate all errors out of populate_pud Arvind Sankar
2020-03-03 20:54 ` [PATCH 4/4] x86/mm/pat: Make num_pages consistent in populate_{pte,pud,pgd} Arvind Sankar
2020-03-04 22:38 ` [PATCH 0/4] Bugfix + small cleanup to populate_p[mug]d Ard Biesheuvel

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=20200304191053.GA291311@rani.riverdale.lan \
    --to=nivedita@alum.mit.edu \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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

all inboxes | Powered by JetHome®