linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: "Singh, Brijesh" <brijesh.singh@amd.com>,
	"x86@kernel.org" <x86@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Dan Williams <dan.j.williams@intel.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Lendacky, Thomas" <Thomas.Lendacky@amd.com>
Subject: Re: [PATCH v3] x86: mm: Do not use set_{pud,pmd}_safe when splitting the large page
Date: Wed, 17 Apr 2019 10:24:24 -0700	[thread overview]
Message-ID: <ae2c9081-f61c-a33a-67f0-2e05ef702e61@intel.com> (raw)
In-Reply-To: <20190417154102.22613-1-brijesh.singh@amd.com>

On 4/17/19 8:41 AM, Singh, Brijesh wrote:
> Changes since v2:
> - rename variable safe->init
> - rename __set_* -> set_*_init()
> - remame __*_populate -> *_populate_init()

"init" in this context really means "setting non-present PTEs is OK, but
changing present ones is not".  It still doesn't do a great job of
conveying that because both the init=0 and init=1 variants are used
during init-time.

> +/*
> + * Create page table mapping for the physical memory for specific physical
> + * addresses. The virtual and physical addresses have to be aligned on PMD level
> + * down. It returns the last physical address mapped.
> + */
> +unsigned long __meminit
> +kernel_physical_mapping_init(unsigned long paddr_start,
> +			     unsigned long paddr_end,
> +			     unsigned long page_size_mask)
> +{
> +	return __kernel_physical_mapping_init(paddr_start, paddr_end,
> +					      page_size_mask, true);
> +}

The comment here is missing one key point:
kernel_physical_mapping_init() can only be used to populate non-present
entries.  It kinda infers that from "Create...", but I really think we
need to be explicit.

Anyway, it's better than it was, and it does fix a bug, so:

Reviewed-by: Dave Hansen <dave.hansen@intel.com>

But please flesh out that comment if you do another version for some reason.

  reply	other threads:[~2019-04-17 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 15:41 [PATCH v3] x86: mm: Do not use set_{pud,pmd}_safe when splitting the large page Singh, Brijesh
2019-04-17 17:24 ` Dave Hansen [this message]
2019-05-03 15:28   ` Singh, Brijesh
2019-05-09 11:04 ` [tip:x86/urgent] x86/mm: Do not use set_{pud, pmd}_safe() when splitting a " tip-bot for Brijesh Singh

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=ae2c9081-f61c-a33a-67f0-2e05ef702e61@intel.com \
    --to=dave.hansen@intel.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=hpa@zytor.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).