[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 20/38] arm/p2m: Add p2m_get_active_p2m macro
This commit introduces the macro "p2m_get_active_p2m" returning the currently active (alt)p2m. The need for this macro will be shown in the following commits. Signed-off-by: Sergej Proskurin <proskurin@xxxxxxxxxxxxx> --- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Julien Grall <julien.grall@xxxxxxx> --- xen/arch/arm/p2m.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 63c0df0..12b3dcc 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -29,6 +29,9 @@ static unsigned int __read_mostly p2m_root_level; #define P2M_ROOT_PAGES (1<<P2M_ROOT_ORDER) +#define p2m_get_active_p2m(v) unlikely(altp2m_active(v->domain)) ? \ + altp2m_get_altp2m(v) : p2m_get_hostp2m(v->domain); + #define p2m_switch_vttbr_and_get_flags(ovttbr, nvttbr, flags) \ ({ \ if ( ovttbr != nvttbr ) \ -- 2.9.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |