• Felix Kuehling's avatar
    drm/amdkfd: Fix svm_range_is_same_attrs · f864df76
    Felix Kuehling authored
    The existing function doesn't compare the access bitmaps and flags.
    This can result in failure to update those attributes in existing
    ranges when all other attributes remained unchanged.
    
    Because the access and flags attributes modify only some bits in the
    respective bitmaps, we cannot compare them directly. Instead we need to
    check whether applying the attributes to a particular range would
    change the bitmaps.
    
    A PREFETCH_LOC attribute must always trigger a migration, even if the
    attribute value remains unchanged. E.g. if some pages were migrated due
    to a CPU page fault, a prefetch must still be executed to migrate pages
    back to VRAM.
    Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
    Reviewed-by: default avatarPhilip Yang <Philip.Yang@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f864df76
kfd_svm.c 93.9 KB