Skip to content
Snippets Groups Projects
Commit f1f93650 authored by Alexey Kardashevskiy's avatar Alexey Kardashevskiy Committed by Alex Williamson
Browse files

vfio: Check that IOMMU MR translates to system address space


At the moment IOMMU MR only translate to the system memory.
However if some new code changes this, we will need clear indication why
it is not working so here is the check.

Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent d78c19b5
No related branches found
No related tags found
No related merge requests found
......@@ -269,6 +269,12 @@ static void vfio_iommu_map_notify(Notifier *n, void *data)
trace_vfio_iommu_map_notify(iova, iova + iotlb->addr_mask);
if (iotlb->target_as != &address_space_memory) {
error_report("Wrong target AS \"%s\", only system memory is allowed",
iotlb->target_as->name ? iotlb->target_as->name : "none");
return;
}
/*
* The IOMMU TLB entry we have just covers translation through
* this IOMMU to its immediate target. We need to translate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment