xen/altp2m: set access_required properly for all altp2ms
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Thu, 28 Jun 2018 07:54:01 +0000 (10:54 +0300)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 23 Jul 2018 11:15:09 +0000 (12:15 +0100)
commit61bdddb82151fbf51c58f6ebc1b4a687942c45a8
treef2c7c9910cbbf8edaf27bedf933961002d30831c
parent890b9b8075121c8c2f99ff6135cd1581bc5cb383
xen/altp2m: set access_required properly for all altp2ms

For the hostp2m, access_required starts off as 0, then it can be
set with xc_domain_set_access_required(). However, all the altp2ms
set it to 1 on init, and ignore both the hostp2m and the hypercall.
This patch sets access_required to the value from the hostp2m
on altp2m init, and propagates the values received via hypercall
to all the active altp2ms, when applicable.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/mem_access.c
xen/arch/x86/mm/mem_access.c
xen/arch/x86/mm/p2m.c
xen/common/domctl.c
xen/include/xen/domain.h