Message ID | 20220908135513.1800511-7-Penny.Zheng@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | static shared memory on dom0less system | expand |
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 4aab9b0865..a10d07266b 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -990,6 +990,15 @@ static int __init process_shm(struct domain *d, if ( ret ) return ret; } + + if ( owner_dom_io || (strcmp(role_str, "borrower") == 0) ) + { + /* Set up P2M foreign mapping for borrower domain. */ + ret = map_regions_p2mt(d, _gfn(PFN_UP(gbase)), PFN_DOWN(psize), + _mfn(PFN_UP(pbase)), p2m_map_foreign_rw); + if ( ret ) + return ret; + } } return 0;