[PATCH v2] iommu/amd: Use wait_event in put_pasid_state_wait

2015-02-05 Thread Joerg Roedel
On Wed, Feb 04, 2015 at 05:34:50PM +0100, Peter Zijlstra wrote: You just lost your atomic_dec. So this should be the correct version then. From 2a52250e542d8964c8285a37b71fe838a44c05c4 Mon Sep 17 00:00:00 2001 From: Joerg Roedel jroe...@suse.de Date: Wed, 4 Feb 2015 15:50:38 +0100 Subject

Re: [PATCH] x86: irq: Check for valid irq descriptor in check_irq_vectors_for_cpu_disable

2015-02-06 Thread Joerg Roedel
Hi Jiang, On Thu, Feb 05, 2015 at 01:51:26PM +0800, Jiang Liu wrote: Reviewed-by: Jiang Liu jiang@linux.intel.com Thanks for your review. Actually there's another racing pattern. for (irq = 0; irq nr_irqs; irq++) { desc = irq_to_desc(irq); access desc-xxx } When

Re: [PATCH] iommu/amd: Fix amd_iommu_free_device()

2015-02-03 Thread Joerg Roedel
Hi Linus, On Tue, Feb 03, 2015 at 11:23:44AM -0800, Linus Torvalds wrote: The linux wakeup model has always been that there can be multiple sources of wakeup events, and the proper way to wait for something is generally a variation of prepare_to_wait(..); for (;;) {

Re: [PATCH] iommu: fix trace_unmap() to report original iova

2015-01-19 Thread Joerg Roedel
On Mon, Jan 19, 2015 at 03:04:00PM +0100, Joerg Roedel wrote: Instead of adding another variable I think it is better to just move the trace_unmap call before the unmap loop. It can actually replace the pr_debug there. Okay, forget this. I just noticed that your follow-on patch requires

Re: [PATCH] iommu: fix trace_unmap() to report original iova

2015-01-19 Thread Joerg Roedel
On Fri, Jan 16, 2015 at 04:47:19PM -0700, Shuah Khan wrote: iommu_unmap() calls trace_unmap() with changed iova and original size. trace_unmap() should report original iova instead. Change iommu_unmap() to call trace_unmap() with original iova. Signed-off-by: Shuah Khan

Re: [PATCH v10] iopoll: Introduce memory-mapped IO polling macros

2015-01-19 Thread Joerg Roedel
On Thu, Jan 15, 2015 at 10:25:11AM +, Will Deacon wrote: If you get an Ack from any of Arnd/Joerg/akpm then I'm happy to take it via the arm-smmu pull (along with the patch making use of it). Joerg, would you be ok with that? I am ok with that, but like to have another Ack for it.

[PATCH 13/15] iommu/rockchip: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/rockchip-iommu.c | 40 1 file changed, 24 insertions(+), 16

[PATCH 00/15] iommu: Move domain allocation into drivers

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Hi, here is patch-set to replace the existing domain_init and domain_destroy iommu-ops with the new domain_alloc and domain_free callbacks The new callbacks move the allocation of iommu domains into the iommu driver, allowing them to put a generic iommu_domain

[PATCH 14/15] iommu/fsl: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/fsl_pamu_domain.c | 60 ++--- drivers/iommu/fsl_pamu_domain.h

[PATCH 2/4] iommu/exynos: Make driver depend on REGULATOR

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de When regulator is not selected during kconfig, linking of the exynos iommu driver fails due to missing symbols. Fix it! Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/15] iommu/tegra-smmu: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/tegra-smmu.c | 41 +++-- 1 file changed, 23 insertions(+), 18

[PATCH 07/15] iommu/exynos: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/exynos-iommu.c | 87 1 file changed, 47 insertions

[PATCH 05/15] iommu/omap: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement the new domain_alloc and domain_free call-backs and remove the old domain_init/destroy ones. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/omap-iommu.c | 49 +++--- 1 file changed, 29 insertions

[PATCH 2/5] iommu: Allocate a default domain for iommu groups

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de The default domain will be used (if supported by the iommu driver) when the devices in the iommu group are not attached to any other domain. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 26 +++--- 1 file changed

[PATCH 5/5] iommu: Add iommu_get_domain_for_dev function

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de This function can be used to request the current domain a device is attached to. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 18 ++ include/linux/iommu.h | 6 ++ 2 files changed, 24 insertions(+) diff --git

