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

2015-05-30 Thread Li, Zhen-Hua
Thank you very much for this. zhenhua From My iPhone > 在 2015年5月30日,00:22,Joerg Roedel 写道: > >> On Mon, May 11, 2015 at 05:52:44PM +0800, Li, Zhen-Hua wrote: >> Li, Zhen-Hua (10): >> iommu/vt-d: New function to attach domain with id >> iommu/vt-d: Items req

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

2015-05-12 Thread Li, Zhen-Hua
causes the DMA to either: > (1) generate DMAR errors or > (2) generate PCI SERR errors or > (3) transfer data to or from incorrect areas of memory. Often this > causes the dump to fail. > > Changelog[v1]: > The original version. > > C

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

2015-05-11 Thread Li, Zhen-Hua
ch_domain(); The caller of this function. Li, Zhenhua: New function iommu_attach_domain_with_id(), instead of updating function iommu_attach_domain(); Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 13 - 1 file changed, 12 inser

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

2015-05-11 Thread Li, Zhen-Hua
ump kernel, its phys address will not be save to RTA register, but when its data is changed, we will save the new data to old root entry table. Li, Zhen-hua: The functions and logics. Takao Indoh: Add __iommu_flush_cache. Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/io

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

2015-05-11 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 | 58 ++--- 1 file changed

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

2015-05-11 Thread Li, Zhen-Hua
-hua: The functions and logics. Takao Indoh: Check if pfn is ram: if (page_is_ram(pfn)) Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/iommu/intel-iommu.c | 102 include/linux/intel-iommu.h | 6 +++ 2 files

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

2015-05-11 Thread Li, Zhen-Hua
-enable TE in kdump kernel. Use the did and gaw from old context entry; Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 95 +++-- 1 file changed, 83 insertions(+), 12 deletions(-) diff --git a/drivers/iommu/intel

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

2015-05-11 Thread Li, Zhen-Hua
sion. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 121 include/linux/intel-iommu.h | 3 ++ 2 files changed, 124 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3a5

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

2015-05-11 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 | 68 + include/linux/intel-iommu.h | 4 +++ 2 files changed, 72 insertions(+) diff --git a/drivers/iommu

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

2015-05-11 Thread Li, Zhen-Hua
interrupt remapping. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index c2a4406..46d80ad 100644 --- a

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

2015-05-11 Thread Li, Zhen-Hua
-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 72 + 1 file changed, 72 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index cb9d6cc..1e7ceb5 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu

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

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

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

2015-05-11 Thread Li, Zhen-Hua
ned long" as physical address. 5. Use intel_unmap to unmap the old dma; Baoquan He helps testing this patchset. Takao Indoh gives valuable suggestions. Li, Zhen-Hua (10): iommu/vt-d: New function to attach domain with id iommu/vt-d: Items required for kdump iommu/vt-d: Function to get e

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

2015-04-03 Thread Li, Zhen-Hua
The hardware will do some verification, but not completely. If people think the OS should also do this, then it should be another patchset, I think. Thanks Zhenhua > 在 2015年4月3日,17:21,Dave Young 写道: > >> On 04/03/15 at 05:01pm, Li, ZhenHua wrote: >> Hi Dave, >> >> There may be some possibil

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

2015-03-18 Thread Li, Zhen-Hua
ch_domain(); The caller of this function. Li, Zhenhua: New function iommu_attach_domain_with_id(), instead of updating funtion iommu_attach_domain(); Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 13 - 1 file changed, 12 inser

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

2015-03-18 Thread Li, Zhen-Hua
-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 56 + 1 file changed, 56 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 76674a1..577d5de 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu

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

2015-03-18 Thread Li, Zhen-Hua
-hua: The functions and logics. Takao Indoh: Check if pfn is ram: if (page_is_ram(pfn)) Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/iommu/intel-iommu.c | 102 include/linux/intel-iommu.h | 9 2 files

