[PATCH 1/8] iommu/vt-d: Fix a few existing lines for checkpatch.pl

2014-04-24 Thread Bill Sumner
iommu code. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 69fa7da..f80b4bb 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/int

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

2014-04-24 Thread Bill Sumner
om current behaviour -- just enables a functional change to be made in a later patch. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c in

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

2014-04-24 Thread Bill Sumner
Add data declarations and prototypes needed for kdump. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-private.h | 94 + 1 file changed, 94 insertions(+) diff --git a/drivers/iommu/intel-iommu-private.h b/drivers/iommu/intel-iommu-private.h index

[PATCH 2/8] iommu/vt-d: Consolidate lines for a new private header

2014-04-24 Thread Bill Sumner
lines that would move to an intel-iommu-private.h file. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 74 +++-- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index

[PATCH 6/8] iommu/vt-d: Create intel-iommu-kdump.c

2014-04-24 Thread Bill Sumner
Create intel-iommu-kdump.c 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. Update Makefile to build intel-iommu-kdump.o Signed-off-by: Bill Sumner --- drivers/iommu/Makefile| 2

[PATCH 3/8] iommu/vt-d: Create intel-iommu-private.h

2014-04-24 Thread Bill Sumner
Move the single block of #define, static inline ... ; struct definitions to intel-iommu-private.h from intel-iommu.c Replace them with #include "intel-iommu-private.h" This introduces no functional change from current behaviour. Signed-off-by: Bill Sumner --- drivers/iommu/i

[PATCH 8/8] iommu/vt-d: Changes to support kdump

2014-04-24 Thread Bill Sumner
Add "#include " to gain access to is_kdump_kernel() 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-iom

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

2014-04-24 Thread Bill Sumner
by using the linked-list of previously-collected values instead of stepping back into the tree of translation tables. Bill Sumner (8): Fix a few existing lines for checkpatch.pl Consolidate lines for a new private header Create intel-iommu-private.h Update iommu_attach_domain() and its

[PATCH 7/8] iommu/vt-d: Add domain-id functions to intel-iommu-kdump.c

2014-04-24 Thread Bill Sumner
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-kdump.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/

[PATCH 8/8] Add remaining changes to intel-iommu.c to fix crashdump

2014-04-15 Thread Bill Sumner
Add "#include " Chg device_to_domain_id Chg get_domain_for_dev Chg init_dmars Chg intel_iommu_init Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 210 +--- 1 file changed, 158 insertions(+), 52 deletions(-) diff --git a/dri

[PATCH 5/8] Add new definitions & prototypes to intel-iommu-private.h

2014-04-15 Thread Bill Sumner
Items needed for fixing crashdump. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-private.h | 92 + 1 file changed, 92 insertions(+) diff --git a/drivers/iommu/intel-iommu-private.h b/drivers/iommu/intel-iommu-private.h index 73dabec..b436cd8

[PATCH 6/8] Create intel-iommu-kdump.c

2014-04-15 Thread Bill Sumner
Populate with "Copy iommu translation tables" function set. Edit Makefile to add intel-iommu-kdump.o Signed-off-by: Bill Sumner --- drivers/iommu/Makefile| 2 +- drivers/iommu/intel-iommu-kdump.c | 590 ++ 2 files changed, 591 insert

[PATCH 4/8] Update iommu_attach_domain() and its callers

2014-04-15 Thread Bill Sumner
Allow specification of the domain-id for the new domain. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 4352731..0c00c2d

[PATCH 7/8] Add domain-id functions to intel-iommu-kdump.c

2014-04-15 Thread Bill Sumner
intel_iommu_did_to_domain_values_entry() intel_iommu_get_dids_from_old_kernel() Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-kdump.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/iommu/intel-iommu-kdump.c b/drivers/iommu

[PATCH 0/8] Fix crashdump failure caused by legacy DMA/IO

2014-04-15 Thread Bill Sumner
ode much cleaner and easier to read. 5. Miscellaneous cleanups such as enum-values for return-codes. 6. Simplified the code that retrieves the values needed to initialize a new domain by using the linked-list of previously-collected values instead of stepping back into the tree of translation tabl

[PATCH 2/8] Consolidate all .h lines at front of intel-iommu.c file

