RE: [iommu:ppc/pamu 1/1] drivers/iommu/fsl_pamu.h:24:32: fatal error: asm/fsl_pamu_stash.h: No such file or directory

2015-05-05 Thread Varun Sethi
Hi Joerg, -Original Message- From: jroe...@suse.de [mailto:jroe...@suse.de] Sent: Tuesday, May 05, 2015 6:47 PM To: Sethi Varun-B16395 Cc: j...@8bytes.org; iommu@lists.linux-foundation.org; Bucur Madalin- Cristian-B32716 Subject: Re: [iommu:ppc/pamu 1/1]

Re: [PATCH] iommu: rockchip: fix build without CONFIG_OF

2015-05-05 Thread Joerg Roedel
On Fri, Apr 10, 2015 at 11:58:24PM +0200, Arnd Bergmann wrote: The rockchip iommu driver references its of_device_id table from the init function, which fails to build when the table is undefined: iommu/rockchip-iommu.c: In function 'rk_iommu_init': iommu/rockchip-iommu.c:1029:35: error:

Re: [PATCH v10 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-05 Thread Dave Young
On 05/05/15 at 05:31pm, Joerg Roedel wrote: On Tue, May 05, 2015 at 02:14:23PM +0800, Dave Young wrote: The failure is nothing different, but as I said in another reply the difference is we could use corrupted data to possiblly cause more failure. I still fail to see how things can get

Re: [PATCH v10 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-05 Thread Li, ZhenHua
Dave, This patchset will only write root tables in old kernel, if it is corrupted, faults will also happen in old kernel, and hardware would mark it. So things will not go worse.. Thanks Zhenhua On 05/06/2015 09:51 AM, Dave Young wrote: On 05/05/15 at 05:31pm, Joerg Roedel wrote: On Tue,

Re: [PATCH v9 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-05 Thread Dave Young
On 05/05/15 at 05:23pm, Joerg Roedel wrote: On Tue, May 05, 2015 at 02:09:31PM +0800, Dave Young wrote: I agree that we can do nothing with the old corrupted data, but I worry about the future corruption after using the old corrupted data. I wonder if we can mark all the oldmem as readonly

Re: [PATCH v6 08/25] iommu: exynos: refactor function parameters to simplify code

2015-05-05 Thread Joerg Roedel
On Mon, May 04, 2015 at 10:16:03AM +0200, Marek Szyprowski wrote: @@ -719,14 +712,12 @@ static void exynos_iommu_domain_free(struct iommu_domain *domain) spin_lock_irqsave(priv-lock, flags); - list_for_each_entry(owner, priv-clients, client) { - while

Re: [PATCH v6 15/25] iommu: exynos: document internal structures

2015-05-05 Thread Joerg Roedel
On Mon, May 04, 2015 at 10:16:10AM +0200, Marek Szyprowski wrote: struct exynos_iommu_domain { - struct list_head clients; /* list of sysmmu_drvdata.node */ + struct list_head clients; /* list of sysmmu_drvdata.domain_node */ sysmmu_pte_t *pgtable; /* lv1 page table, 16KB */

Re: [PATCH] IOMMU: Removed checkpatch warnings for Missing a blank line after declarations

2015-05-05 Thread Joerg Roedel
On Thu, Apr 16, 2015 at 11:32:47PM -0500, Robert Callicotte wrote: Fixed checkpatch warnings for missing blank line after declaration of struct. Signed-off-by: Robert Callicotte rcallico...@gmail.com Applied, thanks. ___ iommu mailing list

Re: [PATCH v10 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-05 Thread Joerg Roedel
On Tue, May 05, 2015 at 02:14:23PM +0800, Dave Young wrote: The failure is nothing different, but as I said in another reply the difference is we could use corrupted data to possiblly cause more failure. I still fail to see how things can get more worse than they already are by reusing the old

Re: PROBLEM: Deadlock in attach_device() in AMD IOMMU driver

2015-05-05 Thread Joerg Roedel
Hi Gregor, On Tue, May 05, 2015 at 10:24:13AM +0100, Gregor Dick wrote: The problem occurs when a network driver (sfc.ko, here an internal testing version) enables SR-IOV on its device by calling pci_enable_sriov(). There are two PFs for this physical device. This call in turn results in a

Re: [PATCH v6 09/25] iommu: exynos: remove unused functions, part 2

2015-05-05 Thread Joerg Roedel
On Mon, May 04, 2015 at 10:16:04AM +0200, Marek Szyprowski wrote: After refactoring functions to use pointer to struct sysmmu_drvdata directly, some functions became useless and thus never used, so remove them completely. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com ---

Re: PROBLEM: Deadlock in attach_device() in AMD IOMMU driver

2015-05-05 Thread Joerg Roedel
On Tue, May 05, 2015 at 03:47:48PM +0100, Gregor Dick wrote: Hi Joerg, On 05/05/15 15:41, Joerg Roedel wrote: Do you see a real deadlock or only the lockdep warning? In the code it looks like virtfn_add() takes the sriov-lock of the physical device while pci_enable_ats() (when called from

Re: [PATCH v6 10/25] iommu: exynos: remove useless device_add/remove callbacks

2015-05-05 Thread Joerg Roedel
On Mon, May 04, 2015 at 10:16:05AM +0200, Marek Szyprowski wrote: The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Hmm,

Re: [git pull] IOMMU Updates for Linux v4.1

2015-05-05 Thread Josh Boyer
On Sun, May 3, 2015 at 2:18 AM, Oded Gabbay oded.gab...@amd.com wrote: On 05/03/2015 01:14 AM, Joerg Roedel wrote: Hi Oded, On Sat, May 02, 2015 at 07:59:39PM +0300, Oded Gabbay wrote: However, Joerg is not answering my emails for some reason (vacation/sick?) Sorry, I was travelling

Re: [PATCH 1/1 linux-next] iommu/msm: make msm_iommu_lock static

2015-05-05 Thread Joerg Roedel
On Wed, Apr 29, 2015 at 09:05:17PM +0200, Fabian Frederick wrote: msm_iommu_lock is only used in msm_iommu.c Signed-off-by: Fabian Frederick f...@skynet.be --- drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) This driver is marked BROKEN, I think its more

Re: [RFC PATCH] iommu: add ARM short descriptor page table allocator.

2015-05-05 Thread Joerg Roedel
On Tue, Apr 28, 2015 at 03:41:21PM +0800, Yong Wu wrote: This patch is for ARM Short Descriptor Format.It has 2-levels pagetable and the allocator supports 4K/64K/1M/16M. Signed-off-by: Yong Wu yong...@mediatek.com --- drivers/iommu/Kconfig| 7 + drivers/iommu/Makefile

Re: [RFC PATCH] iommu: add ARM short descriptor page table allocator.

2015-05-05 Thread Will Deacon
On Tue, May 05, 2015 at 05:18:02PM +0100, Joerg Roedel wrote: On Tue, Apr 28, 2015 at 03:41:21PM +0800, Yong Wu wrote: This patch is for ARM Short Descriptor Format.It has 2-levels pagetable and the allocator supports 4K/64K/1M/16M. Signed-off-by: Yong Wu yong...@mediatek.com ---

Re: [PATCH v10 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-05 Thread Dave Young
On 05/04/15 at 06:23pm, Joerg Roedel wrote: On Fri, Apr 24, 2015 at 04:49:57PM +0800, Dave Young wrote: I'm more than happy to see this issue can be fixed in the patchset, I do not agree to add the code there with such problems. OTOH, for now seems there's no way to fix it. And that's

Re: [PATCH v9 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-05 Thread Dave Young
On 05/04/15 at 01:05pm, Joerg Roedel wrote: On Fri, Apr 03, 2015 at 04:40:31PM +0800, Dave Young wrote: Have not read all the patches, but I have a question, not sure this has been answered before. Old memory is not reliable, what if the old memory get corrupted before panic? Is it safe to

RE: [iommu:ppc/pamu 1/1] drivers/iommu/fsl_pamu.h:24:32: fatal error: asm/fsl_pamu_stash.h: No such file or directory

2015-05-05 Thread Varun Sethi
Hi Joerg, -Original Message- From: jroe...@suse.de [mailto:jroe...@suse.de] Sent: Tuesday, May 05, 2015 7:13 PM To: Sethi Varun-B16395 Cc: j...@8bytes.org; iommu@lists.linux-foundation.org; Bucur Madalin- Cristian-B32716 Subject: Re: [iommu:ppc/pamu 1/1]

PROBLEM: Deadlock in attach_device() in AMD IOMMU driver

2015-05-05 Thread Gregor Dick
Joerg, I see a deadlock in pci_enable_ats() called from attach_device() in drivers/iommu/amd_iommu.c. It appears to be a recursive attempt to take pci_sriov::lock. The problem occurs when a network driver (sfc.ko, here an internal testing version) enables SR-IOV on its device by calling

Re: PROBLEM: Deadlock in attach_device() in AMD IOMMU driver

2015-05-05 Thread Gregor Dick
Hi Joerg, On 05/05/15 15:41, Joerg Roedel wrote: Do you see a real deadlock or only the lockdep warning? In the code it looks like virtfn_add() takes the sriov-lock of the physical device while pci_enable_ats() (when called from there) takes the sriov-lock of the virtual function. In this case