From: Don Dutile <ddutile@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: dwmw2@infradead.org, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
chrisw@redhat.com
Subject: Re: [PATCH v2 0/2] intel-iommu: Fix domain_ids exhaustion
Date: Thu, 17 Feb 2011 15:13:47 -0500 [thread overview]
Message-ID: <4D5D817B.8040609@redhat.com> (raw)
In-Reply-To: <20110216203204.2979.13203.stgit@s20.home>
Alex Williamson wrote:
> When we unbind a device from a driver, we don't properly unlink
> the domain from the iommu, so we never free the domain id it
> was using. We're typically limited to something like 256 domain
> ids, so a loop of unbinding and rebinding a device can exhaust
> this pretty quickly. If we're assigning the device to a KVM
> guest, libvirt does exactly this each time the device is removed
> from the host driver or added back. When we do run out, we oops
> the kernel. Fix these.
>
> v2:
>
> We only want to call domain_exit() for domains automatically created
> via the dma ops path. VM and SI domains have their own life cycle
> and should not be destroyed here. With v1, if a device was unbound
> from pci-stub while assigned to a VM, the kernel would oops on the
> next call into iommu ops.
>
> BTW, should we even be removing the device from the domain in the
> VM domain case? Drivers and VM domains are (unfortunately) orthogonal
> concepts here with the way KVM is currently wired. Thanks,
>
> Alex
>
> ---
>
> Alex Williamson (2):
> intel-iommu: Fix get_domain_for_dev() error path
> intel-iommu: Unlink domain from iommu
>
>
> drivers/pci/intel-iommu.c | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Acked-by: Donald Dutile <ddutile@redhat.com>
next prev parent reply other threads:[~2011-02-17 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 20:39 [PATCH v2 0/2] intel-iommu: Fix domain_ids exhaustion Alex Williamson
2011-02-16 20:39 ` [PATCH v2 1/2] intel-iommu: Unlink domain from iommu Alex Williamson
2011-02-16 20:40 ` [PATCH v2 2/2] intel-iommu: Fix get_domain_for_dev() error path Alex Williamson
2011-02-17 20:13 ` Don Dutile [this message]
2011-02-18 0:38 ` [PATCH v2 0/2] intel-iommu: Fix domain_ids exhaustion Henrique de Moraes Holschuh
2011-02-23 19:32 ` Alex Williamson
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=4D5D817B.8040609@redhat.com \
--to=ddutile@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=chrisw@redhat.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.