[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-iomm

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

2015-03-18 Thread Li, Zhen-Hua
ump kernel, its phys address will not be save to RTA register, but when its data is changed, we will save the new data to old root entry table. Li, Zhen-hua: The functions and logics. Takao Indoh: Add __iommu_flush_cache. Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/io

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

2015-03-18 Thread Li, Zhen-Hua
interrupt remapping. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 43 +++-- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index 20c060b..4e5a02d 100644

[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

[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 06/10] iommu/vt-d: datatypes and functions used for kdump

2015-03-18 Thread Li, Zhen-Hua
to copy old context entry tables and page tables. Use "unsigned long" for physical address. Remove the functions to copy page table in Bill's version. Remove usage of dve and ppap in Bill's version. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers

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

2015-03-18 Thread Li, Zhen-Hua
re-enable TE in kdump kernel. Use the did and gaw from old context entry; Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 118 ++-- 1 file changed, 103 insertions(+), 15 deletions(-) diff --git a/drivers/iommu

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

2015-03-18 Thread Li, Zhen-Hua
ion. Changed in this version: 1. Do not disable and re-enable traslation and interrupt remapping. 2. Use old root entry table. 3. Use old interrupt remapping table. 4. Use "unsigned long" as physical address. 5. Use intel_unmap to unmap the old dma; Baoquan He helps testing this pat

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

2015-01-11 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

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

2015-01-11 Thread Li, Zhen-Hua
interrupt remapping. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 42 - 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index d37fd62..58356cb 100644

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

2015-01-11 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 | 56 ++--- 1 file changed

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

2015-01-11 Thread Li, Zhen-Hua
ump kernel, its phys address will not be save to RTA register, but when its data is changed, we will save the new data to old root entry table. Li, Zhen-hua: The functions and logics. Takao Indoh: Add __iommu_flush_cache. Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/io

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

2015-01-11 Thread Li, Zhen-Hua
function to copy old context entry tables and page tables. Use "unsigned long" for physical address. Change incorrect aw_shift[4] and a few comments in copy_context_entry(). Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iom

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

2015-01-11 Thread Li, Zhen-Hua
TE in kdump kernel. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 135 +++- 1 file changed, 120 insertions(+), 15 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 277b294

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

2015-01-11 Thread Li, Zhen-Hua
: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 70 + 1 file changed, 70 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 8d5c400..a71de3f 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel

[PATCH v8 03/10] iommu/vt-d: Add domain-id functions

2015-01-11 Thread Li, Zhen-Hua
Interfaces for when a new domain in the crashdump kernel needs some values from the panicked kernel's context entries. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 62 + 1 file changed, 62 inser

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

2015-01-11 Thread Li, Zhen-Hua
-hua: The functions and logics. Takao Indoh: Check if pfn is ram: if (page_is_ram(pfn)) Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/iommu/intel-iommu.c | 97 + include/linux/intel-iommu.h | 9 + 2 files

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

2015-01-11 Thread Li, Zhen-Hua
nable kdump support in iommu module iommu/vt-d: assign new page table for dma_map iommu/vt-d: Copy functions for irte iommu/vt-d: Use old irte in kdump kernel Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh Tested-by: Baoquan He --- drivers/iommu/intel-io

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

2015-01-11 Thread Li, Zhen-Hua
om current behaviour -- just enables a functional change to be made in a later patch. Bill Sumner: Original version. Li, Zhenhua: Minor change, add change to function __iommu_attach_domain. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iomm

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

2015-01-07 Thread Li, Zhen-Hua
to_virt(dma_pte_next), + VTD_PAGE_SIZE); If this does not work, I have no ideas currently, need to dig the code more. Regards Zhenhua -Original Message- From: Takao Indoh [mailto:indou.ta...@jp.fujitsu.com] Sent: Thursday, January 08, 2015 9:00 AM To: Li, Zhen-Hua; b.

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

2015-01-06 Thread Li, Zhen-Hua
: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 70 + 1 file changed, 70 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 2dc6250..5ce2850 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel

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

2015-01-06 Thread Li, Zhen-Hua
interrupt remapping. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 42 - 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index d37fd62..58356cb 100644

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

2015-01-06 Thread Li, Zhen-Hua
TE in kdump kernel. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 135 +++- 1 file changed, 120 insertions(+), 15 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d2c19a0

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

2015-01-06 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 | 56 ++--- 1 file changed

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

2015-01-06 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

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

2015-01-06 Thread Li, Zhen-Hua
-hua: The functions and logics. Takao Indoh: Check if pfn is ram: if (page_is_ram(pfn)) Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/iommu/intel-iommu.c | 97 + include/linux/intel-iommu.h | 9 + 2 files

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

2015-01-06 Thread Li, Zhen-Hua
function to copy old context entry tables and page tables. Use "unsigned long" for physical address. Change incorrect aw_shift[4] and a few comments in copy_context_entry(). Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iom

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

2015-01-06 Thread Li, Zhen-Hua
ump kernel, its phys address will not be save to RTA register, but when its data is changed, we will save the new data to old root entry table. Li, Zhen-hua: The functions and logics. Takao Indoh: Add __iommu_flush_cache. Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh --- drivers/io

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

2015-01-06 Thread Li, Zhen-Hua
om current behaviour -- just enables a functional change to be made in a later patch. Bill Sumner: Original version. Li, Zhenhua: Minor change, add change to function __iommu_attach_domain. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iomm

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

2015-01-06 Thread Li, Zhen-Hua
from old mem iommu/vt-d: Add functions to load and save old re iommu/vt-d: datatypes and functions used for kdump iommu/vt-d: enable kdump support in iommu module iommu/vt-d: assign new page table for dma_map iommu/vt-d: Copy functions for irte iommu/vt-d: Use old irte in kdump kernel Signe

[PATCH v7 03/10] iommu/vt-d: Add domain-id functions

2015-01-06 Thread Li, Zhen-Hua
Interfaces for when a new domain in the crashdump kernel needs some values from the panicked kernel's context entries. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 62 + 1 file changed, 62 inser

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

2014-12-22 Thread Li, Zhen-Hua
: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 70 + 1 file changed, 70 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 2dc6250..5ce2850 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel

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

2014-12-22 Thread Li, Zhen-Hua
om current behaviour -- just enables a functional change to be made in a later patch. Bill Sumner: Original version. Li, Zhenhua: Minor change, add change to function __iommu_attach_domain. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iomm

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

2014-12-22 Thread Li, Zhen-Hua
function to copy old context entry tables and page tables. Use "unsigned long" for physical address. Change incorrect aw_shift[4] and a few comments in copy_context_entry(). Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iom

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

2014-12-22 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 | 57 + include/linux/intel-iommu.h | 4 +++ 2 files changed, 61 insertions(+) diff --git a/drivers/iommu

[PATCH 08/10] iommu/vtd: assign new page table for dma_map

2014-12-22 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 | 56 ++--- 1 file changed

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

2014-12-22 Thread Li, Zhen-Hua
interrupt remapping. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 42 - 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index 13f2034..e244186 100644

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

2014-12-22 Thread Li, Zhen-Hua
mmu/vt-d: data types and functions used for kdump iommu/vt-d: Add domain-id functions iommu/vt-d: enable kdump support in iommu module Li, Zhen-Hua (10): iommu/vt-d: Update iommu_attach_domain() and its callers iommu/vt-d: Items required for kdump iommu/vt-d: Add domain-id functions

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

2014-12-22 Thread Li, Zhen-Hua
ump kernel, its phys address will not be save to RTA register, but when its data is changed, we will save the new data to old root entry table. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 49 + include/linux/intel-iommu.h | 5 + 2 fi

[PATCH 03/10] iommu/vt-d: Add domain-id functions

2014-12-22 Thread Li, Zhen-Hua
Interfaces for when a new domain in the crashdump kernel needs some values from the panicked kernel's context entries. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 62 + 1 file changed, 62 insertions(+) diff --git a/drivers/iommu/intel

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

2014-12-22 Thread Li, Zhen-Hua
-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 97 + include/linux/intel-iommu.h | 9 + 2 files changed, 106 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c0bebd6..8a7ad72 100644 --- a/drivers

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

2014-12-22 Thread Li, Zhen-Hua
TE in kdump kernel. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 142 ++-- 1 file changed, 125 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f9849cb

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

2014-12-15 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 | 57 + include/linux/intel-iommu.h | 4 +++ 2 files changed, 61 insertions(+) diff --git a/drivers/iommu

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

2014-12-15 Thread Li, Zhen-Hua
. Use new function to copy old context entry tables and page tables. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 542 1 file changed, 542 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu

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

2014-12-15 Thread Li, Zhen-Hua
: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 70 + 1 file changed, 70 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 2dc6250..5ce2850 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel

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

2014-12-15 Thread Li, Zhen-Hua
interrupt remapping. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel_irq_remapping.c | 42 - 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index 090ba32..fee7d66 100644

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

2014-12-15 Thread Li, Zhen-Hua
ump kernel, its phys address will not be save to RTA register, but when its data is changed, we will save the new data to old root entry table. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 49 + include/linux/intel-iommu.h | 5 + 2 fi

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

2014-12-15 Thread Li, Zhen-Hua
-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 97 + include/linux/intel-iommu.h | 9 + 2 files changed, 106 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c0bebd6..8a7ad72 100644 --- a/drivers

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

2014-12-15 Thread Li, Zhen-Hua
Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 142 ++-- 1 file changed, 125 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 9b2f725..4837ce5 100644 --- a/drivers/iommu/intel

[PATCH 08/10] iommu/vtd: assign new page table for dma_map

2014-12-15 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 | 27 --- 1 file changed, 20 insertions

[PATCH 03/10] iommu/vt-d: Add domain-id functions

2014-12-15 Thread Li, Zhen-Hua
Interfaces for when a new domain in the crashdump kernel needs some values from the panicked kernel's context entries. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 62 + 1 file changed, 62 insertions(+) diff --git a/drivers/iommu/intel

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

2014-12-15 Thread Li, Zhen-Hua
kdump support in iommu module Li, Zhen-Hua (10): iommu/vt-d: Update iommu_attach_domain() and its callers iommu/vt-d: Items required for kdump iommu/vt-d: Add domain-id functions iommu/vt-d: functions to copy data from old mem iommu/vt-d: Add functions to load and save old re iommu/vt-d:

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

2014-12-15 Thread Li, Zhen-Hua
om current behaviour -- just enables a functional change to be made in a later patch. Bill Sumner: Original version. Li, Zhenhua: Minor change, add change to function __iommu_attach_domain. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iomm

[PATCH 1/1] x86/iommu: fix incorrect bit operations in setting values

2014-11-04 Thread Li, Zhen-Hua
After we call context_set_address_root(context, value), expected result is context->lo == 0x123456789abce111; But the actual result is: context->lo == 0x1237577f9bbde111; So we need to clear bits 12:63 before setting the new value, this will fix this problem. Signed-off-by: Li, Zhen-Hua

Re: [PATCH 0/5] iommu/vt-d: Fix crash dump failure caused by legacy DMA/IO

2014-10-22 Thread Li, Zhen-Hua
Hi Baoquan, I tested it on 3.17, it does not have these faults. There are little differences between this version and Bill's last version. I will test it on 3.18.0-rc1+ on my system and let you know the result. And could you send me the result of "lspci -vvv " on your system? Thanks Zhenhua >

[PATCH 3/5] iommu/vt-d: data types and functions used for kdump

2014-10-21 Thread Li, Zhen-Hua
context_put*, use context_* and context_set_* for replacement. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iommu/intel-iommu.c | 562 1 file changed, 562 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu

[PATCH 5/5] iommu/vt-d: enable kdump support in iommu module

2014-10-21 Thread Li, Zhen-Hua
Modify the operation of the following functions when called during crash dump: device_to_domain_id get_domain_for_dev init_dmars intel_iommu_init Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 134 +++- 1 file changed, 121 insertions(+),

[PATCH 4/5] iommu/vt-d: Add domain-id functions

2014-10-21 Thread Li, Zhen-Hua
Interfaces for when a new domain in the crashdump kernel needs some values from the panicked kernel's context entries. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 46 + 1 file changed, 46 insertions(+) diff --git a/drivers/iommu/intel

[PATCH 2/5] iommu/vt-d: Items required for kdump

2014-10-21 Thread Li, Zhen-Hua
, Zhen-Hua --- drivers/iommu/intel-iommu.c | 69 + 1 file changed, 69 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 1c7350d..99fe408 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c

[PATCH 0/5] iommu/vt-d: Fix crash dump failure caused by legacy DMA/IO

2014-10-21 Thread Li, Zhen-Hua
The following series implements a fix for: A kdump problem about DMA that has been discussed for a long time. That is, when a kernel panics and boots into the kdump kernel, DMA that was started by the panicked kernel is not stopped before the kdump kernel is booted; and the kdump kernel disables th

[PATCH 1/5] iommu/vt-d: Update iommu_attach_domain() and its callers

2014-10-21 Thread Li, Zhen-Hua
om current behaviour -- just enables a functional change to be made in a later patch. Bill Sumner: Original version. Li, Zhenhua: Minor change, add change to function __iommu_attach_domain. Signed-off-by: Bill Sumner Signed-off-by: Li, Zhen-Hua --- drivers/iomm

[PATCH 1/1] pci: reset all pci endpoints to stop on going dma

2014-10-17 Thread Li, Zhen-Hua
this description. Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh Signed-off-by: Randy Wright --- drivers/pci/pci.c | 82 + include/linux/pci.h | 6 kernel/kexec.c | 2 ++ 3 files changed, 90 insertions(+) diff --git a/dr

[PATCH 1/1] pci: fix dmar fault for kdump kernel

2014-10-10 Thread Li, Zhen-Hua
Indoh's version: Add support for legacy PCI devices. Use pci_try_reset_bus instead of do_downstream_device_reset in original version Randy Wright corrects some misunderstanding in this description. Signed-off-by: Li, Zhen-Hua Signed-off-by: Takao Indoh Signed-off-by: Randy W

[PATCH 1/1] pci/quirks: fix a dmar fault for intel 82599 card

2014-09-29 Thread Li, Zhen-Hua
device when it has not been initialized, and then the DMA Remapping errors come. To fix this DMAR fault, we need to reset the bus that this device on. Reset the device itself does not work. There also was a discussion: https://lkml.org/lkml/2013/5/14/9 Signed-off-by: Li, Zhen-Hua --- drivers/pci

[PATCH 1/1] driver/drx39xyj: fix some compiling warnings

2014-09-21 Thread Li, Zhen-Hua
d] word = (u16) (buf[0] + (buf[1] << 8)); ^ drivers/media/dvb-frontends/drx39xyj/drxj.c:4208:9: warning: ‘buf’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Li, Zhen-Hua --- drivers/media/dvb-frontends/drx39xyj/drxj.c | 4 +++- 1 file chang

