xen/arm: if direct-map domain use native addresses for GICv3
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 14 Feb 2022 03:19:54 +0000 (03:19 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 17 Feb 2022 19:43:02 +0000 (19:43 +0000)
commit4809f9ec7d71bdf6fb9e952ac5730f5592c30ec7
treef88cc52dc3dedbefd4d547bc82b0ab1199d41233
parentba417313232b1ca4384a4d1f74dc1c1312dac70e
xen/arm: if direct-map domain use native addresses for GICv3

Today we use native addresses to map the GICv3 for Dom0 and fixed
addresses for DomUs.

This patch changes the behavior so that native addresses are used for
all domain which is using the host memory layout

Considering that DOM0 may not always be directly mapped in the future,
this patch introduces a new helper "domain_use_host_layout()" that
wraps both two check "is_domain_direct_mapped(d) || is_hardware_domain(d)"
for more flexible usage.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c
xen/arch/arm/include/asm/domain.h
xen/arch/arm/vgic-v3.c