]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/balloon: Don't rely on the page granularity is the same for Xen and Linux
authorJulien Grall <julien.grall@citrix.com>
Mon, 4 May 2015 14:39:08 +0000 (15:39 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Sun, 27 Mar 2016 01:01:10 +0000 (02:01 +0100)
commitb14ffd2052cf75a21385ed2640774b8944eda11e
tree0a6a7e17289d5e592575260fc5ffac686c07281a
parent78c7467d323cf341c0899fa8627f4b49c1dfd0f6
xen/balloon: Don't rely on the page granularity is the same for Xen and Linux

For ARM64 guests, Linux is able to support either 64K or 4K page
granularity. Although, the hypercall interface is always based on 4K
page granularity.

With 64K page granularity, a single page will be spread over multiple
Xen frame.

To avoid splitting the page into 4K frame, take advantage of the
extent_order field to directly allocate/free chunk of the Linux page
size.

Note that PVMMU is only used for PV guest (which is x86) and the page
granularity is always 4KB. Some BUILD_BUG_ON has been added to ensure
that because the code has not been modified.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 30756c62997822894fb34e2114f5dc727a12af30)
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
drivers/xen/balloon.c