[PATCH 1/1] kdump: fix compiling error: undefined elfcorehdr_addr

2014-09-17 Thread Li, Zhen-Hua
ORT_SYMBOL for elfcorehdr_addr will fix this. Signed-off-by: Li, Zhen-Hua --- kernel/crash_dump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/crash_dump.c b/kernel/crash_dump.c index c766ee5..8cb4838 100644 --- a/kernel/crash_dump.c +++ b/kernel/crash_dump.c @@ -18,6 +18,7 @@ uns

RE: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel

2014-08-18 Thread Li, Zhen-Hua
. -Original Message- From: Li, Zhen-Hua Sent: Tuesday, August 19, 2014 7:48 AM To: Li, Zhen-Hua; Joerg Roedel Cc: David Woodhouse; io...@lists.linux-foundation.org; linux-kernel@vger.kernel.org Subject: RE: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel When the dump kernel boots

RE: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel

2014-08-18 Thread Li, Zhen-Hua
- From: Li, Zhen-Hua Sent: Tuesday, August 19, 2014 7:27 AM To: 'Joerg Roedel' Cc: David Woodhouse; io...@lists.linux-foundation.org; linux-kernel@vger.kernel.org Subject: RE: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel : [fault reason 01] Present bit in root entry i

RE: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel

2014-08-18 Thread Li, Zhen-Hua
: [fault reason 01] Present bit in root entry is clear It appears when iommu initializing in the kdump kernel. -Original Message- From: Joerg Roedel [mailto:j...@8bytes.org] Sent: Tuesday, August 19, 2014 7:23 AM To: Li, Zhen-Hua Cc: David Woodhouse; io...@lists.linux-foundation.org

