qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: tianyu.lan@intel.com, Paolo Bonzini <pbonzini@redhat.com>,
	kevin.tian@intel.com, yi.l.liu@intel.com, peterx@redhat.com,
	Jason Wang <jasowang@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: [Qemu-devel] [RFC PATCH 4/8] memory: rename *_notify_iommu*
Date: Thu, 27 Apr 2017 17:34:16 +0800	[thread overview]
Message-ID: <1493285660-4470-5-git-send-email-peterx@redhat.com> (raw)
In-Reply-To: <1493285660-4470-1-git-send-email-peterx@redhat.com>

Actually it's notifying IOTLB updates (map, or unmap). Let's be explicit
on the wording - replacing it with *_notify_iotlb*.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 hw/i386/intel_iommu.c    |  8 ++++----
 hw/ppc/spapr_iommu.c     |  2 +-
 hw/s390x/s390-pci-inst.c |  2 +-
 include/exec/memory.h    | 12 ++++++------
 memory.c                 |  8 ++++----
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 3306e6a..609732b 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1205,7 +1205,7 @@ static void vtd_iotlb_domain_invalidate(IntelIOMMUState *s, uint16_t domain_id)
 static int vtd_page_invalidate_notify_hook(IOMMUTLBEntry *entry,
                                            void *private)
 {
-    memory_region_notify_iommu((MemoryRegion *)private, *entry);
+    memory_region_notify_iotlb((MemoryRegion *)private, *entry);
     return 0;
 }
 
@@ -1709,7 +1709,7 @@ static bool vtd_process_device_iotlb_desc(IntelIOMMUState *s,
     entry.iova = addr;
     entry.perm = IOMMU_NONE;
     entry.translated_addr = 0;
-    memory_region_notify_iommu(&vtd_dev_as->iommu, entry);
+    memory_region_notify_iotlb(&vtd_dev_as->iommu, entry);
 
 done:
     return true;
@@ -2752,7 +2752,7 @@ static void vtd_address_space_unmap(VTDAddressSpace *as, IOMMUMRNotifier *n)
                              VTD_PCI_FUNC(as->devfn),
                              entry.iova, size);
 
-    memory_region_notify_one(n, &entry);
+    memory_region_notify_iotlb_one(n, &entry);
 }
 
 static void vtd_address_space_unmap_all(IntelIOMMUState *s)
@@ -2771,7 +2771,7 @@ static void vtd_address_space_unmap_all(IntelIOMMUState *s)
 
 static int vtd_replay_hook(IOMMUTLBEntry *entry, void *private)
 {
-    memory_region_notify_one((IOMMUMRNotifier *)private, entry);
+    memory_region_notify_iotlb_one((IOMMUMRNotifier *)private, entry);
     return 0;
 }
 
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 5e6e70b..9a34495 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -414,7 +414,7 @@ static target_ulong put_tce_emu(sPAPRTCETable *tcet, target_ulong ioba,
     entry.translated_addr = tce & page_mask;
     entry.addr_mask = ~page_mask;
     entry.perm = spapr_tce_iommu_access_flags(tce);
-    memory_region_notify_iommu(&tcet->iommu, entry);
+    memory_region_notify_iotlb(&tcet->iommu, entry);
 
     return H_SUCCESS;
 }
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 314a9cb..566eeda 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -635,7 +635,7 @@ int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
             goto out;
         }
 
-        memory_region_notify_iommu(mr, entry);
+        memory_region_notify_iotlb(mr, entry);
         start += entry.addr_mask + 1;
     }
 
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 8d8dcb2..09188a6 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -673,7 +673,7 @@ static inline bool memory_region_is_iommu(MemoryRegion *mr)
 uint64_t memory_region_iommu_get_min_page_size(MemoryRegion *mr);
 
 /**
- * memory_region_notify_iommu: notify a change in an IOMMU translation entry.
+ * memory_region_notify_iotlb: notify a change in an IOMMU translation entry.
  *
  * The notification type will be decided by entry.perm bits:
  *
@@ -689,12 +689,12 @@ uint64_t memory_region_iommu_get_min_page_size(MemoryRegion *mr);
  *         replaces all old entries for the same virtual I/O address range.
  *         Deleted entries have .@perm == 0.
  */
