[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 18/39] 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> Acked-by: Julien Grall <julien.grall@xxxxxxx> --- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Julien Grall <julien.grall@xxxxxxx> --- v4: Moved the introduced macro from ./xen/arch/arm/p2m.c to ./xen/include/asm-arm/p2m.h as it will be used in multiple files in the following commits. --- xen/include/asm-arm/p2m.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index e8a2116081..d3467daacf 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -14,6 +14,9 @@ #define paddr_bits PADDR_BITS +#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) \ ({ \ ovttbr = READ_SYSREG64(VTTBR_EL2); \ -- 2.13.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |