From: David Gibson <david@gibson.dropbear.id.au>
To: "Eugenio Pérez" <eperezma@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Yan Zhao" <yan.y.zhao@intel.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-ppc@nongnu.org, "Jason Wang" <jasowang@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
qemu-devel@nongnu.org, "Peter Xu" <peterx@redhat.com>,
"Eric Auger" <eric.auger@redhat.com>,
qemu-arm@nongnu.org, "Hervé Poussineau" <hpoussin@reactos.org>,
"Avi Kivity" <avi@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [RFC v8 1/5] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one
Date: Wed, 2 Sep 2020 10:37:32 +1000 [thread overview]
Message-ID: <20200902003732.GC1897@yekko.fritz.box> (raw)
In-Reply-To: <20200901142608.24481-2-eperezma@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 5078 bytes --]
On Tue, Sep 01, 2020 at 04:26:04PM +0200, Eugenio Pérez wrote:
> Previous name didn't reflect the iommu operation.
>
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/arm/smmu-common.c | 2 +-
> hw/arm/smmuv3.c | 2 +-
> hw/i386/intel_iommu.c | 4 ++--
> include/exec/memory.h | 6 +++---
> softmmu/memory.c | 6 +++---
> 5 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
> index 3838db1395..88d2c454f0 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -472,7 +472,7 @@ static void smmu_unmap_notifier_range(IOMMUNotifier *n)
> entry.perm = IOMMU_NONE;
> entry.addr_mask = n->end - n->start;
>
> - memory_region_notify_one(n, &entry);
> + memory_region_notify_iommu_one(n, &entry);
> }
>
> /* Unmap all notifiers attached to @mr */
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index 0122700e72..0a893ae918 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -827,7 +827,7 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr,
> entry.addr_mask = num_pages * (1 << granule) - 1;
> entry.perm = IOMMU_NONE;
>
> - memory_region_notify_one(n, &entry);
> + memory_region_notify_iommu_one(n, &entry);
> }
>
> /* invalidate an asid/iova range tuple in all mr's */
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 5284bb68b6..2ad6b9d796 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3498,7 +3498,7 @@ static void vtd_address_space_unmap(VTDAddressSpace *as, IOMMUNotifier *n)
> /* This field is meaningless for unmap */
> entry.translated_addr = 0;
>
> - memory_region_notify_one(n, &entry);
> + memory_region_notify_iommu_one(n, &entry);
>
> start += mask;
> remain -= mask;
> @@ -3536,7 +3536,7 @@ static void vtd_address_space_refresh_all(IntelIOMMUState *s)
>
> static int vtd_replay_hook(IOMMUTLBEntry *entry, void *private)
> {
> - memory_region_notify_one((IOMMUNotifier *)private, entry);
> + memory_region_notify_iommu_one((IOMMUNotifier *)private, entry);
> return 0;
> }
>
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index 0cfe987ab4..22c5f564d1 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -226,7 +226,7 @@ enum IOMMUMemoryRegionAttr {
> * The IOMMU implementation must use the IOMMU notifier infrastructure
> * to report whenever mappings are changed, by calling
> * memory_region_notify_iommu() (or, if necessary, by calling
> - * memory_region_notify_one() for each registered notifier).
> + * memory_region_notify_iommu_one() for each registered notifier).
> *
> * Conceptually an IOMMU provides a mapping from input address
> * to an output TLB entry. If the IOMMU is aware of memory transaction
> @@ -1274,7 +1274,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
> IOMMUTLBEntry entry);
>
> /**
> - * memory_region_notify_one: notify a change in an IOMMU translation
> + * memory_region_notify_iommu_one: notify a change in an IOMMU translation
> * entry to a single notifier
> *
> * This works just like memory_region_notify_iommu(), but it only
> @@ -1285,7 +1285,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
> * replaces all old entries for the same virtual I/O address range.
> * Deleted entries have .@perm == 0.
> */
> -void memory_region_notify_one(IOMMUNotifier *notifier,
> +void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
> IOMMUTLBEntry *entry);
>
> /**
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index 70b93104e8..961c25b42f 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -1890,8 +1890,8 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr,
> memory_region_update_iommu_notify_flags(iommu_mr, NULL);
> }
>
> -void memory_region_notify_one(IOMMUNotifier *notifier,
> - IOMMUTLBEntry *entry)
> +void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
> + IOMMUTLBEntry *entry)
> {
> IOMMUNotifierFlag request_flags;
> hwaddr entry_end = entry->iova + entry->addr_mask;
> @@ -1927,7 +1927,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
>
> IOMMU_NOTIFIER_FOREACH(iommu_notifier, iommu_mr) {
> if (iommu_notifier->iommu_idx == iommu_idx) {
> - memory_region_notify_one(iommu_notifier, &entry);
> + memory_region_notify_iommu_one(iommu_notifier, &entry);
> }
> }
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-09-02 1:16 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 14:26 [RFC v8 0/5] memory: Delete assertion in memory_region_unregister_iommu_notifier Eugenio Pérez
2020-09-01 14:26 ` [RFC v8 1/5] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one Eugenio Pérez
2020-09-01 20:44 ` Peter Xu
2020-09-02 0:37 ` David Gibson [this message]
2020-09-02 7:42 ` Juan Quintela
2020-09-02 9:04 ` Auger Eric
2020-09-01 14:26 ` [RFC v8 2/5] memory: Add IOMMUTLBEvent Eugenio Pérez
2020-09-01 20:54 ` Peter Xu
2020-09-02 8:14 ` Eugenio Perez Martin
2020-09-02 7:54 ` Juan Quintela
2020-09-02 8:39 ` Eugenio Perez Martin
2020-09-02 10:17 ` Auger Eric
2020-09-02 13:18 ` Eugenio Perez Martin
2020-09-02 13:39 ` Auger Eric
2020-09-02 13:58 ` Eugenio Perez Martin
2020-09-02 14:02 ` Eugenio Perez Martin
2020-09-01 14:26 ` [RFC v8 3/5] memory: Add IOMMU_DEVIOTLB_UNMAP IOMMUTLBNotificationType Eugenio Pérez
2020-09-01 20:56 ` Peter Xu
2020-09-02 7:55 ` Juan Quintela
2020-09-02 10:31 ` Auger Eric
2020-09-03 10:13 ` Eugenio Perez Martin
2020-09-03 11:06 ` Auger Eric
2020-09-03 12:21 ` Eugenio Perez Martin
2020-09-01 14:26 ` [RFC v8 4/5] intel_iommu: Do not notify regular iotlb to device-iotlb notifiers Eugenio Pérez
2020-09-01 21:04 ` Peter Xu
2020-09-03 6:07 ` Eugenio Perez Martin
2020-09-01 14:26 ` [RFC v8 5/5] memory: Skip bad range assertion if notifier is DEVIOTLB type Eugenio Pérez
2020-09-01 21:05 ` Peter Xu
2020-09-02 7:59 ` Juan Quintela
2020-09-02 14:24 ` Auger Eric
2020-09-02 23:57 ` David Gibson
2020-09-03 17:05 ` Eugenio Perez Martin
2020-09-01 21:13 ` [RFC v8 0/5] memory: Delete assertion in memory_region_unregister_iommu_notifier Peter Xu
2020-09-02 8:01 ` Eugenio Perez Martin
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=20200902003732.GC1897@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aleksandar.rikalo@syrmia.com \
--cc=avi@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eperezma@redhat.com \
--cc=eric.auger@redhat.com \
--cc=hpoussin@reactos.org \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=yan.y.zhao@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).