linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Borislav Petkov <bp@suse.de>,
	Brijesh Singh <brijesh.singh@amd.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/mm: Rewrite sme_populate_pgd() in a more sensible way
Date: Mon, 4 Dec 2017 17:57:55 +0300	[thread overview]
Message-ID: <20171204145755.6xu2w6a6og56rq5v@node.shutemov.name> (raw)
In-Reply-To: <d177df77-cdc7-1507-08f8-fcdb3b443709@amd.com>

On Mon, Dec 04, 2017 at 08:19:11AM -0600, Tom Lendacky wrote:
> On 12/4/2017 5:23 AM, Kirill A. Shutemov wrote:
> > sme_populate_pgd() open-codes a lot of things that are not needed to be
> > open-coded.
> > 
> > Let's rewrite it in a more stream-lined way.
> > 
> > This would also buy us boot-time switching between support between
> > paging modes, when rest of the pieces will be upstream.
> 
> Hi Kirill,
> 
> Unfortunately, some of these can't be changed.  The use of p4d_offset(),
> pud_offset(), etc., use non-identity mapped virtual addresses which cause
> failures at this point of the boot process.

Wat? Virtual address is virtual address. p?d_offset() doesn't care about
what mapping you're using.

> Also, calls such as __p4d(), __pud(), etc., are part of the paravirt
> support and can't be used yet, either. 

Yeah, I missed this. native_make_p?d() has to be used instead.

> I can take a closer look at some of the others (p*d_none() and
> p*d_large()) which make use of the native_ macros, but my worry would be
> that these get changed in the future to the non-native calls and then
> boot failures occur.

If you want to avoid paravirt altogher for whole compilation unit, one
more option would be to put #undef CONFIG_PARAVIRT before all includes.
That's hack, but it works. We already use this in arch/x86/boot/compressed
code.

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-12-04 14:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 11:23 Kirill A. Shutemov
2017-12-04 14:19 ` Tom Lendacky
2017-12-04 14:57   ` Kirill A. Shutemov [this message]
2017-12-04 16:00     ` Tom Lendacky
2017-12-04 16:34       ` Kirill A. Shutemov
2017-12-04 17:39         ` Kirill A. Shutemov
2017-12-04 17:50           ` Kirill A. Shutemov
2017-12-08 14:37           ` Tom Lendacky
2017-12-12 11:39             ` Kirill A. Shutemov
2017-12-04 18:33         ` Tom Lendacky
2017-12-04 18:50           ` Kirill A. Shutemov
2017-12-08 14:43             ` Tom Lendacky

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=20171204145755.6xu2w6a6og56rq5v@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=bp@suse.de \
    --cc=brijesh.singh@amd.com \
    --cc=hpa@zytor.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --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