Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-25 Thread Aviv B.D.
On Mon, Oct 24, 2016 at 11:02 AM, Peter Xu wrote: > On Mon, Oct 24, 2016 at 10:53:01AM +0300, Aviv B.D. wrote: > > [...] > > > This was my first algorithm, but VFIO do not support remapping of mapped > > page. > > Before each MAP operation in VFIO one must do unmap, and therefore I'm > > sending

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-24 Thread Peter Xu
On Mon, Oct 24, 2016 at 10:53:01AM +0300, Aviv B.D. wrote: [...] > This was my first algorithm, but VFIO do not support remapping of mapped > page. > Before each MAP operation in VFIO one must do unmap, and therefore I'm > sending > the unmap notifications blindly before. > I can rearrange my cod

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-24 Thread Aviv B.D.
On Fri, Oct 21, 2016 at 6:57 AM, Peter Xu wrote: > On Thu, Oct 20, 2016 at 10:11:15PM +0300, Aviv B.D. wrote: > > [...] > > > > > +static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, > > > > + uint16_t domain_id, > hwaddr > > > addr, > > > >

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Peter Xu
On Thu, Oct 20, 2016 at 10:11:15PM +0300, Aviv B.D. wrote: [...] > > > +static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, > > > + uint16_t domain_id, hwaddr > > addr, > > > + uint8_t am) > > > +{ >

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Aviv B.D.
On Wed, Oct 19, 2016 at 12:33 PM, Peter Xu wrote: > On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: > > From: "Aviv Ben-David" > > > > Adds a list of registered vtd_as's to intel iommu state to save > > iteration over each PCI device in a search of the corrosponding domain. > > > > Sig

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Aviv B.D.
I will fix all those issues. Thanks, Aviv. On Thu, Oct 20, 2016 at 10:11 PM, Aviv B.D. wrote: > > > On Wed, Oct 19, 2016 at 12:33 PM, Peter Xu wrote: > >> On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: >> > From: "Aviv Ben-David" >> > >> > Adds a list of registered vtd_as's to intel

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-20 Thread Peter Xu
On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: [...] > @@ -2000,8 +2065,10 @@ static void vtd_iommu_notify_flag_changed(MemoryRegion > *iommu, >IOMMUNotifierFlag new) > { > VTDAddressSpace *vtd_as = container_of(iommu, VTDAddressSpace,

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-19 Thread Peter Xu
On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: > From: "Aviv Ben-David" > > Adds a list of registered vtd_as's to intel iommu state to save > iteration over each PCI device in a search of the corrosponding domain. > > Signed-off-by: Aviv Ben-David > --- > hw/i386/intel_iommu.c

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: > From: "Aviv Ben-David" > > Adds a list of registered vtd_as's to intel iommu state to save > iteration over each PCI device in a search of the corrosponding domain. > > Signed-off-by: Aviv Ben-David > --- > hw/i386/intel_iommu.c

[Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-17 Thread Aviv B.D
From: "Aviv Ben-David" Adds a list of registered vtd_as's to intel iommu state to save iteration over each PCI device in a search of the corrosponding domain. Signed-off-by: Aviv Ben-David --- hw/i386/intel_iommu.c | 102 ++--- hw/i386/intel_iommu_i