RE: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel

2014-08-18 Thread Li, Zhen-Hua
There is a bug when Linux running on an HP large system: when kdump kernel runs, the hardware is still using the old root entry. This causes error message when iommu not finished initialization. -Original Message- From: Li, Zhen-Hua Sent: Monday, August 18, 2014 4:59 PM To

[PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel

2014-08-18 Thread Li, Zhen-Hua
. Signed-off-by: Li, Zhen-Hua --- drivers/iommu/dmar.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 60ab474..7b4fa90 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c @@ -66,6 +66,8 @@ static int

[PATCH 1/1] iommu/vt-d: Add new macros for invalidation event

2014-08-14 Thread Li, Zhen-Hua
event data register IEADDR_REG 0xa8Invalidation event address register IEUADDR_REG 0xacInvalidation event upper address register Through they are not used in kernel in the latest version, the defination should be added to kernel as well as other registers. Signed-off-by: Li,

[PATCH 1/1] driver/tty: Fix a warning in check_tty_count

2014-07-13 Thread Li, Zhen-Hua
his. Signed-off-by: Li, Zhen-Hua --- drivers/tty/tty_io.c | 13 + include/linux/tty.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 3411071..9283fc2 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io

RE: [PATCH 1/1] script/kconfig: remove a warning for menucofig

2014-06-30 Thread Li, Zhen-Hua
ULL; then !=NULL is not needed. -Original Message- From: Heinrich Schuchardt [mailto:xypron.g...@gmx.de] Sent: Tuesday, July 01, 2014 1:03 AM To: Li, Zhen-Hua; Yann E. MORIN; linux-kbu...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] script/kconfig: remove a warning for

