* [PATCH RFC] iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
@ 2012-06-06 16:50 Shuah Khan
2012-06-07 9:32 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2012-06-06 16:50 UTC (permalink / raw)
To: joerg.roedel; +Cc: iommu, LKML, Shuah Khan
Change AMD iommu driver to call disable iommus in pass-through mode. AMD
iommu driver's amd_iommu_init() routine doesn't initialize iommu_shutdown
in pass-through mode. As a result iommu disable via a call to disable_iommus()
doesn't happen at shutdown. Enable and disable of iommus is inconsistent in
pass-through mode. IOMMU is enabled, but not disabled. IOMMU disable is called
from error legs in amd_iommu_init() in pass-through mode.
Requesting for comments as I don't have access to AMD system that supports
IOMMU. I tested the change on AMD platforms with GART IOMMU which is not
sufficient.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
---
drivers/iommu/amd_iommu_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index c567903..1d8ab7f 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -1644,6 +1644,8 @@ static int __init amd_iommu_init(void)
amd_iommu_init_api();
+ x86_platform.iommu_shutdown = disable_iommus;
+
if (iommu_pass_through)
goto out;
@@ -1652,8 +1654,6 @@ static int __init amd_iommu_init(void)
else
printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n");
- x86_platform.iommu_shutdown = disable_iommus;
-
out:
return ret;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFC] iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
2012-06-06 16:50 [PATCH RFC] iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode Shuah Khan
@ 2012-06-07 9:32 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2012-06-07 9:32 UTC (permalink / raw)
To: Shuah Khan; +Cc: iommu, LKML
On Wed, Jun 06, 2012 at 10:50:06AM -0600, Shuah Khan wrote:
> Change AMD iommu driver to call disable iommus in pass-through mode. AMD
> iommu driver's amd_iommu_init() routine doesn't initialize iommu_shutdown
> in pass-through mode. As a result iommu disable via a call to disable_iommus()
> doesn't happen at shutdown. Enable and disable of iommus is inconsistent in
> pass-through mode. IOMMU is enabled, but not disabled. IOMMU disable is called
> from error legs in amd_iommu_init() in pass-through mode.
>
> Requesting for comments as I don't have access to AMD system that supports
> IOMMU. I tested the change on AMD platforms with GART IOMMU which is not
> sufficient.
>
> Signed-off-by: Shuah Khan <shuah.khan@hp.com>
The patch is fine. Thanks, applied to iommu/fixes.
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-07 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 16:50 [PATCH RFC] iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode Shuah Khan
2012-06-07 9:32 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox