]> www.infradead.org Git - users/dwmw2/linux.git/commit
xen/balloon: xen_shim_domain() support
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 4 Dec 2018 12:03:51 +0000 (07:03 -0500)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 20 Feb 2019 17:30:52 +0000 (12:30 -0500)
commit87c3247395befc56af2642ebc8a1cf5e65d42af6
tree00030a1533e28205b75ccf7e27d318af96b4b6bd
parent3426021d62739309799097fa1dd8be4e8752e9e4
xen/balloon: xen_shim_domain() support

Xen ballooning uses hollow struct pages (with the underlying PFNs being
populated/unpopulated via hypercalls) which are used by the grant logic
to map grants from other domains.

For purposes of a KVM based xen-shim, this model is not useful --
mapping is unnecessary since all guest memory is already mapped in the
KVM host. The simplest option is to just translate grant references to
GPAs (essentially a get_page() on the appropriate GPA.)

This patch provides an alternate balloon allocation mechanism where in
the allocation path we just provide a constant struct page
(corresponding to page 0.) This allows the calling code -- which does a
page_to_pfn() on the returned struct page -- to remain unchanged before
doing the grant operation (which in this case would fill in the real
struct page.)

Co-developed-by: Ankur Arora <ankur.a.arora@oracle.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
arch/x86/kvm/xen-shim.c
drivers/xen/balloon.c
include/xen/balloon.h