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

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