[PATCH 4/5] iommu: Make sure a device is always attached to a domain

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Make use of the default domain and re-attach a device to it when it is detached from another domain. Also enforce that a device has to be in the default domain before it can be attached to a different domain. Signed-off-by: Joerg Roedel jroe...@suse.de

[PATCH v2] kvm: iommu: Add cond_resched to legacy device assignment code

2015-01-27 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de When assigning devices to large memory guests (=128GB guest memory in the failure case) the functions to create the IOMMU page-tables for the whole guest might run for a very long time. On non-preemptible kernels this might cause Soft-Lockup warnings. Fix

Re: [PATCH 1/3] swiotlb: Warn on allocation failure in swiotlb_alloc_coherent

2015-01-26 Thread Joerg Roedel
On Fri, Jan 23, 2015 at 06:04:25PM +0100, Borislav Petkov wrote: On Tue, Jan 06, 2015 at 03:51:12PM +0100, Joerg Roedel wrote: + +err_warn: + pr_warn(swiotlb: coherent allocation failed for device %s size=%zu\n, + dev_name(hwdev), size); + dump_stack(); Are we really

Re: [PATCH 2/3] x86, swiotlb: Try coherent allocations with __GFP_NOWARN

2015-01-26 Thread Joerg Roedel
On Mon, Jan 26, 2015 at 11:22:36AM +0800, Baoquan He wrote: Ok, so this practically does all allocations __GFP_NOWARN now. Shouldn't you be doing this before swiotlb_alloc_coherent() and not before dma_generic_alloc_coherent()? I think this patch mainly suppress warning from buddy

Re: [PATCH 3/3] x86, crash: Allocate enough low-mem when crashkernel=high

2015-01-26 Thread Joerg Roedel
Hi Baoquan, thanks for your reply. On Fri, Jan 23, 2015 at 04:44:53PM +0800, Baoquan He wrote: 2) increase low-mem when crashkernel=high. But we have to be careful to do this. We implement crashkernel=high not only for the unhappiness crashkernel reservation is limited below 4G, but dma/dma32

Re: [PATCH 3/3] x86, crash: Allocate enough low-mem when crashkernel=high

2015-01-26 Thread Joerg Roedel
On Fri, Jan 23, 2015 at 06:02:43PM +0100, Borislav Petkov wrote: On Tue, Jan 06, 2015 at 03:51:14PM +0100, Joerg Roedel wrote: From: Joerg Roedel jroe...@suse.de When the crashkernel is loaded above 4GiB in memory the first kernel only allocates 72MiB of low-memory for the DMA

Re: [PATCH] iommu: fix trace_map() to report original iova and original size

2015-01-26 Thread Joerg Roedel
On Thu, Jan 15, 2015 at 07:29:43PM -0700, Shuah Khan wrote: iommu_map() calls trace_map() with iova and size. trace_map() should report original iova and original size as opposed to iova and size after they get changed during mapping. size is always zero at the end of mapping which is useless

[PATCH 1/4] iommu: Make more drivers depend on COMPILE_TEST

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de For easier compile testing of these iommu drivers. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/Kconfig | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 325188e

[PATCH 0/4] iommu: Small fixes and cleanups

2015-01-26 Thread Joerg Roedel
Hi, here are a couple of iommu fixes and cleanups to fix compile errors and some warnings on ARM and PPC. Regards, Joerg Joerg Roedel (4): iommu: Make more drivers depend on COMPILE_TEST iommu/exynos: Make driver depend on REGULATOR iommu/omap: Print phys_addr_t using %pa iommu

