[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/p2m: Short-circuit p2m_is_altp2m() when CONFIG_ALTP2M=n
commit 58443f14b395d4a700ebbd3a37340f1d345620bb Author: Petr Beneš <w1benny@xxxxxxxxx> AuthorDate: Wed Jul 23 15:22:24 2025 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Jul 23 15:22:24 2025 +0200 x86/p2m: Short-circuit p2m_is_altp2m() when CONFIG_ALTP2M=n 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> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- 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 -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |