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

2015-05-12 Thread Alexander Duyck
On 05/12/2015 06:45 PM, Li, ZhenHua wrote: On 05/12/2015 04:17 PM, Dave Young wrote: On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: Add context entry functions needed for kdump. +/* + * Fix Crashdump failure caused by leftover DMA through a hardware IOMMU + * + * Fixes the crashdump kernel to deal

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

2015-05-12 Thread Yong Wu
On Tue, 2015-05-12 at 11:15 +0200, Matthias Brugger wrote: > 2015-04-28 9:41 GMT+02:00 Yong Wu : > > 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 [snip] > > +static phys_addr_t arm_short_iova_to

Re: [PATCH v11 07/10] iommu/vt-d: enable kdump support in iommu module

2015-05-12 Thread Baoquan He
On 05/13/15 at 10:28am, Li, ZhenHua wrote: > >>+static u8 g_translation_pre_enabled; > >Hi Zhenhua, > > > >I haven't checked patch one by one, am going through the code flow. > > > >About g_translation_pre_enabled, I don't think it's necessary to define > >it as a global variable. Both its assignme

Re: [PATCH v11 07/10] iommu/vt-d: enable kdump support in iommu module

2015-05-12 Thread Li, ZhenHua
+static u8 g_translation_pre_enabled; Hi Zhenhua, I haven't checked patch one by one, am going through the code flow. About g_translation_pre_enabled, I don't think it's necessary to define it as a global variable. Both its assignment and judgement are in init_dmars(). In this situation a local

Re: [PATCH v11 07/10] iommu/vt-d: enable kdump support in iommu module

2015-05-12 Thread Baoquan He
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Modify the operation of the following functions when called during crash dump: > iommu_context_addr > free_context_table > get_domain_for_dev > init_dmars > intel_iommu_init > > Bill Sumner: > Original version. > > Zhenhua: >

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

2015-05-12 Thread Li, ZhenHua
One thing must be pointed out: There is a known issue that hpsa driver cannot work well in kdump kernel. And this patchset is not intended to fix this problem. So this patchset cannot work with HP smart array devices which need hpsa driver. On 05/11/2015 05:52 PM, Li, Zhen-Hua wrote: This p

Re: [PATCH v11 05/10] iommu/vt-d: Add functions to load and save old re

2015-05-12 Thread Li, ZhenHua
On 05/12/2015 04:37 PM, Dave Young wrote: Seems the subject was truncated? Maybe "re" means root entry? Then please fix it On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: Add functions to load root entry table from old kernel, and to save updated root entry table. Add two member in struct intel_iom

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

2015-05-12 Thread Li, ZhenHua
On 05/12/2015 04:17 PM, Dave Young wrote: On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: Add context entry functions needed for kdump. +/* + * Fix Crashdump failure caused by leftover DMA through a hardware IOMMU + * + * Fixes the crashdump kernel to deal with an active iommu and legacy + * DMA fro

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

2015-05-12 Thread Matthias Brugger
2015-04-28 9:41 GMT+02:00 Yong Wu : > 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 > --- > drivers/iommu/Kconfig| 7 + > drivers/iommu/Makefile | 1 + > drivers/iomm

Re: [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices

2015-05-12 Thread Will Deacon
Hi Leizhen, Thanks for the review! On Tue, May 12, 2015 at 08:40:06AM +0100, leizhen wrote: > > > + > > +static int queue_poll_cons(struct arm_smmu_queue *q, u32 until, bool wfe) > > +{ > > + ktime_t timeout = ktime_add_us(ktime_get(), ARM_SMMU_POLL_TIMEOUT_US); > > + > > + while (queue_

Re: [PATCH v6 00/25] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2015-05-12 Thread Javier Martinez Canillas
On Mon, May 11, 2015 at 6:00 PM, Javier Martinez Canillas wrote: > Hello Marek, > > On Mon, May 4, 2015 at 10:15 AM, Marek Szyprowski > wrote: >> Hello Everyone, >> >> This is yet another attempt to get Exynos SYSMMU driver with integrated >> with IOMMU & DMA-mapping subsystems. The main change f

Re: [PATCH/RFC 0/4] Probe deferral for IOMMU DT integration

2015-05-12 Thread Laurent Pinchart
Hi Marek, On Wednesday 04 March 2015 10:20:36 Marek Szyprowski wrote: > On 2015-02-16 17:14, Laurent Pinchart wrote: > > On Thursday 05 February 2015 16:31:58 Laura Abbott wrote: > >> Hi, > >> > >> On the heels of Exynos integrating SMMU in to the DT for probing, > >> this series attempts to add

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

2015-05-12 Thread Li, Zhen-Hua
To fix the dmar fault in running v10 with latest upstream version, added a flush in the new function iommu_context_addr. Thanks Zhenhua > > This patchset is an update of Bill Sumner's patchset, implements a fix for: > If a kernel boots with intel_iommu=on on a system that supports intel vt-d,

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

2015-05-12 Thread Dave Young
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > This patchset is an update of Bill Sumner's patchset, implements a fix for: > If a kernel boots with intel_iommu=on on a system that supports intel vt-d, > when a panic happens, the kdump kernel will boot with these faults: > > dmar: DRHD: handlin

Re: [PATCH v11 09/10] iommu/vt-d: Copy functions for irte

2015-05-12 Thread Dave Young
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Functions to copy the irte data from the old kernel into the kdump kernel. Use above line as subject is better, if irte means interrupt remappin table entry then descripbe it then I like the long format in subject line. Also it need a better patch des

Re: [PATCH v11 07/10] iommu/vt-d: enable kdump support in iommu module

2015-05-12 Thread Dave Young
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Modify the operation of the following functions when called during crash dump: > iommu_context_addr > free_context_table > get_domain_for_dev > init_dmars > intel_iommu_init > > Bill Sumner: > Original version. > > Zhenhua: >

Re: [PATCH v11 06/10] iommu/vt-d: datatypes and functions used for kdump

2015-05-12 Thread Dave Young
The patch subject is bad, previous patch you use "Items for kdump", this patch you use "datatypes and functions used for kdump" then what's the difference between these two patches? Please think about a better one for these patches.. On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Populate it with

Re: [PATCH v11 05/10] iommu/vt-d: Add functions to load and save old re

2015-05-12 Thread Dave Young
Seems the subject was truncated? Maybe "re" means root entry? Then please fix it On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Add functions to load root entry table from old kernel, and to save updated > root entry table. > Add two member in struct intel_iommu, to store the RTA in old kernel, and

Re: [PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

2015-05-12 Thread Dave Young
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Add some functions to copy the data from old kernel. > These functions are used to copy context tables and page tables. > > To avoid calling iounmap between spin_lock_irqsave and spin_unlock_irqrestore, > use a link here, store the pointers , and then

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

2015-05-12 Thread Dave Young
On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: > Add context entry functions needed for kdump. > > Bill Sumner: > Original version; > > Li, Zhenhua: > Changed the name of new functions, make them consistent with current > context get/set functions. > Remove the structure dve which is

Re: [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices

2015-05-12 Thread leizhen
> + > +static int queue_poll_cons(struct arm_smmu_queue *q, u32 until, bool wfe) > +{ > + ktime_t timeout = ktime_add_us(ktime_get(), ARM_SMMU_POLL_TIMEOUT_US); > + > + while (queue_sync_cons(q), __queue_cons_before(q, until)) { > + if (ktime_compare(ktime_get(), timeout) > 0)