[PATCH 3/4] iommu/omap: Print phys_addr_t using %pa

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Fixes this compile warning: drivers/iommu/omap-iommu.c: In function 'omap_iommu_map': drivers/iommu/omap-iommu.c:1139:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'phys_addr_t' [-Wformat=] dev_dbg(dev, mapping da

[PATCH 01/15] iommu: Introduce domain_alloc and domain_free iommu_ops

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de These new call-backs defer the allocation and destruction of 'struct iommu_domain' to the iommu driver. This allows drivers to embed this struct into their private domain structures and to get rid of the domain_init and domain_destroy call-backs when all drivers

[PATCH 03/15] iommu/amd: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement the new iommu-ops function pointers and remove the obsolete domain_init and domain_destroy functions. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 84 ++--- drivers/iommu

[PATCH 02/15] iommu: Introduce iommu domain types

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de This allows to handle domains differently based on their type in the future. An IOMMU driver can implement certain optimizations for DMA-API domains for example. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 5 +++-- include/linux

[PATCH 4/4] iommu/fsl: Use %pa to print phys_addr_t

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Fix two compile warnings. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/fsl_pamu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index 80ac68d..e63904b 100644

[PATCH 15/15] iommu: Remove domain_init and domain_free iommu_ops

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de All drivers have been converted to the new domain_alloc and domain_free iommu-ops. So remove the old ones and get rid of iommu_domain-priv too, as this is no longer needed when the struct iommu_domain is embedded in the private structures of the iommu drivers

[PATCH 12/15] iommu/ipmmu-vmsa: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/ipmmu-vmsa.c | 43 --- 1 file changed, 24 insertions(+), 19

[PATCH 11/15] iommu/shmobile: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/shmobile-iommu.c | 40 1 file changed, 24 insertions(+), 16

[PATCH 06/15] iommu/arm-smmu: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/arm-smmu.c | 46 +++--- 1 file changed, 27 insertions(+), 19

[PATCH 10/15] iommu/msm: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/msm_iommu.c | 73 +++ 1 file changed, 36 insertions

[PATCH 04/15] iommu/vt-d: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Get rid of domain_init and domain_destroy and implement domain_alloc/domain_free instead. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/intel-iommu.c | 48 ++--- 1 file changed, 28 insertions(+), 20

[PATCH 09/15] iommu/tegra-gart: Make use of domain_alloc and domain_free

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/tegra-gart.c | 67 +++--- 1 file changed, 46 insertions

[PATCH 1/5] iommu: Add default domain to iommu-groups

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index e66cc08..34636eb 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c

[RFC PATCH 0/5] iommu: Introduce default domains for iommu groups

2015-01-26 Thread Joerg Roedel
more explict. With patch 3 applied, attach/detach_device will only succeed when the device is the only one in its group. This probably requires changes in the callers, which are not included here. Any useful comments and feedback appreciated. Thanks, Joerg Joerg Roedel (5): iommu: Add

[PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group

2015-01-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de This patch changes the behavior of the iommu_attach_device and iommu_detach_device functions. With this change these functions only work on devices that have their own group. For all other devices the iommu_group_attach/detach functions must be used. Signed-off

[git pull] IOMMU Fixes for Linux v3.19-rc3

2015-01-30 Thread Joerg Roedel
Hi Linus, The following changes since commit 26bc420b59a38e4e6685a73345a0def461136dce: Linux 3.19-rc6 (2015-01-25 20:04:41 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v3.19-rc6 for you to fetch changes up to

Re: [PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device

2015-01-05 Thread Joerg Roedel
Hi Jerry, On Wed, Dec 17, 2014 at 02:37:47PM -0700, Jerry Hoemann wrote: Before applying this change on a 3.18-rc7 kernel layered on a RHEL 7.0 root disk, I was able to reproduce the memory leak that Alex reported when powering on/off a VM w/ a PCI device assigned to it. After applying

Re: [PATCH] iommu: Fix build of allmod/allyes config on ARMv8 architecture

2015-01-05 Thread Joerg Roedel
On Fri, Dec 05, 2014 at 02:47:37PM +0100, Krzysztof Kozlowski wrote: drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to iommu/fixes, thanks. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: [PATCH 09/28] iommu: drop owner assignment from platform_drivers

2015-01-05 Thread Joerg Roedel
On Sun, Dec 21, 2014 at 10:14:30PM +0100, Wolfram Sang wrote: This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang w...@the-dreams.de --- Generated with coccinelle. SmPL file is in the introductory msg. The big cleanup

Re: [PATCH] iommu: Fix build of allmod/allyes config on ARMv8 architecture

2015-01-05 Thread Joerg Roedel
On Mon, Jan 05, 2015 at 12:09:03PM +0100, Krzysztof Kozlowski wrote: Thanks, but... Few days after my patch Mark Brown posted something similar: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-December/310743.html It was merged by Arnd Bergman and sent to Linus around 3.19-rc1. It

Re: Question about: AMD-Vi: Event logged [IO_PAGE_FAULT ...

2015-01-05 Thread Joerg Roedel
Hello Raimonds, On Mon, Jan 05, 2015 at 05:25:25PM +0200, Raimonds Cicans wrote: After kernel upgrade (3.13 = 3.17) I started to receive following string in my logs: AMD-Vi: Event logged [IO_PAGE_FAULT device=08:00.0 domain=0x001c address=0x01355000 flags=0x] I would like to

[PATCH 3/3] x86, crash: Allocate enough low-mem when crashkernel=high

2015-01-06 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de When the crashkernel is loaded above 4GiB in memory the first kernel only allocates 72MiB of low-memory for the DMA requirements of the second kernel. On systems with many devices this is not enough and causes device driver initialization errors and failed crash

[PATCH 2/3] x86, swiotlb: Try coherent allocations with __GFP_NOWARN

2015-01-06 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de When we boot a kdump kernel in high memory, there is by default only 72MB of low memory available. The swiotlb code takes 64MB of it (by default) so that there are only 8MB left to allocate from. On systems with many devices this causes page allocator warnings

[PATCH 1/3] swiotlb: Warn on allocation failure in swiotlb_alloc_coherent

2015-01-06 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Print a warning when all allocation tries have been failed and the function is about to return NULL. This prepares for calling the function with __GFP_NOWARN to suppress allocation failure warnings before all fall-backs have failed. Signed-off-by: Joerg Roedel

[PATCH 0/3 v2] Fix kdump failures with crashkernel=high

2015-01-06 Thread Joerg Roedel
on the affected systems, 128MiB low-memory was still not enough there, thus I set the value to 256MiB to fix the issues. Any feedback appreciated. Thanks, Joerg Joerg Roedel (3): swiotlb: Warn on allocation failure in swiotlb_alloc_coherent x86, swiotlb: Try coherent allocations

Re: [PATCH v8 01/10] iommu/vt-d: Update iommu_attach_domain() and its callers

2015-01-12 Thread Joerg Roedel
On Mon, Jan 12, 2015 at 03:06:19PM +0800, Li, Zhen-Hua wrote: Allow specification of the domain-id for the new domain. This patch only adds the 'did' parameter to iommu_attach_domain() and modifies all of its callers to specify the default value of -1 which says no did specified, allocate a

Re: [PATCH v8 02/10] iommu/vt-d: Items required for kdump

2015-01-12 Thread Joerg Roedel
On Mon, Jan 12, 2015 at 10:29:19AM -0500, Vivek Goyal wrote: Kdump has the notion of backup region. Where certain parts of old kernels memory can be moved to a different location (first 640K on x86 as of now) and new kernel can make use of this memory now. So we will have to just make sure

Re: [PATCH] iommu/amd: Track when amd_iommu_v2 init is complete

2015-01-12 Thread Joerg Roedel
Hi Oded, On Mon, Dec 22, 2014 at 12:23:44PM +0200, Oded Gabbay wrote: The drm guys suggested we move iommu/ subsystem before gpu/ subsystem in drivers/Makefile instead of the above patch (and the complementing patch-set in amdkfd). I did that and it works, so please see this patch as

Re: [PATCH v8 02/10] iommu/vt-d: Items required for kdump

2015-01-12 Thread Joerg Roedel
On Mon, Jan 12, 2015 at 03:06:20PM +0800, Li, Zhen-Hua wrote: + +#ifdef CONFIG_CRASH_DUMP + +/* + * Fix Crashdump failure caused by leftover DMA through a hardware IOMMU + * + * Fixes the crashdump kernel to deal with an active iommu and legacy + * DMA from the (old) panicked kernel in a

Re: [PATCH v8 02/10] iommu/vt-d: Items required for kdump

2015-01-13 Thread Joerg Roedel
On Tue, Jan 13, 2015 at 04:12:29PM +0800, Li, ZhenHua wrote: Current status: 1. Use old root entry table, 2. Copy old context entry tables. 3. Copy old page tables. 4. Allocate new page table when device driver is loading. I remember the progress we discussed was this. Checking the old

Re: [Patch v2 00/16] Refine IR initialization flow and fixes bugs related to X2APIC

2015-01-09 Thread Joerg Roedel
my Tested-by: Joerg Roedel jroe...@suse.de Regards, Joerg -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH 0/3 v2] Fix kdump failures with crashkernel=high

2015-01-14 Thread Joerg Roedel
Ping. On Tue, Jan 06, 2015 at 03:51:11PM +0100, Joerg Roedel wrote: v1-v2: * Updated comments based on feedback from Konrad * Added Acked-bys * Rebased to v3.19-rc3 Hi, here is a patch-set to fix failed kdump kernel boots when the systems was booted with crashkernel=X,high. On those

Re: [PATCH v8 02/10] iommu/vt-d: Items required for kdump

2015-01-12 Thread Joerg Roedel
On Mon, Jan 12, 2015 at 11:15:38AM -0500, Vivek Goyal wrote: On Mon, Jan 12, 2015 at 05:06:46PM +0100, Joerg Roedel wrote: On Mon, Jan 12, 2015 at 10:29:19AM -0500, Vivek Goyal wrote: Kdump has the notion of backup region. Where certain parts of old kernels memory can be moved

Re: [GIT PULL] x86/apic updates for v3.20

2015-02-13 Thread Joerg Roedel
On Thu, Feb 12, 2015 at 06:08:45PM -0800, Linus Torvalds wrote: Any ideas? The Pixel Chromebook does have an odd and often broken BIOS/firmware thing, but it *used* to suspend and resume very reliably once we got around its insane TPM thing. Hmm, looking at the patch and the surrounding code

Re: [PATCH 0/3 v2] Fix kdump failures with crashkernel=high

2015-02-14 Thread Joerg Roedel
Hi Baoquan, On Sat, Feb 14, 2015 at 06:58:34PM +0800, Baoquan He wrote: This patch is very helpful and necessary since several users complained about the failure caused by not enough low mem. And the default value 256M is suitable since the testing data showed it's sufficient now and should

Re: [PATCH 3/3] x86, crash: Allocate enough low-mem when crashkernel=high

2015-02-09 Thread Joerg Roedel
Hi Baoquan, On Wed, Feb 04, 2015 at 03:10:20PM +0100, Joerg Roedel wrote: That makes sense. I also asked the customer to test intermediate values, we already know that it works with 256MB but also that 128MB are not enough. I will report back when I have the results of the intermediate values

[git pull] IOMMU Updates for Linux v3.20

2015-02-12 Thread Joerg Roedel
iommu/arm-smmu: Avoid build warning Emil Medve (3): iommu/fsl: Fix section mismatch iommu/fsl: Remove unused fsl_of_pamu_ids[] iommu/fsl: Various cleanups Joerg Roedel (9): Merge branch 'iommu/next' of git://linuxtv.org/pinchartl/fbdev into arm/renesas Merge branch

Re: [PATCH 3/3] x86, crash: Allocate enough low-mem when crashkernel=high

2015-02-13 Thread Joerg Roedel
Hi Baoquan, On Fri, Feb 13, 2015 at 11:34:38PM +0800, Baoquan He wrote: Conclusively, I like 256M since the testing data showed it's sufficient now and should be save for a long time. Thanks, I am fine with 256MB too, so can I have your Acked-by on this series? I will rebase and resend it then

[git pull] IOMMU Fixes for Linux v3.19-rc3

2015-01-07 Thread Joerg Roedel
-d driver * Compile error fix for the VMSA IPMMU driver because of the IOMMU_EXEC - IOMMU_NOEXEC conversion * Two small cleanups as an aftermath of the merge window and the domain-leak fix Joerg

[git pull] IOMMU Fixes for Linux v4.0-rc3

2015-03-10 Thread Joerg Roedel
Hi Linus, The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539: Linux 4.0-rc1 (2015-02-22 18:21:14 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.0-rc3 for you to fetch changes up to

Re: [PATCH] iommu/vt-d: Remove unused variable

2015-03-24 Thread Joerg Roedel
On Mon, Mar 23, 2015 at 07:50:21PM -0600, Alex Williamson wrote: Unused after commit 71684406905f (iommu/vt-d: Detach domain *only* from attached iommus). Reported by 0-day builder. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/iommu/intel-iommu.c |1 - 1 file

Re: BUG: SCSI aic7xxx driver and AMD IOMMU

2015-03-25 Thread Joerg Roedel
On Tue, Mar 24, 2015 at 07:57:49AM -0400, Mark Hounschell wrote: I'll be happy to test it. Okay, here you go: git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git amd-iommu This branch has two patches on-top of v4.0-rc5 which should fix the issue you described here. Please let

Re: BUG: SCSI aic7xxx driver and AMD IOMMU

2015-03-25 Thread Joerg Roedel
Hi again, On Wed, Mar 25, 2015 at 02:59:37PM +0100, Joerg Roedel wrote: On Tue, Mar 24, 2015 at 07:57:49AM -0400, Mark Hounschell wrote: I'll be happy to test it. Okay, here you go: git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git amd-iommu I just added more patches

[PATCH 03/16] iommu: Only allow iommu_map/unmap for paging domains

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Check for the new __IOMMU_DOMAIN_PAGING flag before calling into the iommu drivers -map and -unmap call-backs. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/iommu.c

[PATCH 01/16] iommu: Introduce domain_alloc and domain_free iommu_ops

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de These new call-backs defer the allocation and destruction of 'struct iommu_domain' to the iommu driver. This allows drivers to embed this struct into their private domain structures and to get rid of the domain_init and domain_destroy call-backs when all drivers

[PATCH 15/16] iommu/fsl: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/fsl_pamu_domain.c | 60 ++--- drivers/iommu/fsl_pamu_domain.h

[PATCH 12/16] iommu/shmobile: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/shmobile-iommu.c | 39 +++ 1 file changed, 23 insertions(+), 16

[PATCH 05/16] iommu/vt-d: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Get rid of domain_init and domain_destroy and implement domain_alloc/domain_free instead. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/intel-iommu.c | 48 ++--- 1 file changed, 28 insertions(+), 20

[PATCH 04/16] iommu/amd: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement the new iommu-ops function pointers and remove the obsolete domain_init and domain_destroy functions. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 84 ++--- drivers/iommu

[PATCH 00/16 v2] iommu: Move domain allocation into drivers

2015-03-26 Thread Joerg Roedel
for x86, ARM and PPC and runtime tested on x86 (Intel VT-d and AMD IOMMU). Please review. Thanks, Joerg Joerg Roedel (15): iommu: Introduce domain_alloc and domain_free iommu_ops iommu: Introduce iommu domain types iommu/amd: Make use of domain_alloc and domain_free iommu/vt-d

[PATCH 13/16] iommu/ipmmu-vmsa: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/ipmmu-vmsa.c | 41 +++-- 1 file changed, 23 insertions(+), 18

[PATCH 10/16] iommu/tegra-gart: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/tegra-gart.c | 67 +++--- 1 file changed, 46 insertions

[PATCH 16/16] iommu: Remove domain_init and domain_free iommu_ops

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de All drivers have been converted to the new domain_alloc and domain_free iommu-ops. So remove the old ones and get rid of iommu_domain-priv too, as this is no longer needed when the struct iommu_domain is embedded in the private structures of the iommu drivers

[PATCH 11/16] iommu/msm: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/msm_iommu.c | 73 +++ 1 file changed, 36 insertions

[PATCH 14/16] iommu/rockchip: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/rockchip-iommu.c | 40 1 file changed, 24 insertions(+), 16

[PATCH 08/16] iommu/exynos: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/exynos-iommu.c | 87 1 file changed, 47 insertions

[PATCH 02/16] iommu: Introduce iommu domain types

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de This allows to handle domains differently based on their type in the future. An IOMMU driver can implement certain optimizations for DMA-API domains for example. The domain types can be extended later and some of the existing domain attributes can be migrated

[PATCH 07/16] iommu/arm-smmu: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/arm-smmu.c | 46 +++--- 1 file changed, 27 insertions(+), 19

[PATCH 09/16] iommu/tegra-smmu: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement domain_alloc and domain_free iommu-ops as a replacement for domain_init/domain_destroy. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/tegra-smmu.c | 41 +++-- 1 file changed, 23 insertions(+), 18

Re: BUG: SCSI aic7xxx driver and AMD IOMMU

2015-03-26 Thread Joerg Roedel
On Wed, Mar 25, 2015 at 12:36:34PM -0400, Mark Hounschell wrote: BTW, so far the first 2 patches are working well. I was going to wait until the end of the day to report but so far I have been unable to produce the problems I was seeing. And I am in the middle of some driver work so lots of

[PATCH 06/16] iommu/omap: Make use of domain_alloc and domain_free

2015-03-26 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Implement the new domain_alloc and domain_free call-backs and remove the old domain_init/destroy ones. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/omap-iommu.c | 49 +++--- 1 file changed, 29 insertions

Re: [v4 2/8] iommu, x86: Define new irte structure for VT-d Posted-Interrupts

2015-03-31 Thread Joerg Roedel
On Tue, Mar 24, 2015 at 02:32:01AM +, Wu, Feng wrote: I think it is better to put this as a union into struct irte. It saves memory and unnecessary casting in later patches. Thanks for the comments! Thinking more about this, I think its probably fine to keep the two versions of the

[PATCH 0/9] AMD IOMMU Updates for v4.1

2015-04-01 Thread Joerg Roedel
Hi, here are a few fixes and enhancements for the AMD IOMMU driver for the next merge window. They are tested on different versions of AMD IOMMUs. Please review. Thanks, Joerg Joerg Roedel (9): iommu/amd: Use BUS_NOTIFY_REMOVED_DEVICE iommu/amd: Ignore BUS_NOTIFY_UNBOUND_DRIVER

[PATCH 7/9] iommu/amd: Optimize alloc_new_range for new fetch_pte interface

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Now that fetch_pte returns the page-size of the pte, the call in this function can also be optimized a little bit. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 1/9] iommu/amd: Use BUS_NOTIFY_REMOVED_DEVICE

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Use the new device-notifier event instead of the old BUS_NOTIFY_DEL_DEVICE to make sure the device driver had a chance to uninit the device before all its mappings are teared down. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 2

[PATCH 8/9] iommu/amd: Optimize amd_iommu_iova_to_phys for new fetch_pte interface

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Now that fetch_pte returns the page-size of the pte, this function can be optimized too. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/iommu

[PATCH 2/9] iommu/amd: Ignore BUS_NOTIFY_UNBOUND_DRIVER event

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Detaching a device from its domain at this event is problematic for several reasons: * The device might me in an alias group and detaching it will also detach all other devices in the group. This removes valid DMA mappings from

[PATCH 6/9] iommu/amd: Optimize iommu_unmap_page for new fetch_pte interface

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Now that fetch_pte returns the page-size of the pte, this function can be optimized a lot. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 32 1 file changed, 8 insertions(+), 24 deletions(-) diff

[PATCH 3/9] iommu/amd: Don't allocate with __GFP_ZERO in alloc_coherent

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Don't explicitly add __GFP_ZERO to the allocator flags. Leave this up to the caller. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu

[PATCH 9/9] iommu/amd: Correctly encode huge pages in iommu page tables

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de When a default page-size for given level should be mapped, the level encoding must be 0 rather than 7. This fixes an issue seen on IOMMUv2 hardware, where this encoding is enforced. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 11

[PATCH 4/9] iommu/amd: Add support for contiguous dma allocator

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Add code to allocate memory from the contiguous memory allocator to support coherent allocations larger than 8MB. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 44 1 file changed, 28

[PATCH 5/9] iommu/amd: Return the pte page-size in fetch_pte

2015-04-01 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Extend the fetch_pte function to also return the page-size that is mapped by the returned pte. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 52 - drivers/iommu/amd_iommu_types.h | 6

[git pull] IOMMU Fixes for Linux v4.0-rc6

2015-04-01 Thread Joerg Roedel
Hi Linus, The following changes since commit bc465aa9d045feb0e13b4a8f32cc33c1943f62d6: Linux 4.0-rc5 (2015-03-22 16:50:21 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.0-rc6 for you to fetch changes up to

Re: [PATCH 00/16 v2] iommu: Move domain allocation into drivers

2015-03-31 Thread Joerg Roedel
Hi Alex, On Fri, Mar 27, 2015 at 10:24:22PM -0600, Alex Williamson wrote: For 1-5,16 Reviewed-by: Alex Williamson alex.william...@redhat.com Thanks a lot for your review. My only comment/question is whether you'd want to consider using ERR_PTR() return values from domain_alloc(). It's an

Re: [PATCH 00/16 v2] iommu: Move domain allocation into drivers

2015-03-31 Thread Joerg Roedel
Hi Will, On Mon, Mar 30, 2015 at 06:43:15PM +0100, Will Deacon wrote: Whilst I'm still a bit worried about the ability of the IOMMU driver to do very much in the -domain_alloc callback (since we don't know which IOMMU instance the domain is for), it doesn't leave us any worse off than we

Re: [PATCH 00/16 v2] iommu: Move domain allocation into drivers

2015-03-31 Thread Joerg Roedel
On Thu, Mar 26, 2015 at 01:43:03PM +0100, Joerg Roedel wrote: Changes v1-v2: * Rebased to v4.0-rc5 * Converted domain-types to a bit-field Applied this series to the core branch. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

<    5   6   7   8   9   10   11   12   13   14   >