From 12d37882f0c0def5dee1c21be5d8fea9c21baada Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Fri, 30 Dec 2016 18:09:18 +0800 Subject: memory: handle alias in memory_region_is_iommu() Cc: Paolo Bonzini Acked-by: Paolo Bonzini Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Peter Xu --- include/exec/memory.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 358edfbbc7..bec9756667 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -628,6 +628,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; } -- cgit v1.2.3