2014-04-15 Thread Bill Sumner
age); - return vaddr; -} - -static inline void free_pgtable_page(void *vaddr) -{ - free_page((unsigned long)vaddr); -} - static inline void *alloc_domain_mem(void) { return kmem_cache_alloc(iommu_domain_cache, GFP_ATOMIC); -- Bill Sumner -- To unsubscribe from this list: send t

[PATCH 3/8] Create intel-iommu-private.h

2014-04-15 Thread Bill Sumner
Move the single block of #define, static inline ... ; struct definitions to intel-iommu-private.h from intel-iommu.c Replace them with #include "intel-iommu-private.h" Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-private.h | 351 +++

[PATCH 1/8] Fix a few existing lines that checkpatch.pl will complain about later.

2014-04-15 Thread Bill Sumner
Things like: 1. no space before tabs 2. no initialization of static variables to 0 or NULL 3. no extra parentheses around the value on the 'return' statement 4. no line over 80-characters Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 14 +++--- 1 file

[PATCH] Fix dump failure caused by DMA through an IOMMU

2014-02-14 Thread Bill Sumner
patch subject to more accurately reflect its purpose. 5. Made a few changes to better match the style of the mainline code. 6. Added comments at the front of several of the new functions. 7. Re-edited this patch log Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 1233

[PATCH 0/1] Fix Crashdump failure caused by leftover DMA through a hardware IOMMU

2014-02-14 Thread Bill Sumner
taking a crashdump. Bill Sumner (1): Fix Crashdump failure caused by leftover DMA through a hardware IOMMU drivers/iommu/intel-iommu.c | 1233 --- 1 file changed, 1172 insertions(+), 61 deletions(-) -- Bill Sumner -- To unsubscribe from this list: send

[PATCHv3 1/6] Crashdump-Accepting-Active-IOMMU-Flags-and-Prototype

2014-01-10 Thread Bill Sumner
re enabled. These flags and the pr_debug() lines scattered throughout the code are only for the developer or analyst. At this time, no means is provided to modify the flags without a re-compile. v1->v2: Updated patch description v2->v3: No change Signed-off-by: Bill Sumner --- drivers/iom

[PATCHv3 2/6] Crashdump-Accepting-Active-IOMMU-Utility-functions

2014-01-10 Thread Bill Sumner
entry, plus one to copy from a physically- addressed area of memory (primarily pages from the panicked kernel) into a virtually-addressed area within the crashdump kernel. v1->v2: Updated patch description v2->v3: No change Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.

[PATCHv3 6/6] Crashdump-Accepting-Active-IOMMU-Call-From-Mainline

2014-01-10 Thread Bill Sumner
ain-id, address-width, and IOVA ranges from the old kernel context; . Get address(page-entry-tables) from the copy in the new kernel; . And apply all of the above values to the new domain structure. * Else . Create a new domain as normal v1->v2: Updated patch description v2->

[PATCHv3 4/6] Crashdump-Accepting-Active-IOMMU-Copy-Translations

2014-01-10 Thread Bill Sumner
locks within the existing code protect them. v1->v2: Updated patch description v2->v3 Added "init_iova_domain(&domain->iovad, DMA_32BIT_PFN);" as recommended by Baoquan He [b...@redhat.com] Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 530

[PATCHv3 3/6] Crashdump-Accepting-Active-IOMMU-Domain-Interfaces

2014-01-10 Thread Bill Sumner
#x27;device_domain_values_list'. Updates are done only during the initialization operation of copying the translation tables -- when only a single CPU is active. Accesses after Linux goes multi-CPU are all read-only. v1->v2: Updated patch description v2->v3: No change

[PATCHv3 0/6] Crashdump Accepting Active IOMMU

2014-01-10 Thread Bill Sumner
ntry-tables) from the copy in the new kernel; . And apply all of the above values to the new domain structure. * Else . Create a new domain as normal Bill Sumner (6): Crashdump-Accepting-Active-IOMMU-Flags-and-Prototype Crashdump-Accepting-Active-IOMMU-Utility-functions Crashdump-Accep

[PATCHv3 5/6] Crashdump-Accepting-Active-IOMMU-Debug-Print-IOMMU

2014-01-10 Thread Bill Sumner
e Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 76 + 1 file changed, 76 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 6737550..457ac80b 100644 --- a/drivers/iommu/intel-iommu.c +++ b/dri

