summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2017-04-07 18:59:08 +0800
committerEduardo Habkost <ehabkost@redhat.com>2017-04-20 15:22:41 -0300
commit512fa40867e6118568756a81ddaf476a0fef0f32 (patch)
tree4a3f9e6a008efcbe5a3c7b489d2693d2a41c7467 /memory.c
parent698feb5e13a2d763369909ce33f2bd7a7c1c11c0 (diff)
downloadqemu-512fa40867e6118568756a81ddaf476a0fef0f32.tar.gz
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 <david@gibson.dropbear.id.au> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: \"Michael S. Tsirkin\" <mst@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1491562755-23867-3-git-send-email-peterx@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c4
1 files changed, 2 insertions, 2 deletions
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.