Message ID | 20220906085941.944592-7-Penny.Zheng@arm.com (mailing list archive) |
---|---|
State | Superseded |
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 dbb880b5f2..d0ff487cc6 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;