[PATCHv2 5/6] Crashdump-Accepting-Active-IOMMU-Debug-Print-IOMMU

2013-12-19 Thread Bill Sumner
This patch contains a function to print the hardware registers of each IOMMU onto the system console during crashdump kernel initialization. This function seemed far too useful to leave out. v1->v2: Updated patch description Fixed: "Advanced Fault Log register" Signed-off-by

[PATCHv2 2/6] Crashdump-Accepting-Active-IOMMU-Utility-functions

2013-12-19 Thread Bill Sumner
(primarily pages from the panicked kernel) into a virtually-addressed area within the crashdump kernel. v1->v2: Updated patch description Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 74 + 1 file changed, 74 insertions(+) diff --git a/driv

[PATCHv2 1/6] Crashdump-Accepting-Active-IOMMU-Flags-and-Prototype

2013-12-19 Thread Bill Sumner
ts further down the structure are enabled. These flags and the pr_debug() lines scattered throughout the code are only for the developer or analyst. At this time, no means is provided to modify the flags without a re-compile. v1->v2: Updated patch description Signed-off-by: Bill Sumner ---

[PATCHv2 0/6] Crashdump Accepting Active IOMMU

2013-12-19 Thread Bill Sumner
context; . Get address(page-entry-tables) from the copy in the new kernel; . And apply all of the above values to the new domain structure. * Else . Create a new domain as normal Bill Sumner (6): Crashdump-Accepting-Active-IOMMU-Flags-and-Prototype Crashdump-Accepting-Active-IOMMU-Utility-functi

[PATCHv2 4/6] Crashdump-Accepting-Active-IOMMU-Copy-Translations

2013-12-19 Thread Bill Sumner
patch description Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 529 1 file changed, 529 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 85e30e5..9d2398b 100644 --- a/drivers/iommu/intel-iommu.c

[PATCHv2 6/6] Crashdump-Accepting-Active-IOMMU-Call-From-Mainline

2013-12-19 Thread Bill Sumner
ain-id, address-width, and IOVA ranges from the old kernel context; . Get address(page-entry-tables) from the copy in the new kernel; . And apply all of the above values to the new domain structure. * Else . Create a new domain as normal v1->v2: Updated patch d

[PATCHv2 3/6] Crashdump-Accepting-Active-IOMMU-Domain-Interfaces

2013-12-19 Thread Bill Sumner
he copy operation has already seen 'this' domain-id, it will simply point the current context entry to the same top-level page-table that has been created previously for this domain-id. v1->v2: Updated patch description Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c

[PATCH 3/6] Crashdump-Accepting-Active-IOMMU-Domain-Interfaces

2013-12-03 Thread Bill Sumner
Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 266 1 file changed, 266 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b68b962..ee68f42 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers

[PATCH 1/6] Crashdump-Accepting-Active-IOMMU-Flags-and-Prototypes

2013-12-03 Thread Bill Sumner
Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 75 + 1 file changed, 75 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 15e9b57..a0e8a76 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers

[PATCH 0/6] Crashdump Accepting Active IOMMU

2013-12-03 Thread Bill Sumner
give us one. When a new domain is created for a device: * If (this device has a context in the old kernel) . Get domain-id, address-width, and IOVA ranges from the old kernel context; . Get address(page-entry-tables) from the copy in the new kernel; . And apply all of the above v

[PATCH 5/6] Crashdump-Accepting-Active-IOMMU-Debug-Print-IOMMU

2013-12-03 Thread Bill Sumner
Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 76 + 1 file changed, 76 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d9a49ad..19c1370 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers

[PATCH 6/6] Crashdump-Accepting-Active-IOMMU-Call-From-Mainline

2013-12-03 Thread Bill Sumner
Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 272 +--- 1 file changed, 204 insertions(+), 68 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 19c1370..71083d1 100644 --- a/drivers/iommu/intel

[PATCH 4/6] Crashdump-Accepting-Active-IOMMU-Copy-Translations

2013-12-03 Thread Bill Sumner
Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 529 1 file changed, 529 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index ee68f42..d9a49ad 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers

[PATCH 2/6] Crashdump-Accepting-Active-IOMMU-Utility-functions

2013-12-03 Thread Bill Sumner
Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 74 + 1 file changed, 74 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a0e8a76..b68b962 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers