From: Sergej Proskurin Date: Wed, 16 Aug 2017 13:17:34 +0000 (+0200) Subject: arm/lpae: Introduce lpae_is_page helper X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1651 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d33d5bcabf87744b9b39a9f97231acf1c6956849;p=xen.git arm/lpae: Introduce lpae_is_page helper This commit introduces a new helper that checks whether the target PTE holds a page mapping or not. This helper will be used as part of the following commits. Signed-off-by: Sergej Proskurin Reviewed-by: Julien Grall Signed-off-by: Stefano Stabellini --- diff --git a/xen/include/asm-arm/lpae.h b/xen/include/asm-arm/lpae.h index efec493313..118ee5ae1a 100644 --- a/xen/include/asm-arm/lpae.h +++ b/xen/include/asm-arm/lpae.h @@ -153,6 +153,11 @@ static inline bool lpae_is_superpage(lpae_t pte, unsigned int level) return (level < 3) && lpae_mapping(pte); } +static inline bool lpae_is_page(lpae_t pte, unsigned int level) +{ + return (level == 3) && lpae_valid(pte) && pte.walk.table; +} + /* * AArch64 supports pages with different sizes (4K, 16K, and 64K). To enable * page table walks for various configurations, the following helpers enable