linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	stable@vger.kernel.org, Sander Eikelenboom <linux@eikelenboom.it>,
	xen-devel@lists.xenproject.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests
Date: Wed, 8 Sep 2021 16:47:38 +0200	[thread overview]
Message-ID: <21bad77f-90fb-1288-be52-291b56ccdd40@suse.com> (raw)
In-Reply-To: <6862566d-4d55-dc5c-082a-da4fbcafcfce@suse.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1384 bytes --]

On 08.09.21 16:28, Jan Beulich wrote:
> On 08.09.2021 15:32, Juergen Gross wrote:
>> On 08.09.21 13:07, Jan Beulich wrote:
>>> On 08.09.2021 09:36, Juergen Gross wrote:
>>>> Commit 0881ace292b662 ("mm/mremap: use pmd/pud_poplulate to update page
>>>> table entries") introduced a regression when running as Xen PV guest.
>>>
>>> The description of that change starts with "pmd/pud_populate is the
>>> right interface to be used to set the respective page table entries."
>>> If this is deemed true, I don't think pmd_populate() should call
>>> paravirt_alloc_pte(): The latter function, as its name says, is
>>> supposed to be called for newly allocated page tables only (aiui).
>>
>> In theory you are correct, but my experience with reality tells me that
>> another set of macros for this case will not be appreciated.
> 
> Perhaps a new parameter to the macros / inlines identifying fresh
> vs moved? Or perhaps the offending change wasn't really correct in
> what its description said?

The problem is that those macros are spread over all architectures with
each architecture defining them separately. Changing all those will not
be really welcomed.

And the change was correct IMO, as the replaced pmd_set() should be used
for leaf entries only (at least in arch independent code).
pmd_populate() is the correct one for non-leaf entries.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

      reply	other threads:[~2021-09-08 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  7:36 [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests Juergen Gross
2021-09-08 11:07 ` Jan Beulich
2021-09-08 13:32   ` Juergen Gross
2021-09-08 14:28     ` Jan Beulich
2021-09-08 14:47       ` Juergen Gross [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=21bad77f-90fb-1288-be52-291b56ccdd40@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jbeulich@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=mingo@redhat.com \
    --cc=sstabellini@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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).