memory: handle alias in memory_region_is_iommu()

Backports commit 12d37882f0c0def5dee1c21be5d8fea9c21baada from qemu
This commit is contained in:
Jason Wang 2018-03-01 13:06:13 -05:00 committed by Lioncash
parent fdca6292a1
commit 29932d0719
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -577,6 +577,9 @@ static inline bool memory_region_is_romd(MemoryRegion *mr)
*/
static inline bool memory_region_is_iommu(MemoryRegion *mr)
{
if (mr->alias) {
return memory_region_is_iommu(mr->alias);
}
return mr->iommu_ops;
}