From: Joerg Roedel <joerg.roedel@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Joerg Roedel <joerg.roedel@amd.com>,
Chris Wright <chrisw@sous-sol.org>
Subject: [PATCH 3/4] amd-iommu: detach device explicitly before attaching it to a new domain
Date: Tue, 9 Jun 2009 15:57:19 +0200 [thread overview]
Message-ID: <1244555840-3855-4-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1244555840-3855-1-git-send-email-joerg.roedel@amd.com>
This fixes a bug with a device that could not be assigned to a KVM guest
because it is still assigned to a dma_ops protection domain.
[chrisw: simply remove WARN_ON(), will always fire since dev->driver
will be pci-sub]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 8187260..772e910 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2073,7 +2073,7 @@ static int amd_iommu_attach_device(struct iommu_domain *dom,
old_domain = domain_for_device(devid);
if (old_domain)
- return -EBUSY;
+ detach_device(old_domain, devid);
attach_device(iommu, domain, devid);
--
1.6.3.1
next prev parent reply other threads:[~2009-06-09 13:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 13:57 [git pull][PATCH 0/4] amd-iommu fixes for tip/core/iommu Joerg Roedel
2009-06-09 13:57 ` [PATCH 1/4] amd_iommu: fix lock imbalance Joerg Roedel
2009-06-09 13:57 ` [PATCH 2/4] amd-iommu: remove BUS_NOTIFY_BOUND_DRIVER handling Joerg Roedel
2009-06-09 14:15 ` Chris Wright
2009-06-09 13:57 ` Joerg Roedel [this message]
2009-06-09 13:57 ` [PATCH 4/4] amd-iommu: remove unnecessary "AMD IOMMU: " prefix Joerg Roedel
2009-06-09 14:21 ` [git pull][PATCH 0/4] amd-iommu fixes for tip/core/iommu Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244555840-3855-4-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=chrisw@sous-sol.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®