Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Gerald Schaefer
On Mon, 27 Oct 2014 18:58:35 +0100 Joerg Roedel wrote: > On Mon, Oct 27, 2014 at 06:02:19PM +0100, Gerald Schaefer wrote: > > On Mon, 27 Oct 2014 17:25:02 +0100 > > Joerg Roedel wrote: > > > Is there some hardware reason for this or is that just an > > > implementation detail that can be

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Joerg Roedel
On Mon, Oct 27, 2014 at 06:02:19PM +0100, Gerald Schaefer wrote: > On Mon, 27 Oct 2014 17:25:02 +0100 > Joerg Roedel wrote: > > Is there some hardware reason for this or is that just an > > implementation detail that can be changed. In other words, does the > > hardware allow to use the same DMA

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Gerald Schaefer
On Mon, 27 Oct 2014 17:25:02 +0100 Joerg Roedel wrote: > On Mon, Oct 27, 2014 at 03:32:01PM +0100, Gerald Schaefer wrote: > > Not sure if I understood the concept of IOMMU domains right. But if > > this is about having multiple devices in the same domain, so that > > iommu_ops->map will

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Joerg Roedel
On Mon, Oct 27, 2014 at 03:32:01PM +0100, Gerald Schaefer wrote: > Not sure if I understood the concept of IOMMU domains right. But if this > is about having multiple devices in the same domain, so that iommu_ops->map > will establish the _same_ DMA mapping on _all_ registered devices, then > this

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Gerald Schaefer
On Thu, 23 Oct 2014 16:04:37 +0200 Frank Blaschka wrote: > On Thu, Oct 23, 2014 at 02:41:15PM +0200, Joerg Roedel wrote: > > On Wed, Oct 22, 2014 at 05:43:20PM +0200, Frank Blaschka wrote: > > > Basically there are no limitations. Depending on the s390 maschine > > > generation a device starts

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Gerald Schaefer
On Thu, 23 Oct 2014 16:04:37 +0200 Frank Blaschka blasc...@linux.vnet.ibm.com wrote: On Thu, Oct 23, 2014 at 02:41:15PM +0200, Joerg Roedel wrote: On Wed, Oct 22, 2014 at 05:43:20PM +0200, Frank Blaschka wrote: Basically there are no limitations. Depending on the s390 maschine generation

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Joerg Roedel
On Mon, Oct 27, 2014 at 03:32:01PM +0100, Gerald Schaefer wrote: Not sure if I understood the concept of IOMMU domains right. But if this is about having multiple devices in the same domain, so that iommu_ops-map will establish the _same_ DMA mapping on _all_ registered devices, then this

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Gerald Schaefer
On Mon, 27 Oct 2014 17:25:02 +0100 Joerg Roedel j...@8bytes.org wrote: On Mon, Oct 27, 2014 at 03:32:01PM +0100, Gerald Schaefer wrote: Not sure if I understood the concept of IOMMU domains right. But if this is about having multiple devices in the same domain, so that iommu_ops-map will

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Joerg Roedel
On Mon, Oct 27, 2014 at 06:02:19PM +0100, Gerald Schaefer wrote: On Mon, 27 Oct 2014 17:25:02 +0100 Joerg Roedel j...@8bytes.org wrote: Is there some hardware reason for this or is that just an implementation detail that can be changed. In other words, does the hardware allow to use the

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-27 Thread Gerald Schaefer
On Mon, 27 Oct 2014 18:58:35 +0100 Joerg Roedel j...@8bytes.org wrote: On Mon, Oct 27, 2014 at 06:02:19PM +0100, Gerald Schaefer wrote: On Mon, 27 Oct 2014 17:25:02 +0100 Joerg Roedel j...@8bytes.org wrote: Is there some hardware reason for this or is that just an implementation detail

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-24 Thread Joerg Roedel
Hi Frank, On Thu, Oct 23, 2014 at 04:04:37PM +0200, Frank Blaschka wrote: > > A domain is basically an abstraction for a DMA page table (or a > > dma_table, as you call it on s390). So you can easily create similar > > mappings for more than one device with it. > > > the clp instructions reports

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-24 Thread Joerg Roedel
Hi Frank, On Thu, Oct 23, 2014 at 04:04:37PM +0200, Frank Blaschka wrote: A domain is basically an abstraction for a DMA page table (or a dma_table, as you call it on s390). So you can easily create similar mappings for more than one device with it. the clp instructions reports a

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-23 Thread Frank Blaschka
On Thu, Oct 23, 2014 at 02:41:15PM +0200, Joerg Roedel wrote: > On Wed, Oct 22, 2014 at 05:43:20PM +0200, Frank Blaschka wrote: > > Basically there are no limitations. Depending on the s390 maschine > > generation a device starts its IOVA at a specific address (announced by > > the HW). But as I

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-23 Thread Joerg Roedel
On Wed, Oct 22, 2014 at 05:43:20PM +0200, Frank Blaschka wrote: > Basically there are no limitations. Depending on the s390 maschine > generation a device starts its IOVA at a specific address (announced by > the HW). But as I already told each device starts at the same address. > I think this

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-23 Thread Joerg Roedel
On Wed, Oct 22, 2014 at 05:43:20PM +0200, Frank Blaschka wrote: Basically there are no limitations. Depending on the s390 maschine generation a device starts its IOVA at a specific address (announced by the HW). But as I already told each device starts at the same address. I think this

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-23 Thread Frank Blaschka
On Thu, Oct 23, 2014 at 02:41:15PM +0200, Joerg Roedel wrote: On Wed, Oct 22, 2014 at 05:43:20PM +0200, Frank Blaschka wrote: Basically there are no limitations. Depending on the s390 maschine generation a device starts its IOVA at a specific address (announced by the HW). But as I already

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-22 Thread Frank Blaschka
On Wed, Oct 22, 2014 at 04:17:29PM +0200, Joerg Roedel wrote: > Hi Frank, > > On Tue, Oct 21, 2014 at 01:57:25PM +0200, Frank Blaschka wrote: > > Add a basic iommu for the s390 platform. The code is pretty simple > > since on s390 each PCI device has its own virtual io address space > > starting

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-22 Thread Joerg Roedel
Hi Frank, On Tue, Oct 21, 2014 at 01:57:25PM +0200, Frank Blaschka wrote: > Add a basic iommu for the s390 platform. The code is pretty simple > since on s390 each PCI device has its own virtual io address space > starting at the same vio address. Are there any limitations on IOVA address space

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-22 Thread Joerg Roedel
Hi Frank, On Tue, Oct 21, 2014 at 01:57:25PM +0200, Frank Blaschka wrote: Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the same vio address. Are there any limitations on IOVA address space for

Re: [PATCH linux-next] iommu: add iommu for s390 platform

2014-10-22 Thread Frank Blaschka
On Wed, Oct 22, 2014 at 04:17:29PM +0200, Joerg Roedel wrote: Hi Frank, On Tue, Oct 21, 2014 at 01:57:25PM +0200, Frank Blaschka wrote: Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the

[PATCH linux-next] iommu: add iommu for s390 platform

2014-10-21 Thread Frank Blaschka
Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the same vio address. For this a domain could hold only one pci device. Also there is no relation between pci devices so each device belongs to a

[PATCH linux-next] iommu: add iommu for s390 platform

2014-10-21 Thread Frank Blaschka
Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the same vio address. For this a domain could hold only one pci device. Also there is no relation between pci devices so each device belongs to a