Blame SOURCES/kvm-memory-Rename-memory_region_notify_one-to-memory_reg.patch

c687bc
From e876535fd5ed10abf0dbeb55ec7098664412068e Mon Sep 17 00:00:00 2001
c687bc
From: eperezma <eperezma@redhat.com>
c687bc
Date: Tue, 12 Jan 2021 14:36:34 -0500
c687bc
Subject: [PATCH 10/17] memory: Rename memory_region_notify_one to
c687bc
 memory_region_notify_iommu_one
c687bc
MIME-Version: 1.0
c687bc
Content-Type: text/plain; charset=UTF-8
c687bc
Content-Transfer-Encoding: 8bit
c687bc
c687bc
RH-Author: eperezma <eperezma@redhat.com>
c687bc
Message-id: <20210112143638.374060-10-eperezma@redhat.com>
c687bc
Patchwork-id: 100602
c687bc
O-Subject: [RHEL-8.4.0 qemu-kvm PATCH v2 09/13] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one
c687bc
Bugzilla: 1843852
c687bc
RH-Acked-by: Xiao Wang <jasowang@redhat.com>
c687bc
RH-Acked-by: Peter Xu <peterx@redhat.com>
c687bc
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
c687bc
c687bc
Previous name didn't reflect the iommu operation.
c687bc
c687bc
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
c687bc
Reviewed-by: Peter Xu <peterx@redhat.com>
c687bc
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
c687bc
Reviewed-by: Juan Quintela <quintela@redhat.com>
c687bc
Reviewed-by: Eric Auger <eric.auger@redhat.com>
c687bc
Acked-by: Jason Wang <jasowang@redhat.com>
c687bc
Message-Id: <20201116165506.31315-2-eperezma@redhat.com>
c687bc
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
c687bc
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
c687bc
(cherry picked from commit 3b5ebf8532afdc1518bd8b0961ed802bc3f5f07c)
c687bc
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
c687bc
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
c687bc
---
c687bc
 hw/arm/smmu-common.c  | 2 +-
c687bc
 hw/arm/smmuv3.c       | 2 +-
c687bc
 hw/i386/intel_iommu.c | 4 ++--
c687bc
 include/exec/memory.h | 6 +++---
c687bc
 memory.c              | 6 +++---
c687bc
 5 files changed, 10 insertions(+), 10 deletions(-)
c687bc
c687bc
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
c687bc
index 9780404f002..dfabe381182 100644
c687bc
--- a/hw/arm/smmu-common.c
c687bc
+++ b/hw/arm/smmu-common.c
c687bc
@@ -471,7 +471,7 @@ static void smmu_unmap_notifier_range(IOMMUNotifier *n)
c687bc
     entry.perm = IOMMU_NONE;
c687bc
     entry.addr_mask = n->end - n->start;
c687bc
 
c687bc
-    memory_region_notify_one(n, &entry);
c687bc
+    memory_region_notify_iommu_one(n, &entry);
c687bc
 }
c687bc
 
c687bc
 /* Unmap all notifiers attached to @mr */
c687bc
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
c687bc
index a418fab2aa6..ef8a877c5d8 100644
c687bc
--- a/hw/arm/smmuv3.c
c687bc
+++ b/hw/arm/smmuv3.c
c687bc
@@ -811,7 +811,7 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr,
c687bc
     entry.addr_mask = num_pages * (1 << granule) - 1;
c687bc
     entry.perm = IOMMU_NONE;
c687bc
 
c687bc
-    memory_region_notify_one(n, &entry);
c687bc
+    memory_region_notify_iommu_one(n, &entry);
c687bc
 }
c687bc
 
c687bc
 /* invalidate an asid/iova range tuple in all mr's */
c687bc
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
c687bc
index 43c94b993b4..463f107ad12 100644
c687bc
--- a/hw/i386/intel_iommu.c
c687bc
+++ b/hw/i386/intel_iommu.c
c687bc
@@ -3431,7 +3431,7 @@ static void vtd_address_space_unmap(VTDAddressSpace *as, IOMMUNotifier *n)
c687bc
         /* This field is meaningless for unmap */
