Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 03:40:08PM +0800, Peter Xu wrote: > On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote: > > [...] > > > > > @@ -1564,8 +1569,22 @@ void > > > > memory_region_unregister_iommu_notifier(MemoryRegion *mr, Notifier *n) > > > > void memory_region_notify_iommu(Memory

Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 04:17:26PM +0800, Peter Xu wrote: > On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote: > > [...] > > > Peter suggested commenting this next to the IOTLBEntry definition, and > > I think that's probably ok for now. > > Looks like we have something already (just

Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-14 Thread Peter Xu
On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote: [...] > Peter suggested commenting this next to the IOTLBEntry definition, and > I think that's probably ok for now. Looks like we have something already (just not that obvious): /** * memory_region_notify_iommu: notify a change in

Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-14 Thread Peter Xu
On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote: [...] > > > @@ -1564,8 +1569,22 @@ void > > > memory_region_unregister_iommu_notifier(MemoryRegion *mr, Notifier *n) > > > void memory_region_notify_iommu(MemoryRegion *mr, > > > IOMMUTLBEntry entry)

Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 03:48:32PM +1000, David Gibson wrote: > On Fri, Sep 09, 2016 at 10:57:42AM +0800, Peter Xu wrote: > > IOMMU Notifier list is used for notifying IO address mapping changes. > > Currently VFIO is the only user. > > > > However it is possible that future consumer like vhost wo

Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-13 Thread David Gibson
On Fri, Sep 09, 2016 at 10:57:42AM +0800, Peter Xu wrote: > IOMMU Notifier list is used for notifying IO address mapping changes. > Currently VFIO is the only user. > > However it is possible that future consumer like vhost would like to > only listen to part of its notifications (e.g., cache inva