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 15:32:43 +0200 [thread overview]
Message-ID: <34afed98-5072-c563-5d29-97e09a0b4ebd@suse.com> (raw)
In-Reply-To: <5a4859db-d173-88dd-5ea9-dd5fd893d934@suse.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1298 bytes --]
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.
>
>> Today pmd/pud_poplulate() for Xen PV assumes that the PFN inserted is
>> referencing a not yet used page table. In case of move_normal_pmd/pud()
>> this is not true, resulting in WARN splats like:
>
> I agree for the PMD part, but is including PUD here really correct?
> While I don't know why that is, xen_alloc_ptpage() pins L1 tables
> only. Hence a PUD update shouldn't be able to find a pinned L2
> table.
I agree that I should drop mentioning PUD here.
I will do that change when committing in case no other changes are
required.
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 --]
next prev parent reply other threads:[~2021-09-08 13:32 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 [this message]
2021-09-08 14:28 ` Jan Beulich
2021-09-08 14:47 ` Juergen Gross
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=34afed98-5072-c563-5d29-97e09a0b4ebd@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