From: Manish Jaggi <mjaggi@caviumnetworks.com>
To: Robert VanVossen <robert.vanvossen@dornerworks.com>,
xen-devel@lists.xenproject.org
Cc: julien.grall@citrix.com, edgar.iglesias@xilinx.com,
Josh.Whitehead@dornerworks.com, Ian.Campbell@citrix.com,
Stefano.Stabellini@eu.citrix.com
Subject: Re: [PATCH v2] xen/passthrough: Support a single iommu_domain per xen domain per SMMU
Date: Wed, 25 Mar 2015 10:28:07 +0530 [thread overview]
Message-ID: <5512405F.7080005@caviumnetworks.com> (raw)
In-Reply-To: <55116EED.8010704@dornerworks.com>
On Tuesday 24 March 2015 07:34 PM, Robert VanVossen wrote:
>
> On 3/24/2015 7:07 AM, Manish Jaggi wrote:
>> On Monday 23 March 2015 07:16 PM, Robbie VanVossen wrote:
>>> If multiple devices are being passed through to the same domain and they
>>> share a single SMMU, then they only require a single iommu_domain.
>>>
>>> In arm_smmu_assign_dev, before a new iommu_domain is created, the
>>> xen_domain->contexts is checked for any iommu_domains that are already
>>> assigned to device that uses the same SMMU as the current device. If one
>>> is found, attach the device to that iommu_domain. If a new one isn't
>>> found, create a new iommu_domain just like before.
>>>
>>> The arm_smmu_deassign_dev function assumes that there is a single
>>> device per iommu_domain. This meant that when the first device was
>>> deassigned, the iommu_domain was freed and when another device was
>>> deassigned a crash occured in xen.
>>>
>>> To fix this, a reference counter was added to the iommu_domain struct.
>>> When an arm_smmu_xen_device references an iommu_domain, the
>>> iommu_domains ref is incremented. When that reference is removed, the
>>> iommu_domains ref is decremented. The iommu_domain will only be freed
>>> when the ref is 0.
>>>
>>> Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
>> Hi,
>> Are you adding a PCI passthrough support to Xen ?. I am in process of
>> sending smmu driver patches based on juliens latest code.
>>
> Nope, I am just working on what this patch describes
Your patch is doing similar thing what am working on. As per the Xen 4.6
release I took smmu for pci-passthorugh. I didnt send smmu patches so
far as there are other dependency patches I need to send first like
pci_host_bridge register hypercall patch.
Julien/Ian could you please hold the merge of this patch.
> Thanks,
> Robbie VanVossen
> DornerWorks
>
next prev parent reply other threads:[~2015-03-25 4:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 13:46 [PATCH v2] xen/passthrough: Support a single iommu_domain per xen domain per SMMU Robbie VanVossen
2015-03-23 21:53 ` Julien Grall
2015-03-24 15:07 ` Robert VanVossen
2015-03-24 15:19 ` Julien Grall
2015-03-24 11:07 ` Manish Jaggi
2015-03-24 14:04 ` Robert VanVossen
2015-03-25 4:58 ` Manish Jaggi [this message]
2015-03-25 17:35 ` Stefano Stabellini
2015-03-30 11:04 ` Manish Jaggi
2015-03-30 11:40 ` Julien Grall
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=5512405F.7080005@caviumnetworks.com \
--to=mjaggi@caviumnetworks.com \
--cc=Ian.Campbell@citrix.com \
--cc=Josh.Whitehead@dornerworks.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=edgar.iglesias@xilinx.com \
--cc=julien.grall@citrix.com \
--cc=robert.vanvossen@dornerworks.com \
--cc=xen-devel@lists.xenproject.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.