From: David Gibson <david@gibson.dropbear.id.au>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, tianyu.lan@intel.com,
Paolo Bonzini <pbonzini@redhat.com>,
kevin.tian@intel.com, yi.l.liu@intel.com,
Jason Wang <jasowang@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 3/8] memory: rename iommu_notifier_init()
Date: Mon, 1 May 2017 14:53:35 +1000 [thread overview]
Message-ID: <20170501045335.GJ13773@umbus.fritz.box> (raw)
In-Reply-To: <1493285660-4470-4-git-send-email-peterx@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3760 bytes --]
On Thu, Apr 27, 2017 at 05:34:15PM +0800, Peter Xu wrote:
> It's new name is iommu_mr_notifier_init(). Again, literal changes only.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Again, I think this could be folded with the previous two patches.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
I also note that these patches will conflict with Alexey's proposed
changes to make IOMMU MR's a QOM subtype of the ordinary MR (thus
removing some of the MR specific fields from other MRs.
> ---
> hw/vfio/common.c | 8 ++++----
> hw/virtio/vhost.c | 8 ++++----
> include/exec/memory.h | 7 ++++---
> 3 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> index bd113b7..6b3953b 100644
> --- a/hw/vfio/common.c
> +++ b/hw/vfio/common.c
> @@ -481,10 +481,10 @@ static void vfio_listener_region_add(MemoryListener *listener,
> llend = int128_add(int128_make64(section->offset_within_region),
> section->size);
> llend = int128_sub(llend, int128_one());
> - iommu_notifier_init(&giommu->n, vfio_iommu_map_notify,
> - IOMMU_MR_EVENT_ALL,
> - section->offset_within_region,
> - int128_get64(llend));
> + iommu_mr_notifier_init(&giommu->n, vfio_iommu_map_notify,
> + IOMMU_MR_EVENT_ALL,
> + section->offset_within_region,
> + int128_get64(llend));
> QLIST_INSERT_HEAD(&container->giommu_list, giommu, giommu_next);
>
> memory_region_register_iommu_notifier(giommu->iommu, &giommu->n);
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 81a8aea..7449cf8 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -746,10 +746,10 @@ static void vhost_iommu_region_add(MemoryListener *listener,
> end = int128_add(int128_make64(section->offset_within_region),
> section->size);
> end = int128_sub(end, int128_one());
> - iommu_notifier_init(&iommu->n, vhost_iommu_unmap_notify,
> - IOMMU_MR_EVENT_UNMAP,
> - section->offset_within_region,
> - int128_get64(end));
> + iommu_mr_notifier_init(&iommu->n, vhost_iommu_unmap_notify,
> + IOMMU_MR_EVENT_UNMAP,
> + section->offset_within_region,
> + int128_get64(end));
> iommu->mr = section->mr;
> iommu->iommu_offset = section->offset_within_address_space -
> section->offset_within_region;
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index 6be0c02..8d8dcb2 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -93,9 +93,10 @@ struct IOMMUMRNotifier {
> };
> typedef struct IOMMUMRNotifier IOMMUMRNotifier;
>
> -static inline void iommu_notifier_init(IOMMUMRNotifier *n, IOMMUNotify fn,
> - IOMMUMREventFlags flags,
> - hwaddr start, hwaddr end)
> +static inline void iommu_mr_notifier_init(IOMMUMRNotifier *n,
> + IOMMUNotify fn,
> + IOMMUMREventFlags flags,
> + hwaddr start, hwaddr end)
> {
> n->notify = fn;
> n->notifier_flags = flags;
--
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: 819 bytes --]
next prev parent reply other threads:[~2017-05-01 5:02 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 [this message]
2017-05-08 5:50 ` Peter Xu
2017-04-27 9:34 ` [Qemu-devel] [RFC PATCH 4/8] memory: rename *_notify_iommu* Peter Xu
2017-05-01 4:55 ` 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=20170501045335.GJ13773@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=alex.williamson@redhat.com \
--cc=jasowang@redhat.com \
--cc=kevin.tian@intel.com \
--cc=pbonzini@redhat.com \
--cc=peterx@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).