]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:50:08 +0000 (10:50 +0200)
commitee2b3f8c7eb3321b2c7372142180391255e8a470
treee200103901047c3813031a9a2688c97d9eacde4b
parent6b35a0aa3949f6efaa1704f10e144790894d689e
xen: adjust early dom0 p2m handling to xen hypervisor behavior

BugLink: http://bugs.launchpad.net/bugs/1692898
commit 69861e0a52f8733355ce246f0db15e1b240ad667 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/xen/mmu.c