[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v10 3/9] x86/p2m: Short-circuit p2m_is_altp2m() when CONFIG_ALTP2M=n
From: Petr Beneš <w1benny@xxxxxxxxx> Wrap the p2m_is_altp2m() check with IS_ENABLED(CONFIG_ALTP2M) to allow the compiler to short-circuit the condition at build time when ALTP2M is disabled. Signed-off-by: Petr Beneš <w1benny@xxxxxxxxx> --- xen/arch/x86/include/asm/p2m.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/p2m.h b/xen/arch/x86/include/asm/p2m.h index 4358cc15a2..58b56e575e 100644 --- a/xen/arch/x86/include/asm/p2m.h +++ b/xen/arch/x86/include/asm/p2m.h @@ -437,7 +437,7 @@ static inline bool p2m_is_nestedp2m(const struct p2m_domain *p2m) static inline bool p2m_is_altp2m(const struct p2m_domain *p2m) { - return p2m->p2m_class == p2m_alternate; + return IS_ENABLED(CONFIG_ALTP2M) && p2m->p2m_class == p2m_alternate; } #ifdef CONFIG_HVM -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |