From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Cc: baolu.lu@linux.intel.com, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"Pan, Jacob jun" <jacob.jun.pan@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/7] iommu/vt-d: Use device_block_translation() in dev_attach error path
Date: Sat, 5 Nov 2022 10:59:08 +0800 [thread overview]
Message-ID: <3dac436c-29e1-de3d-85f3-67e8af608124@linux.intel.com> (raw)
In-Reply-To: <f6ee3ad3-0e75-2bc0-d03d-c2456ed6620a@linux.intel.com>
On 2022/11/5 10:09, Baolu Lu wrote:
>>
>> btw this change is partial. @attach_dev still calls
>> iommu_enable_pci_caps()
>> which always tries to enable PCI capabilities w/o checking whether they
>> have been enabled or not. Then user will hit -EBUSY when related PCI
>> helpers are called.
>
> Good catch!
>
> How about moving iommu_enable/disable_pci_caps() into
> iommu_probe/release_device() path? I may look into details if there's no
> significant arch gaps.
After reconsideration, it seems that this is not a feasible solution.
This changes the order in which PCI devices enable DMA.In addition, for
the kdump kernel, this is not feasible because there may be on-going DMA
on the device.
Perhaps I can make the iommu_enable_pci_caps() reentrant.
Best regards,
baolu
next prev parent reply other threads:[~2022-11-05 2:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 5:53 [PATCH 0/7] iommu/vt-d: Some cleanups Lu Baolu
2022-11-03 5:53 ` [PATCH 1/7] iommu/vt-d: Allocate pasid table in device probe path Lu Baolu
2022-11-04 2:06 ` Tian, Kevin
2022-11-05 1:09 ` Baolu Lu
2022-11-05 1:33 ` Tian, Kevin
2022-11-03 5:53 ` [PATCH 2/7] iommu/vt-d: Add blocking domain support Lu Baolu
2022-11-04 2:11 ` Tian, Kevin
2022-11-05 1:54 ` Baolu Lu
2022-11-03 5:53 ` [PATCH 3/7] iommu/vt-d: Use device_block_translation() in dev_attach error path Lu Baolu
2022-11-04 2:18 ` Tian, Kevin
2022-11-05 2:09 ` Baolu Lu
2022-11-05 2:59 ` Baolu Lu [this message]
2022-11-03 5:53 ` [PATCH 4/7] iommu/vt-d: Fold dmar_remove_one_dev_info() into its caller Lu Baolu
2022-11-03 5:53 ` [PATCH 5/7] iommu/vt-d: Rename domain_add_dev_info() Lu Baolu
2022-11-03 5:53 ` [PATCH 6/7] iommu/vt-d: Remove unnecessary domain_context_mapped() Lu Baolu
2022-11-04 2:19 ` Tian, Kevin
2022-11-03 5:53 ` [PATCH 7/7] iommu/vt-d: Use real field for indication of first level Lu Baolu
2022-11-04 2:20 ` Tian, Kevin
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=3dac436c-29e1-de3d-85f3-67e8af608124@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jacob.jun.pan@intel.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yi.l.liu@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