Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-30 Thread Peter Xu
On Fri, Oct 21, 2016 at 08:43:05AM -0600, Alex Williamson wrote: [...] > > > Well, I think that would work. But I think it would be better to fix > > > it from the other side: > > > > > > We add the range to be notified into the IOMMUNotifier structure and > > > filter based on that range in me

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-23 Thread David Gibson
On Fri, Oct 21, 2016 at 01:17:08PM +0800, Peter Xu wrote: > On Fri, Oct 21, 2016 at 11:50:05AM +1100, David Gibson wrote: > > [...] > > > > > In my setup the VFIO registered two memory areas with one page of > > > > unregistered memory > > > > between them. > > > > > > > > When I'm calling memor

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-21 Thread Alex Williamson
On Fri, 21 Oct 2016 13:17:08 +0800 Peter Xu wrote: > On Fri, Oct 21, 2016 at 11:50:05AM +1100, David Gibson wrote: > > [...] > > > > > In my setup the VFIO registered two memory areas with one page of > > > > unregistered memory > > > > between them. > > > > > > > > When I'm calling memory_reg

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Peter Xu
On Fri, Oct 21, 2016 at 11:50:05AM +1100, David Gibson wrote: [...] > > > In my setup the VFIO registered two memory areas with one page of > > > unregistered memory > > > between them. > > > > > > When I'm calling memory_region_notify_iommu it calls the notifier function > > > of VFIO twice > >

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread David Gibson
On Thu, Oct 20, 2016 at 02:06:08PM -0600, Alex Williamson wrote: > [cc +david] > > On Thu, 20 Oct 2016 22:17:18 +0300 > "Aviv B.D." wrote: > > > On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson > > wrote: > > > > > On Mon, 17 Oct 2016 18:44:21 +0300 > > > "Aviv B.D" wrote: > > > > > > > F

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Alex Williamson
[cc +david] On Thu, 20 Oct 2016 22:17:18 +0300 "Aviv B.D." wrote: > On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson > wrote: > > > On Mon, 17 Oct 2016 18:44:21 +0300 > > "Aviv B.D" wrote: > > > > > From: "Aviv Ben-David" > > > > > > * Advertize Cache Mode capability in iommu cap registe

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-20 Thread Aviv B.D.
On Mon, Oct 17, 2016 at 7:07 PM, Alex Williamson wrote: > On Mon, 17 Oct 2016 18:44:21 +0300 > "Aviv B.D" wrote: > > > From: "Aviv Ben-David" > > > > * Advertize Cache Mode capability in iommu cap register. > > This capability is controlled by "cache-mode" property of intel-iommu > device. >

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-18 Thread Alex Williamson
On Tue, 18 Oct 2016 16:52:04 +1100 David Gibson wrote: > On Mon, Oct 17, 2016 at 10:47:02PM -0600, Alex Williamson wrote: > > On Tue, 18 Oct 2016 15:06:55 +1100 > > David Gibson wrote: > > > > > On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > > > > On Mon, 17 Oct 2016 18:

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 10:47:02PM -0600, Alex Williamson wrote: > On Tue, 18 Oct 2016 15:06:55 +1100 > David Gibson wrote: > > > On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > > > On Mon, 17 Oct 2016 18:44:21 +0300 > > > "Aviv B.D" wrote: > > > > > > > From: "Aviv Ben-Dav

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread Alex Williamson
On Tue, 18 Oct 2016 15:06:55 +1100 David Gibson wrote: > On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > > On Mon, 17 Oct 2016 18:44:21 +0300 > > "Aviv B.D" wrote: > > > > > From: "Aviv Ben-David" > > > > > > * Advertize Cache Mode capability in iommu cap register. > > >

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > On Mon, 17 Oct 2016 18:44:21 +0300 > "Aviv B.D" wrote: > > > From: "Aviv Ben-David" > > > > * Advertize Cache Mode capability in iommu cap register. > > This capability is controlled by "cache-mode" property of intel-iommu >

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread Alex Williamson
On Mon, 17 Oct 2016 18:44:21 +0300 "Aviv B.D" wrote: > From: "Aviv Ben-David" > > * Advertize Cache Mode capability in iommu cap register. > This capability is controlled by "cache-mode" property of intel-iommu > device. > To enable this option call QEMU with "-device intel-iommu,cache-mo

[Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread Aviv B.D
From: "Aviv Ben-David" * Advertize Cache Mode capability in iommu cap register. This capability is controlled by "cache-mode" property of intel-iommu device. To enable this option call QEMU with "-device intel-iommu,cache-mode=true". * On page cache invalidation in intel vIOMMU, check if th