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

2015-03-18 Thread Li, Zhen-Hua
Modify the operation of the following functions when called during crash dump: device_to_context_entry free_context_table get_domain_for_dev init_dmars intel_iommu_init Bill Sumner: Original version. Zhenhua: The name of new calling functions. Do not disable and re

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

2015-03-18 Thread Li, Zhen-Hua
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 the mapped virt address of it. We use the old RTA in dump kernel, and when the iommu->root_entry is used as a cache in kdump kerne

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

2015-03-18 Thread Li, Zhen-Hua
Populate it with support functions to copy iommu translation tables from from the panicked kernel into the kdump kernel in the event of a crash. Functions: Use old root entry table, and load the old data to root_entry as cache. Malloc new context table and copy old context table to the new

[PATCH v9 03/10] iommu/vt-d: Function to get old context entry

2015-03-18 Thread Li, Zhen-Hua
Interface for when a new domain in the crashdump kernel needs some values from the panicked kernel's context entries. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers

[PATCH v9 10/10] iommu/vt-d: Use old irte in kdump kernel

2015-03-18 Thread Li, Zhen-Hua
Fix the intr-remapping fault. [1.594890] dmar: DRHD: handling fault status reg 2 [1.594894] dmar: INTR-REMAP: Request device [[41:00.0] fault index 4d [1.594894] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear Use old irte in kdump kernel, do not disable and re-enable interr

[PATCH v9 08/10] iommu/vt-d: assign new page table for dma_map

2015-03-18 Thread Li, Zhen-Hua
When a device driver issues the first dma_map command for a device, we assign a new and empty page-table, thus removing all mappings from the old kernel for the device. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 54 ++--- 1 file changed,

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

2015-03-18 Thread Li, Zhen-Hua
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 not used in new version. Signed-off-by: Bill Sumner Signed-

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

2015-03-18 Thread Li, Zhen-Hua
Functions to copy the irte data from the old kernel into the kdump kernel. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 62 + include/linux/intel-iommu.h | 4 +++ 2 files changed, 66 insertions(+) diff --git a/drivers/iommu/i

[PATCH v9 01/10] iommu/vt-d: New function to attach domain with id

2015-03-18 Thread Li, Zhen-Hua
Allow specification of the domain-id for the new domain. This patch only adds a new function iommu_attach_domain_with_id, it is like the function iommu_attach_domain(), only adding a parameter "did". Bill Sumner: (In older versions) Add new 'did' parameter to iommu_attach_domain(); The cal

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

2015-03-18 Thread Li, Zhen-Hua
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 use iounmap to free them in another place. Li, Zhen-h

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

2015-03-18 Thread Li, Zhen-Hua
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: handling fault status reg 102 dmar: DMAR:[DMA Read] Reque

Re: [PATCH v2 25/26] omap3isp: Move to videobuf2

2015-03-18 Thread Tim Nordell
On 03/18/15 16:44, Sakari Ailus wrote: I don't think omap3isp has been using this very long. A few minor versions perhaps. Do you know if this common code is supposed to guarantee a physically contiguous memory region? The documentation for the function doesn't indicate that it should, and it

Re: [PATCH v2 25/26] omap3isp: Move to videobuf2

2015-03-18 Thread Sakari Ailus
Hi Tim, On Wed, Mar 18, 2015 at 03:58:07PM -0500, Tim Nordell wrote: > Laurent - > > On 03/18/15 14:49, Tim Nordell wrote: > >Digging through to find who is responsible for assigning the virtual > >addresses, I find that it's buried inside > >arch/arm/mm/dma-mapping.c:__alloc_iova(...). This cal

Re: [V4.0 REGRESSION FIX] [PATCH] iommu: ipmmu-vmsa: Add terminating entry for ipmmu_of_ids

2015-03-18 Thread Laurent Pinchart
Hi Joerg, On Wednesday 18 March 2015 01:28:50 Laurent Pinchart wrote: > On Tuesday 17 March 2015 08:06:45 Axel Lin wrote: > > The of_device_id table is supposed to be zero-terminated. > > > > Signed-off-by: Axel Lin > > Acked-by: Laurent Pinchart > > Joerg, I don't have anything queued up at

Re: [PATCH v14 19/20] vfio: initialize the virqfd workqueue in VFIO generic code

2015-03-18 Thread Baptiste Reynal
Hello Alex, The module solution seems fine for me, I have no argument against it. I used your patch on my tests, they are running ok. Regards, Baptiste On Wed, Mar 18, 2015 at 12:04 AM, Alex Williamson wrote: > On Tue, 2015-03-17 at 16:29 -0600, Alex Williamson wrote: >> On Mon, 2015-03-02 at 1

Re: [PATCH 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-03-18 Thread Yong Wu
Hi Tomasz, Thanks very much for your review. please help check below. The others I will fix in the next version. Hi Robin, There are some place I would like you can have a look and give me some suggestion. On Wed, 2015-03-11 at 19:53 +0900, Tomasz Figa wrote: > Hi, > > Please find next par