Skip to content
  • Eric Auger's avatar
    memory: allow memory_region_register_iommu_notifier() to fail · 549d4005
    Eric Auger authored
    
    
    Currently, when a notifier is attempted to be registered and its
    flags are not supported (especially the MAP one) by the IOMMU MR,
    we generally abruptly exit in the IOMMU code. The failure could be
    handled more nicely in the caller and especially in the VFIO code.
    
    So let's allow memory_region_register_iommu_notifier() to fail as
    well as notify_flag_changed() callback.
    
    All sites implementing the callback are updated. This patch does
    not yet remove the exit(1) in the amd_iommu code.
    
    in SMMUv3 we turn the warning message into an error message saying
    that the assigned device would not work properly.
    
    Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    549d4005