From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524AbdEJIJy (ORCPT ); Wed, 10 May 2017 04:09:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:46688 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752464AbdEJIJx (ORCPT ); Wed, 10 May 2017 04:09:53 -0400 Subject: Re: [Xen-devel] [PATCH] xen: adjust early dom0 p2m handling to xen hypervisor behavior To: Jan Beulich References: <20170510040844.24355-1-jgross@suse.com> <5912E54602000078001586EB@prv-mh.provo.novell.com> Cc: xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, linux-kernel@vger.kernel.org From: Juergen Gross Message-ID: <2ce280aa-678d-9f59-22bb-c9d6cca0a0d2@suse.com> Date: Wed, 10 May 2017 10:08:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <5912E54602000078001586EB@prv-mh.provo.novell.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/05/17 10:02, Jan Beulich wrote: >>>> On 10.05.17 at 06:08, wrote: >> When booted as pv-guest the p2m list presented by the Xen is already >> mapped to virtual addresses. In dom0 case the hypervisor might make use >> of 2M- or 1G-pages for this mapping. Unfortunately while being properly >> aligned in virtual and machine address space, those pages might not be >> aligned properly in guest physical address space. >> >> So when trying to obtain the guest physical address of such a page >> pud_pfn() and pmd_pfn() must be avoided as those will mask away guest >> physical address bits not being zero in this special case. >> >> Signed-off-by: Juergen Gross > > Reviewed-by: Jan Beulich > > Perhaps worth Cc-ing stable@ ? Any backport needs to be done manually, as mmu_pv.c has been introduced in 4.12 only. As soon as the patch is upstream I'm planning to do that (trivial) backport and send it to stable. Juergen