From: David Woodhouse <dwmw2@infradead.org>
To: Yu Zhao <yu.zhao@intel.com>
Cc: linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org,
kvm@vger.kernel.org, jbarnes@virtuousgeek.org
Subject: Re: [PATCH v5 6/6] VT-d: support the device IOTLB
Date: Sun, 09 Aug 2009 11:28:20 +0100 [thread overview]
Message-ID: <1249813700.4919.91.camel@macbook.infradead.org> (raw)
In-Reply-To: <1242625897-1678-7-git-send-email-yu.zhao@intel.com>
On Mon, 2009-05-18 at 13:51 +0800, Yu Zhao wrote:
>
> +static struct device_domain_info *iommu_support_dev_iotlb(
> + struct dmar_domain *domain, int segment, u8 bus, u8 devfn)
> +{
> + int found = 0;
> + unsigned long flags;
> + struct device_domain_info *info;
> + struct intel_iommu *iommu = device_to_iommu(segment, bus,
> devfn);
> +
> + if (!ecap_dev_iotlb_support(iommu->ecap))
> + return NULL;
> +
> + if (!iommu->qi)
> + return NULL;
> +
> + spin_lock_irqsave(&device_domain_lock, flags);
> + list_for_each_entry(info, &domain->devices, link)
> + if (info->bus == bus && info->devfn == devfn) {
> + found = 1;
> + break;
> + }
> + spin_unlock_irqrestore(&device_domain_lock, flags);
What if there's more than one device? You only enable ATS for the first
device that supports it, and ignore the others?
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
prev parent reply other threads:[~2009-08-09 10:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 5:51 [PATCH v5 0/6] ATS capability support for Intel IOMMU Yu Zhao
2009-05-18 5:51 ` [PATCH v5 1/6] PCI: support the ATS capability Yu Zhao
2009-05-18 5:51 ` [PATCH v5 2/6] PCI: handle Virtual Function ATS enabling Yu Zhao
2009-05-18 5:51 ` [PATCH v5 3/6] VT-d: parse ATSR in DMA Remapping Reporting Structure Yu Zhao
2009-05-18 5:51 ` [PATCH v5 4/6] VT-d: add device IOTLB invalidation support Yu Zhao
2009-05-18 5:51 ` [PATCH v5 5/6] VT-d: cleanup iommu_flush_iotlb_psi and flush_unmaps Yu Zhao
2009-05-18 5:51 ` [PATCH v5 6/6] VT-d: support the device IOTLB Yu Zhao
2009-06-28 14:28 ` David Woodhouse
2009-06-29 3:07 ` Yu Zhao
2009-08-09 9:33 ` David Woodhouse
2009-08-09 10:28 ` David Woodhouse [this message]
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=1249813700.4919.91.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jbarnes@virtuousgeek.org \
--cc=kvm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=yu.zhao@intel.com \
/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