c687bc
         entry.translated_addr = 0;
c687bc
 
c687bc
-        memory_region_notify_one(n, &entry);
c687bc
+        memory_region_notify_iommu_one(n, &entry);
c687bc
 
c687bc
         start += mask;
c687bc
         remain -= mask;
c687bc
@@ -3469,7 +3469,7 @@ static void vtd_address_space_refresh_all(IntelIOMMUState *s)
c687bc
 
c687bc
 static int vtd_replay_hook(IOMMUTLBEntry *entry, void *private)
c687bc
 {
c687bc
-    memory_region_notify_one((IOMMUNotifier *)private, entry);
c687bc
+    memory_region_notify_iommu_one((IOMMUNotifier *)private, entry);
c687bc
     return 0;
c687bc
 }
c687bc
 
c687bc
diff --git a/include/exec/memory.h b/include/exec/memory.h
c687bc
index e499dc215b3..b6466ab6d57 100644
c687bc
--- a/include/exec/memory.h
c687bc
+++ b/include/exec/memory.h
c687bc
@@ -226,7 +226,7 @@ enum IOMMUMemoryRegionAttr {
c687bc
  * The IOMMU implementation must use the IOMMU notifier infrastructure
c687bc
  * to report whenever mappings are changed, by calling
c687bc
  * memory_region_notify_iommu() (or, if necessary, by calling
c687bc
- * memory_region_notify_one() for each registered notifier).
c687bc
+ * memory_region_notify_iommu_one() for each registered notifier).
c687bc
  *
c687bc
  * Conceptually an IOMMU provides a mapping from input address
c687bc
  * to an output TLB entry. If the IOMMU is aware of memory transaction
c687bc
@@ -1067,7 +1067,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
c687bc
                                 IOMMUTLBEntry entry);
c687bc
 
c687bc
 /**
c687bc
- * memory_region_notify_one: notify a change in an IOMMU translation
c687bc
+ * memory_region_notify_iommu_one: notify a change in an IOMMU translation
c687bc
  *                           entry to a single notifier
c687bc
  *
c687bc
  * This works just like memory_region_notify_iommu(), but it only
c687bc
@@ -1078,7 +1078,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
c687bc
  *         replaces all old entries for the same virtual I/O address range.
c687bc
  *         Deleted entries have .@perm == 0.
c687bc
  */
c687bc
-void memory_region_notify_one(IOMMUNotifier *notifier,
c687bc
+void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
c687bc
                               IOMMUTLBEntry *entry);
c687bc
 
c687bc
 /**
c687bc
diff --git a/memory.c b/memory.c
c687bc
index 06484c2bff2..43bd3359bf8 100644
c687bc
--- a/memory.c
c687bc
+++ b/memory.c
c687bc
@@ -1911,8 +1911,8 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr,
c687bc
     memory_region_update_iommu_notify_flags(iommu_mr, NULL);
c687bc
 }
c687bc
 
c687bc
-void memory_region_notify_one(IOMMUNotifier *notifier,
c687bc
-                              IOMMUTLBEntry *entry)
c687bc
+void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
c687bc
+                                    IOMMUTLBEntry *entry)
c687bc
 {
c687bc
     IOMMUNotifierFlag request_flags;
c687bc
     hwaddr entry_end = entry->iova + entry->addr_mask;
c687bc
@@ -1948,7 +1948,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
c687bc
 
c687bc
     IOMMU_NOTIFIER_FOREACH(iommu_notifier, iommu_mr) {
c687bc
         if (iommu_notifier->iommu_idx == iommu_idx) {
c687bc
-            memory_region_notify_one(iommu_notifier, &entry);
c687bc
+            memory_region_notify_iommu_one(iommu_notifier, &entry);
c687bc
         }
c687bc
     }
c687bc
 }
c687bc
-- 
c687bc
2.27.0
c687bc