Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-26 Thread Aviv B.D.
On Wed, Mar 23, 2016 at 5:33 PM, Michael S. Tsirkin wrote: > On Sat, Mar 12, 2016 at 06:13:17PM +0200, Aviv B.D. wrote: > > From: "Aviv B.D." > > > > * Fix bug that prevent qemu from starting up when vIOMMU and VFIO > > device are present. > > * Advertise Cache Mode capability in iommu cap

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-23 Thread Michael S. Tsirkin
On Thu, Mar 17, 2016 at 01:58:13PM +0200, Aviv B.D. wrote: > > > On Tue, Mar 15, 2016 at 12:53 PM, Michael S. Tsirkin wrote: > > On Sat, Mar 12, 2016 at 06:13:17PM +0200, Aviv B.D. wrote: > > From: "Aviv B.D." > > > >  * Fix bug that prevent qemu from starting up when vIOMMU an

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-23 Thread Michael S. Tsirkin
On Sat, Mar 12, 2016 at 06:13:17PM +0200, Aviv B.D. wrote: > From: "Aviv B.D." > >  * Fix bug that prevent qemu from starting up when vIOMMU and VFIO >     device are present. >  * Advertise Cache Mode capability in iommu cap register. >  * Register every VFIO device with IOMMU state. >  * On pag

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-22 Thread Aviv B.D.
On Mon, Mar 21, 2016 at 4:30 AM, Peter Xu wrote: > On Sat, Mar 19, 2016 at 11:40:04AM +0200, Aviv B.D. wrote: > [...] > > As far as I understand the code, currently there is no way to turn off > the > > IOTLB. > > Furthermore. the IOTLB is not implemented as LRU, and actually caches > > (indefini

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-20 Thread Peter Xu
On Sat, Mar 19, 2016 at 11:40:04AM +0200, Aviv B.D. wrote: [...] > As far as I understand the code, currently there is no way to turn off the > IOTLB. > Furthermore. the IOTLB is not implemented as LRU, and actually caches > (indefinitely) > any accessed address, without any size constrains. I use

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-19 Thread Aviv B.D.
On Fri, Mar 18, 2016 at 5:06 AM, Peter Xu wrote: > On Thu, Mar 17, 2016 at 01:17:30PM +0200, Aviv B.D. wrote: > [...] > > vtd_get_did_dev returns -1 if the device is not mapped to any domain > > (generally, the CE is not present). > > probably a better interface is to return whether the device ha

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-19 Thread Aviv B.D.
On Tue, Mar 15, 2016 at 10:52 AM, Peter Xu wrote: > On Mon, Mar 14, 2016 at 08:52:33PM +0200, Marcel Apfelbaum wrote: > > On 03/12/2016 06:13 PM, Aviv B.D. wrote: > > Adding (possibly) interested developers to the thread. > > Thanks CC. > > Hi, Aviv, several questions inline. > > [...] > > > >@@

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-19 Thread Peter Xu
On Thu, Mar 17, 2016 at 01:17:30PM +0200, Aviv B.D. wrote: [...] > vtd_get_did_dev returns -1 if the device is not mapped to any domain > (generally, the CE is not present). > probably a better interface is to return whether the device has a domain or > not and returns the domain_id via the pointer

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-18 Thread Aviv B.D.
On Tue, Mar 15, 2016 at 12:53 PM, Michael S. Tsirkin wrote: > On Sat, Mar 12, 2016 at 06:13:17PM +0200, Aviv B.D. wrote: > > From: "Aviv B.D." > > > > * Fix bug that prevent qemu from starting up when vIOMMU and VFIO > > device are present. > > * Advertise Cache Mode capability in iommu ca

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-15 Thread Michael S. Tsirkin
On Sat, Mar 12, 2016 at 06:13:17PM +0200, Aviv B.D. wrote: > From: "Aviv B.D." > >  * Fix bug that prevent qemu from starting up when vIOMMU and VFIO >     device are present. >  * Advertise Cache Mode capability in iommu cap register. >  * Register every VFIO device with IOMMU state. >  * On pag

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-15 Thread Peter Xu
On Mon, Mar 14, 2016 at 08:52:33PM +0200, Marcel Apfelbaum wrote: > On 03/12/2016 06:13 PM, Aviv B.D. wrote: > Adding (possibly) interested developers to the thread. Thanks CC. Hi, Aviv, several questions inline. [...] > >@@ -1020,14 +1037,53 @@ static void > >vtd_iotlb_page_invalidate(IntelIO

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-15 Thread Michael S. Tsirkin
On Mon, Mar 14, 2016 at 07:58:23PM +0100, Jan Kiszka wrote: > On 2016-03-14 19:52, Marcel Apfelbaum wrote: > > On 03/12/2016 06:13 PM, Aviv B.D. wrote: > >> From: "Aviv B.D." mailto:bd.a...@gmail.com>> > >> > >> * Fix bug that prevent qemu from starting up when vIOMMU and VFIO > >> device ar

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-14 Thread Jan Kiszka
On 2016-03-14 19:52, Marcel Apfelbaum wrote: > On 03/12/2016 06:13 PM, Aviv B.D. wrote: >> From: "Aviv B.D." mailto:bd.a...@gmail.com>> >> >> * Fix bug that prevent qemu from starting up when vIOMMU and VFIO >> device are present. >> * Advertise Cache Mode capability in iommu cap register.

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-14 Thread Marcel Apfelbaum
On 03/12/2016 06:13 PM, Aviv B.D. wrote: From: "Aviv B.D." mailto:bd.a...@gmail.com>> * Fix bug that prevent qemu from starting up when vIOMMU and VFIO device are present. * Advertise Cache Mode capability in iommu cap register. * Register every VFIO device with IOMMU state. * On pa

[Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-12 Thread Aviv B.D.
From: "Aviv B.D." * Fix bug that prevent qemu from starting up when vIOMMU and VFIO device are present. * Advertise Cache Mode capability in iommu cap register. * Register every VFIO device with IOMMU state. * On page cache invalidation in vIOMMU, check if the domain belong to VFIO dev