public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH retry] intel-iommu:make identity_map default for crash dump
@ 2011-11-01  9:19 Dave Young
  2011-11-01  9:34 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Young @ 2011-11-01  9:19 UTC (permalink / raw)
  To: kexec, iommu, linux-kernel; +Cc: horms, dwmw2, vgoyal, luyu

kdump kernel sometimes will get DMAR faults which
is caused by random in-flight dma from 1st kernel

Here make the identity_mapping as default for this case

Signed-off-by: Dave Young <dyoung@redhat.com>
---
 drivers/iommu/intel-iommu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

--- linux-2.6.orig/drivers/iommu/intel-iommu.c	2011-11-01 13:06:18.667505962 +0800
+++ linux-2.6/drivers/iommu/intel-iommu.c	2011-11-01 17:07:50.789137864 +0800
@@ -40,6 +40,7 @@
 #include <linux/tboot.h>
 #include <linux/dmi.h>
 #include <linux/pci-ats.h>
+#include <linux/crash_dump.h>
 #include <asm/cacheflush.h>
 #include <asm/iommu.h>
 
@@ -2488,7 +2489,7 @@ static int __init init_dmars(void)
 		}
 	}
 
-	if (iommu_pass_through)
+	if (iommu_pass_through || is_kdump_kernel())
 		iommu_identity_mapping |= IDENTMAP_ALL;
 
 #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH retry] intel-iommu:make identity_map default for crash dump
  2011-11-01  9:19 [PATCH retry] intel-iommu:make identity_map default for crash dump Dave Young
@ 2011-11-01  9:34 ` David Woodhouse
  2011-11-01  9:52   ` Dave Young
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2011-11-01  9:34 UTC (permalink / raw)
  To: Dave Young; +Cc: luyu, kexec, linux-kernel, iommu, horms, vgoyal


[-- Attachment #1.1: Type: text/plain, Size: 629 bytes --]

On Tue, 2011-11-01 at 17:19 +0800, Dave Young wrote:
> kdump kernel sometimes will get DMAR faults which
> is caused by random in-flight dma from 1st kernel
> 
> Here make the identity_mapping as default for this case

So you want to *allow* the random in-flight DMA? And with an identity
mapping it's really going to random addresses, since it'll be
untranslated and won't even go to the physical addresses which it was
originally intended for?

This seems entirely broken to me.

If there is "random in-flight dma" from the first kernel, the correct
thing to do is *block* it. Which is what we do.

-- 
dwmw2

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH retry] intel-iommu:make identity_map default for crash dump
  2011-11-01  9:34 ` David Woodhouse
@ 2011-11-01  9:52   ` Dave Young
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Young @ 2011-11-01  9:52 UTC (permalink / raw)
  To: David Woodhouse; +Cc: luyu, kexec, linux-kernel, iommu, horms, vgoyal

On 11/01/2011 05:34 PM, David Woodhouse wrote:

> On Tue, 2011-11-01 at 17:19 +0800, Dave Young wrote:
>> kdump kernel sometimes will get DMAR faults which
>> is caused by random in-flight dma from 1st kernel
>>
>> Here make the identity_mapping as default for this case
> 
> So you want to *allow* the random in-flight DMA? And with an identity
> mapping it's really going to random addresses, since it'll be
> untranslated and won't even go to the physical addresses which it was
> originally intended for?
> 
> This seems entirely broken to me.
> 
> If there is "random in-flight dma" from the first kernel, the correct
> thing to do is *block* it. Which is what we do.
> 


This patch works for me for several cases. For kdump It can be seen a
workaround. But yes blocking the 1st kernel dma is ideal.

Glad to hear that you are working on this.

-- 
Thanks
Dave

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-01  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01  9:19 [PATCH retry] intel-iommu:make identity_map default for crash dump Dave Young
2011-11-01  9:34 ` David Woodhouse
2011-11-01  9:52   ` Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox