[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Juergen Gross <jgross@xxxxxxxx>
- Date: Wed, 8 Sep 2021 15:32:43 +0200
- Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, stable@xxxxxxxxxxxxxxx, Sander Eikelenboom <linux@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- Delivery-date: Wed, 08 Sep 2021 13:32:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
|