[PATCH 3/3] iommu/amd: Re-enable IOMMU event log interrupt after handling.

2013-03-27 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Current driver does not clear the IOMMU event log interrupt bit in the IOMMU status register after processing an interrupt. This causes the IOMMU hardware to generate event log interrupt only once. This has been observed in both IOMMU v1 and V2 hardware. This patch cle

[PATCH 1/3] iommu/amd: Add logic to decode AMD IOMMU event flag

2013-03-27 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Add logic to decode AMD IOMMU event flag based on information from AMD IOMMU specification. This should simplify debugging IOMMU errors. Also, dump DTE information in additional cases. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd_iommu.c | 161

[PATCH 2/3] iommu/amd: Add IOMMU event log injection interface for testing event flag decoding logic

2013-03-27 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Add IOMMU event log injection interface for testing event flag decoding logic. This interface allows users to specify device id, event flag, and event types via debugfs. echo 0x300 > /sys/kernel/debug/amd-iommu-evninj/devid // (e.g. Bus:Dev.fun 3:0.0) echo 0xfff > /

[PATCH 0/3] iommu/amd: Improve IOMMU Event Log Interrupt Handling

2013-03-27 Thread suravee.suthikulpanit
From: Suravee Suthikulpanit Typically, IOMMU events are logged into the event log. Current driver processes each event in the log when the hardware generate an MSI interrupt. It reports event type, device ID, raw status flag, and etc. in the kernel log (dmesg) 1. The first patch improve even

Re: [PATCH] intel-iommu: Synchronize gcmd value with global command register

2013-03-27 Thread Joerg Roedel
On Wed, Mar 27, 2013 at 02:02:44PM +0900, Takao Indoh wrote: > The root cause of this problem is mismatch between iommu->gcmd and > global command register in the case of kdump. At boot time, initial > value of iommu->gcmd is zero as I wrote above, but actual global command > register is *not* zero

[git pull] IOMMU Fixes for v3.9-rc4

2013-03-27 Thread Joerg Roedel
Hi Linus, The following changes since commit 6dbe51c251a327e012439c4772097a13df43c5b8: Linux 3.9-rc1 (2013-03-03 15:11:05 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v3.9-rc4 for you to fetch changes up to c2

[PATCH] iommu/amd: Make sure dma_ops are set for hotplug devices

2013-03-27 Thread Joerg Roedel
There is a bug introduced with commit 27c2127 that causes devices which are hot unplugged and then hot-replugged to not have per-device dma_ops set. This causes these devices to not function correctly. Fixed with this patch. Cc: sta...@vger.kernel.org Reported-by: Andreas Degert Signed-off-by: Jo

Re: soundcard (dma) stopped working with commit 27c2127 (x86/amd-iommu: Use only per-device dma_ops)

2013-03-27 Thread Joerg Roedel
On Wed, Mar 27, 2013 at 08:14:58AM +0100, Andreas Degert wrote: > 2013/3/26 Joerg Roedel : > > Okay, thanks for trying this out. I think I know where the problem is, > > can you try the attached patch (without my debug-patch) and report me > > whether it fixes the issue? > > Yes, works. What is th

Re: soundcard (dma) stopped working with commit 27c2127 (x86/amd-iommu: Use only per-device dma_ops)

2013-03-27 Thread Andreas Degert
2013/3/26 Joerg Roedel : > Okay, thanks for trying this out. I think I know where the problem is, > can you try the attached patch (without my debug-patch) and report me > whether it fixes the issue? Yes, works. What is the value of archdata.dma_ops before the assignment and where is it set? (my h