xen/pvh: Move Xen code for getting mem map via hcall out of common file
authorMaran Wilson <maran.wilson@oracle.com>
Mon, 10 Dec 2018 19:08:46 +0000 (11:08 -0800)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 13 Dec 2018 18:41:49 +0000 (13:41 -0500)
commita43fb7da53007e67ad593e179f01a1925b04f586
tree75e7796e7c70cddb2a150cfd627dad8c3e6b5723
parent8cee3974b35bfb235d4637e10de5c5b364a9057e
xen/pvh: Move Xen code for getting mem map via hcall out of common file

We need to refactor PVH entry code so that support for other hypervisors
like Qemu/KVM can be added more easily.

The original design for PVH entry in Xen guests relies on being able to
obtain the memory map from the hypervisor using a hypercall. When we
extend the PVH entry ABI to support other hypervisors like Qemu/KVM,
a new mechanism will be added that allows the guest to get the memory
map without needing to use hypercalls.

For Xen guests, the hypercall approach will still be supported. In
preparation for adding support for other hypervisors, we can move the
code that uses hypercalls into the Xen specific file. This will allow us
to compile kernels in the future without CONFIG_XEN that are still capable
of being booted as a Qemu/KVM guest via the PVH entry point.

Signed-off-by: Maran Wilson <maran.wilson@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/platform/pvh/enlighten.c
arch/x86/xen/enlighten_pvh.c