Currently, all the new mappings will be read-write non-executable. Allow the caller to use other permissions.
Signed-off-by: Julien Grall <julien.gr...@arm.com> --- xen/arch/arm/mm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index cd7bcf7aca..fe0646002e 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1022,6 +1022,14 @@ static int create_xen_entries(enum xenmap_operation op, if ( op == RESERVE ) break; pte = mfn_to_xen_entry(mfn, PAGE_AI_MASK(flags)); + pte.pt.ro = PAGE_RO_MASK(flags); + pte.pt.xn = PAGE_XN_MASK(flags); + if ( !pte.pt.ro && !pte.pt.xn ) + { + printk("%s: Incorrect combination for addr=%lx\n", + __func__, addr); + return -EINVAL; + } pte.pt.table = 1; write_pte(entry, pte); break; -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel