Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] xen: missing hw_pte_t conversion for x86 Xen callbacks --
commit cf1ba61f002ea6950852250dfd8d5d0a5b979c23 Author: Muhammad Usama Anjum <[email protected]> xen: use hw_pte_t for PTE range callbacks This commit updates Xen callbacks to use the hw_pte_t pointer type, matching the updated generic PTE range and remapping helpers. It maintains software PTE values as pte_t to support architectures that select the distinct hw_pte_t wrapper. > Generic PTE range and remapping helpers now pass pointers to PTE table > storage as hw_pte_t *. Update the Xen callbacks to match those interfaces. > > Keep software PTE values as pte_t and continue to access them through the > existing PTE helpers. This is required when Xen is built for an > architecture that selects the distinct hw_pte_t wrapper. > > Reviewed-by: Juergen Gross <[email protected]> > Signed-off-by: Muhammad Usama Anjum <[email protected]> [Severity: Low] Were some x86-specific Xen callbacks missed in this conversion? Looking at the source, these two callbacks appear to still use the old pte_t * type signature instead of hw_pte_t *: arch/x86/xen/grant-table.c:gnttab_apply() arch/x86/xen/mmu_pv.c:remap_area_pfn_pte_fn() While this currently compiles because x86 aliases hw_pte_t to pte_t, it looks like it violates the generic API contract since they are passed to apply_to_page_range(). Could this cause a build or CFI failure if x86 ever opts into ARCH_HAS_HW_PTE_T? > diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c > index 1dcc4675580ed..b013bcad99b5b 100644 > --- a/drivers/xen/gntdev.c > +++ b/drivers/xen/gntdev.c > @@ -301,7 +301,7 @@ void gntdev_put_map(struct gntdev_priv *priv, struct > gntdev_grant_map *map) > > /* ------------------------------------------------------------------ */ > > -static int find_grant_ptes(pte_t *pte, unsigned long addr, void *data) > +static int find_grant_ptes(hw_pte_t *pte, unsigned long addr, void *data) > { > struct gntdev_grant_map *map = data; [ ... ] -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=9
