xen/arm: kernel: Rework kernel_zimage_load to use the generic copy helper
authorJulien Grall <julien.grall@linaro.org>
Tue, 12 Dec 2017 19:02:04 +0000 (19:02 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 12 Dec 2017 20:11:29 +0000 (12:11 -0800)
commitd8972aa9645f7c64f86a0c8a83f99643ee09b53f
tree0ec12f625f4dff8a8b2a3eb19b21c0e69fab6291
parent5302bd490bea7fe9b65181b4aea0a53aad2942ba
xen/arm: kernel: Rework kernel_zimage_load to use the generic copy helper

The function kernel_zimage is dealing with IPA but uses gvirt_to_maddr to
do the translation. This is currently working fine because the stage-1 MMU
is disabled.

Furthermore, the function is implementing its own copy to guest resulting
in code duplication and making more difficult to update the logic in
page-tables (such support for Populate On Demand).

The new copy_to_guest_phys_flush_dcache could be used here by
temporarily mapping the full kernel in the virtual space.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c
xen/arch/arm/kernel.c
xen/arch/arm/kernel.h