Skip to content

Commit

Permalink
memory: handle alias in memory_region_is_iommu()
Browse files Browse the repository at this point in the history
Cc: Paolo Bonzini <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
  • Loading branch information
jasowang authored and mstsirkin committed Jan 10, 2017
1 parent efcd38c commit 12d3788
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/exec/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 12d3788

Please sign in to comment.