From: Joerg Roedel Date: Tue, 1 Sep 2009 10:22:22 +0000 (+0200) Subject: x86/amd-iommu: Don't detach device from pt domain on driver unbind X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a1ca331c8aa75cd58fdf685e2e8745e1d3ec5c8f;p=deliverable%2Flinux.git x86/amd-iommu: Don't detach device from pt domain on driver unbind This patch makes sure a device is not detached from the passthrough domain when the device driver is unloaded or does otherwise release the device. Signed-off-by: Joerg Roedel --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index a8e74c34dd27..12a541deae5e 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -1195,6 +1195,8 @@ static int device_change_notifier(struct notifier_block *nb, case BUS_NOTIFY_UNBOUND_DRIVER: if (!domain) goto out; + if (iommu_pass_through) + break; detach_device(domain, devid); break; case BUS_NOTIFY_ADD_DEVICE: