From: Julien Grall Date: Thu, 15 Sep 2016 11:28:21 +0000 (+0100) Subject: xen/arm: p2m: Add a back pointer to domain in p2m_domain X-Git-Tag: 4.8.0-rc1~130 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5e504b74371410e81e88f433eb8f4cfc36119b28;p=xen.git xen/arm: p2m: Add a back pointer to domain in p2m_domain The back pointer will be usefult later to get the domain when we only have the p2m in hand. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Tested-by: Tamas K Lengyel --- diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index fe0ed9fd3e..2bddcd7a46 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1391,6 +1391,7 @@ int p2m_init(struct domain *d) if ( rc != 0 ) return rc; + p2m->domain = d; p2m->max_mapped_gfn = _gfn(0); p2m->lowest_mapped_gfn = _gfn(ULONG_MAX); diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index d0dae2e2f4..44450455da 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -81,6 +81,9 @@ struct p2m_domain { * enough available bits to store this information. */ struct radix_tree_root mem_access_settings; + + /* back pointer to domain */ + struct domain *domain; }; /*