RE: [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute

2013-02-05 Thread Sethi Varun-B16395
Hi Joerg, In case of PAMU, geometry would be meaningless without specifying the number of subwindows. If the API user specifies a geometry but fails to specify the number of required subwindows, we would assume a default (max supported) value, which may be incorrect. It's going to be really

Re: [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute

2013-02-05 Thread Joerg Roedel
Hi, On Tue, Feb 05, 2013 at 09:14:40AM +, Sethi Varun-B16395 wrote: In case of PAMU, geometry would be meaningless without specifying the number of subwindows. If the API user specifies a geometry but fails to specify the number of required subwindows, we would assume a default (max

RE: [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute

2013-02-05 Thread Sethi Varun-B16395
DOMAIN_ATTR_PAMU_ENABLE is required to enable a particular DMA window. My point is about the domain geometry, which is incomplete in case of PAMU without the number of subwindows. Geometry parameters are used for initializing the PAMU window settings. Individual subwindows can only be enabled,

Re: [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute

2013-02-05 Thread Joerg Roedel
On Tue, Feb 05, 2013 at 10:52:03AM +, Sethi Varun-B16395 wrote: DOMAIN_ATTR_PAMU_ENABLE is required to enable a particular DMA window. My point is about the domain geometry, which is incomplete in case of PAMU without the number of subwindows. Geometry parameters are used for initializing

Re: [v3 1/1] iommu/tegra: smmu: Support variable MMIO ranges/blocks

2013-02-05 Thread j...@8bytes.org
On Mon, Feb 04, 2013 at 09:54:07PM +0100, Hiroshi Doyu wrote: Hiroshi Doyu hd...@nvidia.com wrote @ Mon, 04 Feb 2013 22:39:21 +0200 (EET): Upon reflection, that comment probably isn't correct, since the only way to know where each register range begins, relative to the register numbers

Re: [PATCH 4/5] iommu: Add domain window handling functions

2013-02-05 Thread Joerg Roedel
On Mon, Feb 04, 2013 at 05:31:51PM -0600, Stuart Yoder wrote: On Mon, Feb 4, 2013 at 12:56 PM, Joerg Roedel j...@8bytes.org wrote: On Mon, Feb 04, 2013 at 12:10:51PM -0600, Stuart Yoder wrote: On Mon, Feb 4, 2013 at 7:18 AM, Joerg Roedel j...@8bytes.org wrote: +static inline int

Re: IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init() in Linux 3.4

2013-02-05 Thread Joerg Roedel
Hi Shuah, On Fri, Feb 01, 2013 at 11:31:59AM -0700, Shuah Khan wrote: Yes, 3.7 has the same window of opportunity for this race condition, however I couldn't figure out why it doesn't happen on 3.7. On 3.7 the window between amd_iommu_init_hardware() and amd_iommu_init_dma_ops() might

Re: IO_PAGE_FAULTs on unity mapped regions during amd_iommu_init() in Linux 3.4

2013-02-05 Thread Shuah Khan
On Tue, Feb 5, 2013 at 6:31 AM, Joerg Roedel j...@8bytes.org wrote: Hi Shuah, On Fri, Feb 01, 2013 at 11:31:59AM -0700, Shuah Khan wrote: Yes, 3.7 has the same window of opportunity for this race condition, however I couldn't figure out why it doesn't happen on 3.7. On 3.7 the window between

Re: PCI warning on boot 3.8.0-rc1

2013-02-05 Thread Stephen Hemminger
I think drivers/pci/search.c is identical between 3.7 and 3.8-rc1. Is this the first time you've turned on the IOMMU on that box? It exists in 3.7 and earlier kernels, just haven't turned on same config. It's the same warning as in this bugzilla:

Re: PCI warning on boot 3.8.0-rc1

2013-02-05 Thread Stephen Hemminger
On Mon, 04 Feb 2013 13:28:04 -0700 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2013-02-04 at 10:36 -0800, Stephen Hemminger wrote: I think drivers/pci/search.c is identical between 3.7 and 3.8-rc1. Is this the first time you've turned on the IOMMU on that box? It exists

Re: PCI warning on boot 3.8.0-rc1

2013-02-05 Thread Stephen Hemminger
On Mon, 04 Feb 2013 15:41:24 -0700 Alex Williamson alex.william...@redhat.com wrote: + + if (pci_is_pcie(parent) + (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT || + pci_pcie_type(parent) == PCI_EXP_TYPE_DOWNSTREAM)) { + pr_warn(WARNING: Your hardware is

RE: [PATCH 5/5] iommu: Add DOMAIN_ATTR_WINDOWS domain attribute

2013-02-05 Thread Sethi Varun-B16395
-Original Message- From: Joerg Roedel [mailto:j...@8bytes.org] Sent: Tuesday, February 05, 2013 6:36 PM To: Sethi Varun-B16395 Cc: Stuart Yoder; iommu@lists.linux-foundation.org; linux- ker...@vger.kernel.org; Wood Scott-B07421 Subject: Re: [PATCH 5/5] iommu: Add