[PATCH 1/1] script/kconfig: remove a warning for menucofig

2014-06-29 Thread Li, Zhen-Hua
onfig/menu.c:551:19: note: ‘jump’ was declared here struct jump_key *jump; ^ It is because the compiler think "jump" is not initialized, though in fact it is already initialized. Signed-off-by: Li, Zhen-Hua --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 inserti

RE: [PATCH 1/1] driver/md/block: Alloc space for member flush_rq

2014-05-28 Thread Li, Zhen-Hua
I tested it on 3.14-rc5. I will checkout the latest kernel and test it on my system for this bug. Thanks Zhenhua -Original Message- From: Mike Snitzer [mailto:snit...@redhat.com] Sent: Wednesday, May 28, 2014 11:03 PM To: Li, Zhen-Hua Cc: linux-kernel@vger.kernel.org; Alasdair Kergon

[PATCH 1/1] driver/md/block: Alloc space for member flush_rq

2014-05-27 Thread Li, Zhen-Hua
xe1/0x100 [ 62.932133] [] ? kthread_create_on_node+0x1a0/0x1a0 [ 62.932140] [] ret_from_fork+0x7c/0xb0 [ 62.932141] [] ? kthread_create_on_node+0x1a0/0x1a0 Signed-off-by: Li, Zhen-Hua --- drivers/md/dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/md/dm.c b/drivers

