Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703969
| From | Baoquan He <bhe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v9 12/13] iommu/amd: Clear out the GV flag when handle deferred domain attach |
| Date | 2017-08-04 15:20 +0200 |
| Message-ID | <uaKGe-7th-27@gated-at.bofh.it> (permalink) |
| References | <u9DGO-3pR-9@gated-at.bofh.it> <u9DGQ-3pR-55@gated-at.bofh.it> <uaK3v-6XA-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/04/17 at 02:30pm, Joerg Roedel wrote:
> On Tue, Aug 01, 2017 at 07:37:28PM +0800, Baoquan He wrote:
> > @@ -2466,11 +2472,21 @@ static struct protection_domain *get_domain(struct device *dev)
> > return ERR_PTR(-EINVAL);
> >
> > domain = get_dev_data(dev)->domain;
> > - if (domain == NULL && get_dev_data(dev)->defer_attach) {
> > + if (domain == NULL && dev_data->defer_attach) {
> > + u16 alias = amd_iommu_alias_table[dev_data->devid];
> > get_dev_data(dev)->defer_attach = false;
> > io_domain = iommu_get_domain_for_dev(dev);
> > domain = to_pdomain(io_domain);
> > attach_device(dev, domain);
> > + /*
> > + * If the deferred attached domain is not v2, should clear out
> > + * the old GV flag.
> > + */
> > + if (!(domain->flags & PD_IOMMUV2_MASK)) {
> > + clear_dte_flag_gv(dev_data->devid);
> > + if (alias != dev_data->devid)
> > + clear_dte_flag_gv(dev_data->devid);
>
> Hmm, thinking more about it, I am not sure what the IOMMU responds to
> PRI/PASID prefixes if the GV flag is 0.
>
> But until we know it causes problems we should just disable the bit
> while doing the copy in the previous patch and avoid any special
> handling like done here.
So just drop this patch, right? Will do if I got it right. Thanks.
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v9 12/13] iommu/amd: Clear out the GV flag when handle deferred domain attach Baoquan He <bhe@redhat.com> - 2017-08-01 13:40 +0200
Re: [PATCH v9 12/13] iommu/amd: Clear out the GV flag when handle deferred domain attach Joerg Roedel <jroedel@suse.de> - 2017-08-04 14:40 +0200
Re: [PATCH v9 12/13] iommu/amd: Clear out the GV flag when handle deferred domain attach Joerg Roedel <jroedel@suse.de> - 2017-08-04 15:20 +0200
Re: [PATCH v9 12/13] iommu/amd: Clear out the GV flag when handle deferred domain attach Baoquan He <bhe@redhat.com> - 2017-08-04 15:20 +0200
csiph-web