Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-31 Thread Alex Williamson
On Fri, 2014-03-28 at 16:12 +1100, Alexey Kardashevskiy wrote: > On 03/20/2014 04:25 PM, David Gibson wrote: > > On Wed, Mar 19, 2014 at 01:57:41PM -0600, Alex Williamson wrote: > >> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > >>> From: David Gibson > > [snip] > >>> +if (!

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-31 Thread Alex Williamson
On Fri, 2014-03-28 at 15:49 +1100, Alexey Kardashevskiy wrote: > On 03/22/2014 01:17 AM, Alex Williamson wrote: > > On Fri, 2014-03-21 at 18:59 +1100, Alexey Kardashevskiy wrote: > >> On 03/20/2014 06:57 AM, Alex Williamson wrote: > >>> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote:

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-27 Thread Alexey Kardashevskiy
On 03/20/2014 04:25 PM, David Gibson wrote: > On Wed, Mar 19, 2014 at 01:57:41PM -0600, Alex Williamson wrote: >> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: >>> From: David Gibson > [snip] >>> +if (!memory_region_is_ram(mr)) { >>> +DPRINTF("iommu map to non memory a

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-27 Thread Alexey Kardashevskiy
On 03/22/2014 01:17 AM, Alex Williamson wrote: > On Fri, 2014-03-21 at 18:59 +1100, Alexey Kardashevskiy wrote: >> On 03/20/2014 06:57 AM, Alex Williamson wrote: >>> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: From: David Gibson This patch uses the new IOMMU notif

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-21 Thread Paolo Bonzini
Il 21/03/2014 15:17, Alex Williamson ha scritto: > > Is this possible? Assuming len is initially a power-of-2, would the > > translate function change it? Maybe worth a comment to explain. Oh. address_space_translate() actually changes @len to min(len, TARGET_PAGE_SIZE) and TARGET_PAGE_SIZE i

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-21 Thread Alex Williamson
On Fri, 2014-03-21 at 18:59 +1100, Alexey Kardashevskiy wrote: > On 03/20/2014 06:57 AM, Alex Williamson wrote: > > On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > >> From: David Gibson > >> > >> This patch uses the new IOMMU notifiers to allow VFIO pass through devices > >> to wo

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-21 Thread Alexey Kardashevskiy
On 03/20/2014 06:57 AM, Alex Williamson wrote: > On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: >> From: David Gibson >> >> This patch uses the new IOMMU notifiers to allow VFIO pass through devices >> to work with guest side IOMMUs, as long as the host-side VFIO iommu has >> suffi

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-19 Thread David Gibson
On Wed, Mar 19, 2014 at 01:57:41PM -0600, Alex Williamson wrote: > On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > > From: David Gibson [snip] > > +if (!memory_region_is_ram(mr)) { > > +DPRINTF("iommu map to non memory area %"HWADDR_PRIx"\n", > > +xlat)

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-19 Thread Alex Williamson
On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > From: David Gibson > > This patch uses the new IOMMU notifiers to allow VFIO pass through devices > to work with guest side IOMMUs, as long as the host-side VFIO iommu has > sufficient capability and granularity to match the guest s

[Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-11 Thread Alexey Kardashevskiy
From: David Gibson This patch uses the new IOMMU notifiers to allow VFIO pass through devices to work with guest side IOMMUs, as long as the host-side VFIO iommu has sufficient capability and granularity to match the guest side. This works by tracking all map and unmap operations on the guest IOM