[PATCH 1/1] kvm: increase max vcpu count

2014-05-15 Thread Li, Zhen-Hua
kernel kvm's part. The qemu support will be another thread. Signed-off-by: Li, Zhen-Hua --- arch/x86/include/asm/kvm_host.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 7de069af..92cc83c 1

[PATCH 1/1] net: Add rtnl_lock for netif_device_attach/detach

2014-04-16 Thread Li, Zhen-Hua
From: "Li, Zhen-Hua" As netif_running is called in netif_device_attach/detach. There should be rtnl_lock/unlock called, to avoid dev stat change during netif_device_attach and detach being called. I checked NIC some drivers, some of them have netif_device_attach/detach called between

Re: [PATCH 1/1] driver/net: add missing rtnl lock/unlock for benet

2014-04-15 Thread Li, Zhen-Hua
Yes, that's ok for me. 发自我的 iPhone 在 2014年4月15日,下午7:57,"Sathya Perla" 写道: >> -Original Message- >> From: Li, ZhenHua [mailto:zhen-h...@hp.com] >> >> Because netif_running() is called in netif_device_detach and >> netif_device_attach. To avoid dev status changed while >> netif_device_de

[PATCH 1/1] driver/net: add missing rtnl lock/unlock for benet

2014-04-14 Thread Li, Zhen-Hua
From: "Li, Zhen-Hua" In benet driver, netif_device_detach and netif_device_attach should be called between rtnl_lock and rtnl_unlock. Signed-off-by: Li, Zhen-Hua --- drivers/net/ethernet/emulex/benet/be_main.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletion

[PATCH 1/1] driver/net: cosa driver uses udelay incorrectly

2014-04-14 Thread Li, Zhen-Hua
From: "Li, Zhen-Hua" In cosa driver, udelay with more than 2 may cause __bad_udelay. Use msleep for instead. Signed-off-by: Li, Zhen-Hua --- drivers/net/wan/cosa.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c ind

[PATCH 1/1] driver/net: remove unused code in cosa module

2014-04-14 Thread Li, Zhen-Hua
From: "Li, Zhen-Hua" For the cosa module, CONFIG_COSA can only be checked as 'm', and cosa module can only be compiled as a module. So remove unused code in cosa.c Signed-off-by: Li, Zhen-Hua --- drivers/net/wan/cosa.c |4 1 file changed, 4 deletions(-) diff --g

  1   2   >