On 10/9/26 20:04, Lorenzo Stoakes (ARM) wrote: > Now we have the expressive vma_is_mm_managed() and vma_is_fixed_mapping() > predicates, use them to determine whether to proceed with migration. This > drops the VMA_IO_BIT test, which is safe as mm-managed mappings may not set > it. > > hugetlb mappings remain excluded, as they are fixed mappings. > > No functional change intended. > > Reviewed-by: Zi Yan <[email protected]> > Acked-by: David Hildenbrand (Arm) <[email protected]> > Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]> > --- > mm/migrate_device.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/mm/migrate_device.c b/mm/migrate_device.c > index b9c453c28795..289d7b08ace4 100644 > --- a/mm/migrate_device.c > +++ b/mm/migrate_device.c > @@ -739,19 +739,21 @@ static void migrate_vma_unmap(struct migrate_vma > *migrate) > */ > int migrate_vma_setup(struct migrate_vma *args) > { > + const struct vm_area_struct *vma = args->vma; > long nr_pages = (args->end - args->start) >> PAGE_SHIFT; > > args->start &= PAGE_MASK; > args->end &= PAGE_MASK; > - if (!args->vma || vma_test_any_mask(args->vma, VMA_SPECIAL_FLAGS) || > - vma_is_dax(args->vma)) > + if (!vma) > + return -EINVAL; > + if (!vma_is_mm_managed(vma) || vma_is_fixed_mapping(vma) || > + vma_is_dax(vma))
Same here, with the droppable thing changed this would be !vma_is_mm_backed() || vma_is_dax(vma) I guess. Acked-by: David Hildenbrand (Arm) <[email protected]> -- Cheers, David
