From: James Dong <xmdong@google.com>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Joerg Roedel <joro@8bytes.org>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Jis Ben <jisben@google.com>, James Dong <xmdong@google.com>
Subject: RE: [PATCH] iommu/vt-d: Handle hotplug devices' default identity mapping setting
Date: Sun, 24 Feb 2019 16:10:30 +0000 [thread overview]
Message-ID: <20190224161030.253393-1-xmdong@google.com> (raw)
In-Reply-To: <897e8383-ad75-35d0-5ad9-3d3a8b46b6ba@linux.intel.com>
Baolu:
Yes, it is a generic issue for hotplug devices with current Intel IOMMU driver,
as reported in this thread as well.
The patch you provided does the job in our case. Please update this thread once
your patch is merged. Thanks.
Best Regards,
James
On 2/23/19 12:56 AM, Lu Baolu wrote
>
> @@ -4807,16 +4807,19 @@ static int device_notifier(struct notifier_block *nb,
> if (iommu_dummy(dev))
> return 0;
>
>- if (action != BUS_NOTIFY_REMOVED_DEVICE)
>- return 0;
>-
>- domain = find_domain(dev);
>- if (!domain)
>- return 0;
>+ if (action == BUS_NOTIFY_REMOVED_DEVICE) {
>+ domain = find_domain(dev);
>+ if (!domain)
>+ return 0;
>
>- dmar_remove_one_dev_info(dev);
>- if (!domain_type_is_vm_or_si(domain) && list_empty(&domain->devices))
>- domain_exit(domain);
>+ dmar_remove_one_dev_info(dev);
>+ if (!domain_type_is_vm_or_si(domain) &&
>+ list_empty(&domain->devices))
>+ domain_exit(domain);
>+ } else if (action == BUS_NOTIFY_ADD_DEVICE) {
>+ if (iommu_should_identity_map(dev, 1))
>+ domain_add_dev_info(si_domain, dev);
>+ }
next prev parent reply other threads:[~2019-02-24 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 2:44 [PATCH] iommu/vt-d: Handle hotplug devices' default identity mapping setting James Dong
2019-02-22 5:06 ` Lu Baolu
2019-02-22 5:30 ` Lu Baolu
2019-02-22 7:36 ` James Dong
2019-02-24 8:51 ` Lu Baolu
2019-02-24 16:10 ` James Dong [this message]
[not found] ` <CADcZez2q7aUL=ahHSGnfO2QDjKL052AePd=TsxkCK-O7EcW77Q@mail.gmail.com>
2019-02-22 7:42 ` Lu Baolu
2019-02-22 8:28 ` James Dong
2019-02-22 18:10 ` Jis Ben
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=20190224161030.253393-1-xmdong@google.com \
--to=xmdong@google.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jisben@google.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox