xen/riscv: use pte_is_valid() in pte_is_mapping()

Use pte_is_valid() instead of open-coding the PTE_VALID check.

No functional change.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Baptiste Le Duc authored and Jan Beulich committed 2026-10-27 08:58:06 +01:00
1 parent 5e529e4e7b
commit 999c2ca1ab
1 file changed
+1 -1
+1 -1
View File
@@ -187,7 +187,7 @@ static inline bool pte_is_mapping(pte_t p)
/* See pte_is_table() */
ASSERT(((p.pte & PAGE_HYPERVISOR_RW) != (PTE_VALID | PTE_WRITABLE)));
return (p.pte & PTE_VALID) && (p.pte & PTE_ACCESS_MASK);
return pte_is_valid(p) && (p.pte & PTE_ACCESS_MASK);
}
static inline bool pte_is_superpage(pte_t p, unsigned int level)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.