Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186074

Re: [PATCH] iommu/vt-d: Fix VM domain ID leak

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [PATCH] iommu/vt-d: Fix VM domain ID leak
Date 2015-07-16 19:10 +0200
Message-ID <pMUPw-4yJ-9@gated-at.bofh.it> (permalink)
References <pMfjk-2VX-21@gated-at.bofh.it> <pMTgK-2eq-9@gated-at.bofh.it> <pMTA6-2Br-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 16, 2015 at 09:43:55AM -0600, Alex Williamson wrote:
> I was tempted to do this as well, but what about
> domain_remove_dev_info() where we also handle vm domains specially and
> don't do a symmetric detach in both directions?  I started down that
> path but quickly found the code to fragile to make those kinds of
> changes.  Thanks,

Okay, so domain_remove_dev_info() does:

                if (domain_type_is_vm(domain)) {
                        iommu_detach_dependent_devices(info->iommu, info->dev);
                        domain_detach_iommu(domain, info->iommu);
                }

... in a loop over all devices attached to the domain. The first
function (iommu_detach_dependent_devices) is not special to vm-domains.
In fact, domain_remove_one_dev_info calls it for all domain types.

And domain_detach_iommu only clears the bit in the iommu_bmp of the
domain, which is also not special and also called for all domain types
in domain_remove_one_dev_info.

So it looks like this special handling has no real purpose and is just
part of the whole mess. I am currently working on the conversion of the
Intel VT-d driver to use default-domains from the iommu-core. When this
is done we can get rid of that mess.



	Joerg

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] iommu/vt-d: Fix VM domain ID leak Alex Williamson <alex.williamson@redhat.com> - 2015-07-14 22:50 +0200
  Re: [PATCH] iommu/vt-d: Fix VM domain ID leak Joerg Roedel <joro@8bytes.org> - 2015-07-16 17:30 +0200
    Re: [PATCH] iommu/vt-d: Fix VM domain ID leak Alex Williamson <alex.williamson@redhat.com> - 2015-07-16 17:50 +0200
      Re: [PATCH] iommu/vt-d: Fix VM domain ID leak Joerg Roedel <joro@8bytes.org> - 2015-07-16 19:10 +0200

csiph-web