xen/arm: Extend copy_to_guest to support zeroing guest VA and use it
authorJulien Grall <julien.grall@linaro.org>
Tue, 12 Dec 2017 19:02:00 +0000 (19:02 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 12 Dec 2017 19:57:27 +0000 (11:57 -0800)
commit19de0359cf58d187b4fa50ede4e764e4715e4d69
tree43907c2559c134c279bb3e8690c443cc46c115f4
parentb324c511906694ee27f7f06bfe99f343e8509f64
xen/arm: Extend copy_to_guest to support zeroing guest VA and use it

The function copy_to_guest can easily be extended to support zeroing
guest VA. To avoid using a new bit, it is considered that a NULL buffer
(i.e buf == NULL) means the guest memory will be zeroed.

Lastly, reimplement raw_clear_guest using copy_to_guest.

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