]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: adjust early dom0 p2m handling to xen hypervisor behavior
authorJuergen Gross <jgross@suse.com>
Wed, 10 May 2017 04:08:44 +0000 (06:08 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Sep 2017 04:38:00 +0000 (21:38 -0700)
commitfdc0d078531455d033ab82eb04ee616b87e8300d
tree564ba4798ea89a6e7ad0d1f425e2496994a3d600
parentae89ba3f3a3b0b68aa29c6c09361d32526b01fc7
xen: adjust early dom0 p2m handling to xen hypervisor behavior

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 <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
OraBug: 26662731

(cherry picked from commit 69861e0a52f8733355ce246f0db15e1b240ad667)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Conflicts:
arch/x86/xen/mmu_pv.c
(No mmu_pv.c in our tree)
arch/x86/xen/mmu.c