[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/arm: set up shared memory foreign mapping for borrower domain
commit b7133c10a3fd3b66b8d6a657a55855ab78f0a75b Author: Penny Zheng <Penny.Zheng@xxxxxxx> AuthorDate: Thu Sep 8 21:55:10 2022 +0800 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Fri Sep 9 12:58:00 2022 -0700 xen/arm: set up shared memory foreign mapping for borrower domain This commit sets up shared memory foreign mapping for borrower domain. If owner domain is the default dom_io, all shared domain are treated as borrower domain. Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/arch/arm/domain_build.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 417a0e82ba..dfcda604b3 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -992,6 +992,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; -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |