From: Baolu Lu <baolu.lu@linux.intel.com>
To: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: baolu.lu@linux.intel.com, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>,
Dave Jiang <dave.jiang@intel.com>, Vinod Koul <vkoul@kernel.org>,
Fenghua Yu <fenghuay@nvidia.com>,
Zhou Wang <wangzhou1@hisilicon.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH v4 0/8] iommu: Remove IOMMU_DEV_FEAT_SVA/_IOPF
Date: Thu, 13 Mar 2025 19:20:43 +0800 [thread overview]
Message-ID: <b85990db-41f4-41cc-ab5c-0b952becdde7@linux.intel.com> (raw)
In-Reply-To: <CABQgh9G=7q+FQ0ECZ60UjawgkAM2aeNEb6hXgndEv8S9_4CuPw@mail.gmail.com>
On 2025/3/13 18:57, Zhangfei Gao wrote:
> On Thu, 13 Mar 2025 at 17:51, Zhangfei Gao<zhangfei.gao@linaro.org> wrote:
>> Hi, Baolu
>>
>> On Thu, 13 Mar 2025 at 13:19, Lu Baolu<baolu.lu@linux.intel.com> wrote:
>>> The new method for driver fault reporting support relies on the domain
>>> to specify a iopf_handler. The driver should detect this and setup the
>>> HW when fault capable domains are attached.
>>>
>>> Move SMMUv3 to use this method and have VT-D validate support during
>>> attach so that all three fault capable drivers have a no-op FEAT_SVA and
>>> _IOPF. Then remove them.
>>>
>>> This was initiated by Jason. I'm following up to remove FEAT_IOPF and
>>> further clean up.
>>>
>>> The whole series is also available at github:
>>> https://github.com/LuBaolu/intel-iommu/commits/iommu_no_feat-v4
>> I got an issue on this branch.
>>
>> Linux 6.14-rc4 + iommu_no_feat-v2
>> drivers/pci/quirks.c
>> quirk_huawei_pcie_sva will set dma-can-stall first
>> arm_smmu_probe_device will check dma-can-stall and set stall_enabled
>> accordingly.
> This working branch arm_smmu_probe_device is called from pci_bus_add_device
> So pci_fixup_device is called first
>
> [ 1121.314405] arm_smmu_probe_device+0x48/0x450
> [ 1121.314410] __iommu_probe_device+0xc4/0x3c8
> [ 1121.314412] iommu_probe_device+0x40/0x90
> [ 1121.314414] acpi_dma_configure_id+0xb4/0x100
> [ 1121.314417] pci_dma_configure+0xf8/0x108
> [ 1121.314421] really_probe+0x78/0x278
> [ 1121.314425] __driver_probe_device+0x80/0x140
> [ 1121.314427] driver_probe_device+0x48/0x130
> [ 1121.314430] __device_attach_driver+0xc0/0x108
> [ 1121.314432] bus_for_each_drv+0x8c/0xf8
> [ 1121.314435] __device_attach+0x104/0x1a0
> [ 1121.314437] device_attach+0x1c/0x30
> [ 1121.314440] pci_bus_add_device+0xb8/0x1f0
> [ 1121.314442] pci_iov_add_virtfn+0x2ac/0x300
> [ 1121.314446] sriov_enable+0x204/0x468
> [ 1121.314447] pci_enable_sriov+0x20/0x40
>
>
>> This branch
>> arm_smmu_probe_device happens first, when dma-can-stall = 0, so
>> stall_enabled =0.
>> Then drivers/pci/quirks.c: quirk_xxx happens
> This not working branch: Linux 6.14-rc6 + iommu_no_feat-v4
> arm_smmu_probe_device is called by pci_device_add
> Then call pci_bus_add_device -> pci_fixup_device
>
> 215.072859] arm_smmu_probe_device+0x48/0x450
> [ 215.072871] __iommu_probe_device+0xc0/0x468
> [ 215.072875] iommu_probe_device+0x40/0x90
> [ 215.072877] iommu_bus_notifier+0x38/0x68
> [ 215.072879] notifier_call_chain+0x80/0x148
> [ 215.072886] blocking_notifier_call_chain+0x50/0x80
> [ 215.072889] bus_notify+0x44/0x68
> [ 215.072896] device_add+0x580/0x768
> [ 215.072898] pci_device_add+0x1e8/0x568
> [ 215.072906] pci_iov_add_virtfn+0x198/0x300
> [ 215.072910] sriov_enable+0x204/0x468
> [ 215.072912] pci_enable_sriov+0x20/0x40
>
> pci_iov_add_virtfn:
> pci_device_add(virtfn, virtfn->bus);
> pci_bus_add_device(virtfn); -> pci_fixup_device(pci_fixup_final, dev);
This probably is not caused by this patch series. Can you please have a
try with the next branch of iommu tree? Or the latest linux-next tree?
https://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
Thanks,
baolu
next prev parent reply other threads:[~2025-03-13 11:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 5:19 [PATCH v4 0/8] iommu: Remove IOMMU_DEV_FEAT_SVA/_IOPF Lu Baolu
2025-03-13 5:19 ` [PATCH v4 1/8] iommu/arm-smmu-v3: Put iopf enablement in the domain attach path Lu Baolu
2025-03-13 5:19 ` [PATCH v4 2/8] iommu: Remove IOMMU_DEV_FEAT_SVA Lu Baolu
2025-03-13 5:19 ` [PATCH v4 3/8] iommu/vt-d: Put iopf enablement in domain attach path Lu Baolu
2025-03-18 9:58 ` Yi Liu
2025-03-18 13:19 ` Baolu Lu
2025-03-13 5:19 ` [PATCH v4 4/8] iommufd/selftest: " Lu Baolu
2025-03-18 10:25 ` Yi Liu
2025-03-18 19:50 ` Nicolin Chen
2025-03-13 5:19 ` [PATCH v4 5/8] dmaengine: idxd: Remove unnecessary IOMMU_DEV_FEAT_IOPF Lu Baolu
2025-03-18 10:20 ` Yi Liu
2025-03-13 5:19 ` [PATCH v4 6/8] uacce: " Lu Baolu
2025-03-13 5:19 ` [PATCH v4 7/8] iommufd: " Lu Baolu
2025-03-13 5:19 ` [PATCH v4 8/8] iommu: Remove iommu_dev_enable/disable_feature() Lu Baolu
2025-03-13 9:51 ` [PATCH v4 0/8] iommu: Remove IOMMU_DEV_FEAT_SVA/_IOPF Zhangfei Gao
2025-03-13 10:57 ` Zhangfei Gao
2025-03-13 11:20 ` Baolu Lu [this message]
2025-03-13 11:37 ` Zhangfei Gao
2025-03-14 4:04 ` Zhangfei Gao
2025-03-14 8:11 ` Zhangfei Gao
2025-03-17 14:15 ` Jason Gunthorpe
2025-04-16 7:29 ` Zhangfei Gao
2025-04-16 7:33 ` Baolu Lu
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=b85990db-41f4-41cc-ab5c-0b952becdde7@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=fenghuay@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=vkoul@kernel.org \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=zhangfei.gao@linaro.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.