Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751623Ab3IIJH6 (ORCPT ); Mon, 9 Sep 2013 05:07:58 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:60866 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047Ab3IIJH4 (ORCPT ); Mon, 9 Sep 2013 05:07:56 -0400 Message-ID: <1378717669.2627.239.camel@shinybook.infradead.org> Subject: Re: [PATCH] intel-iommu: Quiesce devices before disabling IOMMU From: David Woodhouse To: Takao Indoh Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, joro@8bytes.org, kexec@lists.infradead.org, alex.williamson@redhat.com Date: Mon, 09 Sep 2013 10:07:49 +0100 In-Reply-To: <1377069354-5056-1-git-send-email-indou.takao@jp.fujitsu.com> References: <1377069354-5056-1-git-send-email-indou.takao@jp.fujitsu.com> Content-Type: multipart/signed; micalg="sha-1"; protocol="application/x-pkcs7-signature"; boundary="=-Lqi+y2FfSHn+UGc7pAoI" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9541 Lines: 147 --=-Lqi+y2FfSHn+UGc7pAoI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2013-08-21 at 16:15 +0900, Takao Indoh wrote: >=20 > This causes problem on kdump. Devices are working in first kernel, and > after switching to second kernel and initializing IOMMU, many DMAR faults > occur and it causes problems like driver error or PCI SERR, at last > kdump fails. This patch fixes this problem. I'm not sure I'd call this a fix. If the driver is so broken that it cannot get the device working again after a fault, surely the driver needs to be fixed? If the system is suffering an IRQ storm because device doesn't give up after the first few faults, then we should switch off the fault *reporting* for that device so that its faults get ignored (until it next actually sets up a DMA mapping, or something). For the IOMMU code to reset individual devices, just because they still have an active DMA mapping even if they're not *doing* DMA, seems wrong. You'll even end up resetting devices just because they have an RMRR, won't you? (Although I wouldn't lose any sleep over that, I suppose. In fact it might be a *feature*... :) --=20 David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation --=-Lqi+y2FfSHn+UGc7pAoI Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIISxDCCBjQw ggQcoAMCAQICAR4wDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0YXJ0 Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxKTAn BgNVBAMTIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA3MTAyNDIxMDE1NVoX DTE3MTAyNDIxMDE1NVowgYwxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSsw KQYDVQQLEyJTZWN1cmUgRGlnaXRhbCBDZXJ0aWZpY2F0ZSBTaWduaW5nMTgwNgYDVQQDEy9TdGFy dENvbSBDbGFzcyAxIFByaW1hcnkgSW50ZXJtZWRpYXRlIENsaWVudCBDQTCCASIwDQYJKoZIhvcN AQEBBQADggEPADCCAQoCggEBAMcJg8zOLdgasSmkLhOrlr6KMoOMpohBllVHrdRvEg/q6r8jR+EK 75xCGhR8ToREoqe7zM9/UnC6TS2y9UKTpT1v7RSMzR0t6ndl0TWBuUr/UXBhPk+Kmy7bI4yW4urC +y7P3/1/X7U8ocb8VpH/Clt+4iq7nirMcNh6qJR+xjOhV+VHzQMALuGYn5KZmc1NbJQYclsGkDxD z2UbFqE2+6vIZoL+jb9x4Pa5gNf1TwSDkOkikZB1xtB4ZqtXThaABS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2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzE4MDYGA1UEAxMvU3Rh cnRDb20gQ2xhc3MgMSBQcmltYXJ5IEludGVybWVkaWF0ZSBDbGllbnQgQ0ECAwaFzjANBgkqhkiG 9w0BAQEFAASCAQAhGMkzUZ45Yt8QVJZaEtWj71n5F5tIwJpRYVSzvGYRanDmsYut4hpjrXz238M7 qWCv8YUvqLdkHmL1s23DJpvmZMYaFCkDuKs2+ZEV96gt+lGV+Ah26yEgbFYhQLVs1Lc/R7XzZhqv spO0oXOyo3GKK3RxffowNfpA7d+xDx2ODO//UlaeNGoxfujNVTlKp5PUkjd29IFXMkMM7u1ZodPk HJZBpRYJEJiDiVi5AuCutlz5q4ac03nCZh4I+E+Sq2jxkwnRGZSJuic7ZZPY74QmbAxiYtCGapaH IiaQIYfNBvQtVFeh8SsG+psg3Vzo6ffL9hmVwLg+PP055Ir5gEKPAAAAAAAA --=-Lqi+y2FfSHn+UGc7pAoI-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/