Message ID | 20160526180137.13473.59414.stgit@gimli.home (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index e2d5a8d..e51ed3a 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -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