-void memory_region_notify_iommu(MemoryRegion *mr,
+void memory_region_notify_iotlb(MemoryRegion *mr,
                                 IOMMUTLBEntry entry);
 
 /**
- * memory_region_notify_one: notify a change in an IOMMU translation
- *                           entry to a single notifier
+ * memory_region_notify_iotlb_one: notify a change in an IOMMU translation
+ *                                 entry to a single notifier
  *
  * This works just like memory_region_notify_iommu(), but it only
  * notifies a specific notifier, not all of them.
@@ -704,8 +704,8 @@ void memory_region_notify_iommu(MemoryRegion *mr,
  *         replaces all old entries for the same virtual I/O address range.
  *         Deleted entries have .@perm == 0.
  */
-void memory_region_notify_one(IOMMUMRNotifier *notifier,
-                              IOMMUTLBEntry *entry);
+void memory_region_notify_iotlb_one(IOMMUMRNotifier *notifier,
+                                    IOMMUTLBEntry *entry);
 
 /**
  * memory_region_register_iommu_notifier: register a notifier for changes to
diff --git a/memory.c b/memory.c
index ffbd020..c6532e4 100644
--- a/memory.c
+++ b/memory.c
@@ -1668,8 +1668,8 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr,
     memory_region_update_iommu_notify_flags(mr);
 }
 
-void memory_region_notify_one(IOMMUMRNotifier *notifier,
-                              IOMMUTLBEntry *entry)
+void memory_region_notify_iotlb_one(IOMMUMRNotifier *notifier,
+                                    IOMMUTLBEntry *entry)
 {
     IOMMUMREventFlags request_flags;
 
@@ -1693,7 +1693,7 @@ void memory_region_notify_one(IOMMUMRNotifier *notifier,
     }
 }
 
-void memory_region_notify_iommu(MemoryRegion *mr,
+void memory_region_notify_iotlb(MemoryRegion *mr,
                                 IOMMUTLBEntry entry)
 {
     IOMMUMRNotifier *iommu_notifier;
@@ -1701,7 +1701,7 @@ void memory_region_notify_iommu(MemoryRegion *mr,
     assert(memory_region_is_iommu(mr));
 
     IOMMU_NOTIFIER_FOREACH(iommu_notifier, mr) {
-        memory_region_notify_one(iommu_notifier, &entry);
+        memory_region_notify_iotlb_one(iommu_notifier, &entry);
     }
 }
 
-- 
2.7.4

  parent reply	other threads:[~2017-04-27  9:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27  9:34 [Qemu-devel] [RFC PATCH 0/8] IOMMU: introduce common IOMMUObject Peter Xu
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 1/8] memory: rename IOMMU_NOTIFIER_* Peter Xu
2017-05-01  4:50   ` David Gibson
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 2/8] memory: rename IOMMUNotifier Peter Xu
2017-05-01  4:51   ` David Gibson
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 3/8] memory: rename iommu_notifier_init() Peter Xu
2017-05-01  4:53   ` David Gibson
2017-05-08  5:50     ` Peter Xu
2017-04-27  9:34 ` Peter Xu [this message]
2017-05-01  4:55   ` [Qemu-devel] [RFC PATCH 4/8] memory: rename *_notify_iommu* David Gibson
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 5/8] memory: rename *iommu_notifier* Peter Xu
2017-05-01  4:56   ` David Gibson
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 6/8] memory: introduce AddressSpaceOps Peter Xu
2017-05-01  4:58   ` David Gibson
2017-05-08  5:48     ` Peter Xu
2017-05-08  6:07       ` David Gibson
2017-05-08  7:32         ` Peter Xu
2017-05-07  9:44           ` Liu, Yi L
2017-05-10  7:04           ` David Gibson
2017-05-11  5:04             ` Peter Xu
2017-05-15  5:32               ` David Gibson
2017-05-25  7:24                 ` Peter Xu
2017-05-26  5:30                   ` David Gibson
2017-06-08  8:24                     ` Liu, Yi L
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 7/8] intel_iommu: provide AddressSpaceOps.iommu_get() Peter Xu
2017-04-27  9:34 ` [Qemu-devel] [RFC PATCH 8/8] iommu: introduce hw/core/iommu Peter Xu
2017-04-28 10:01   ` Liu, Yi L
2017-04-28 10:34     ` Peter Xu
2017-06-07  7:51   ` Liu, Yi L
2017-06-07  8:28     ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493285660-4470-5-git-send-email-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=jasowang@redhat.com \
    --cc=kevin.tian@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tianyu.lan@intel.com \
    --cc=yi.l.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).