[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: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 8 Sep 2021 13:07:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ibZZSZDjrGpS0aAvSHO8S3jjjnBSNdFfyqK0ghkhpSU=; b=n89IR/s7EENoYKOP7zqcqikiBQa/6U6Pw4yVEdVkTg8cbR9YPGOSs0HnnBtKfbcgehC1QJqFZNZV3QKsTcV33Lh+nxu2A7HS4KKOv5CDcAox8Wvx+zLTdfdSdEeTs2DCBbmfslPOzNS6uJ4PlVZQST8ZBDAcyjsoeVp05mpI74zJxz3fZMFLP/pTgrzbFhKuKu1C0gWPHlVGDtkX3DUHE9SkK1gEt5/u9nDdhiuOsX6gBTaRUvl08uEZX/sHnBjhohkHsn3Y/5gcNA09zkxX+snyF7OnLfTNsUAs5+mGKv2zFmc25Jv92/CIngsaw2urYRSLshpaHPeEOLPyU69sXg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kojxzyUv9/2zTUos7IKE2PwBZBeC1HlpRWqMgCscqEGqwe9gqo9u9UcE3l8ihbkaLQkmIILrOtp4QUsoDQauqiEQOcXIwgkB2NOYPt9gXsxirqbLD2aXhtzNU8/m5Q0mfYTdG2O77qNaI6KyBg9N+TIroLI4gENyN8pWk/iJlyMsCxQa4q604fSpGIGsBkvEwyvKaSI0jinFMvHG1DFui9xX/BBDeAkQunSFay5EPxvrIy6erJU6jRVSq1tTkZR7YsvDteG7UmQOBRikyzyEBZPesINpud4IW+jn4vJ2KWBuWHwKK4Tnj9z1inzI48q+DMo0eYHvW8u1wNfwtw+c9A==
  • Authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=suse.com;
  • 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 11:08:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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).

> 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




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.