From 512fa40867e6118568756a81ddaf476a0fef0f32 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Fri, 7 Apr 2017 18:59:08 +0800 Subject: memory: provide IOMMU_NOTIFIER_FOREACH macro A new macro is provided to iterate all the IOMMU notifiers hooked under specific IOMMU memory region. Reviewed-by: David Gibson Reviewed-by: Eric Auger Reviewed-by: \"Michael S. Tsirkin\" Signed-off-by: Peter Xu Message-Id: <1491562755-23867-3-git-send-email-peterx@redhat.com> Signed-off-by: Eduardo Habkost --- memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'memory.c') diff --git a/memory.c b/memory.c index 75ac595073..7496b3d3d5 100644 --- a/memory.c +++ b/memory.c @@ -1583,7 +1583,7 @@ static void memory_region_update_iommu_notify_flags(MemoryRegion *mr) IOMMUNotifierFlag flags = IOMMU_NOTIFIER_NONE; IOMMUNotifier *iommu_notifier; - QLIST_FOREACH(iommu_notifier, &mr->iommu_notify, node) { + IOMMU_NOTIFIER_FOREACH(iommu_notifier, mr) { flags |= iommu_notifier->notifier_flags; } @@ -1667,7 +1667,7 @@ void memory_region_notify_iommu(MemoryRegion *mr, request_flags = IOMMU_NOTIFIER_UNMAP; } - QLIST_FOREACH(iommu_notifier, &mr->iommu_notify, node) { + IOMMU_NOTIFIER_FOREACH(iommu_notifier, mr) { /* * Skip the notification if the notification does not overlap * with registered range. -- cgit v1.2.1