From: Hanjun Guo <guohanjun@huawei.com>
To: Joerg Roedel <joro@8bytes.org>, <iommu@lists.linux-foundation.org>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>,
Will Deacon <will@kernel.org>,
linux-arm-msm@vger.kernel.org, Linuxarm <linuxarm@huawei.com>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Thierry Reding <thierry.reding@gmail.com>,
linux-mediatek@lists.infradead.org,
Andy Gross <agross@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Sean Paul <sean@poorly.run>, Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 00/14] iommu: Move iommu_fwspec out of 'struct device'
Date: Fri, 6 Mar 2020 16:39:37 +0800 [thread overview]
Message-ID: <ea839f32-194a-29ea-57fc-22caea40b981@huawei.com> (raw)
In-Reply-To: <20200228150820.15340-1-joro@8bytes.org>
Hi Joerg,
On 2020/2/28 23:08, Joerg Roedel wrote:
> Hi,
>
> here is a patch-set to rename iommu_param to dev_iommu and
> establish it as a struct for generic per-device iommu-data.
> Also move the iommu_fwspec pointer from struct device into
> dev_iommu to have less iommu-related pointers in struct
> device.
>
> The bigger part of this patch-set moves the iommu_priv
> pointer from struct iommu_fwspec to dev_iommu, making is
> usable for iommu-drivers which do not use fwspecs.
>
> The changes for that were mostly straightforward, except for
> the arm-smmu (_not_ arm-smmu-v3) and the qcom iommu driver.
> Unfortunatly I don't have the hardware for those, so any
> testing of these drivers is greatly appreciated.
I tested this patch set on Kunpeng 920 ARM64 server which
using smmu-v3 with ACPI booting, but triggered a NULL
pointer dereference and panic at boot:
[ 14.832752] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
[ 14.851425] Mem abort info:
[ 14.858940] ESR = 0x96000004
[ 14.866519] EC = 0x25: DABT (current EL), IL = 32 bits
[ 14.876580] SET = 0, FnV = 0
[ 14.884412] EA = 0, S1PTW = 0
[ 14.892275] Data abort info:
[ 14.899802] ISV = 0, ISS = 0x00000004
[ 14.908141] CM = 0, WnR = 0
[ 14.915401] [0000000000000010] user address but active_mm is swapper
[ 14.926367] Internal error: Oops: 96000004 [#1] SMP
[ 14.935992] Modules linked in:
[ 14.943724] CPU: 36 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc2+ #4
[ 14.955020] Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 0.81 07/10/2019
[ 14.972008] pstate: 80c00009 (Nzcv daif +PAN +UAO)
[ 14.981774] pc : iort_iommu_configure+0xdc/0x230
[ 14.991481] lr : iort_iommu_configure+0xcc/0x230
[ 15.001075] sp : ffff800011b3bad0
[ 15.009338] x29: ffff800011b3bad0 x28: ffff8000110a8968
[ 15.019483] x27: ffff800011540000 x26: ffff8000110004c8
[ 15.029390] x25: 0000000000000006 x24: 0000000000000000
[ 15.039336] x23: 0000000000000000 x22: 0000000000000000
[ 15.049270] x21: ffff8000113f9000 x20: ffff00002f5b0414
[ 15.059038] x19: ffff002fdc8f90b0 x18: ffffffffffffffff
[ 15.068590] x17: 0000000000000008 x16: 0000000000000005
[ 15.078182] x15: ffff8000113f9948 x14: ffff2027d993e91c
[ 15.087824] x13: ffff2027d993e16d x12: 0000000000000000
[ 15.097440] x11: 0101010101010101 x10: 00000000ffffff76
[ 15.106995] x9 : 0000000000000000 x8 : ffff2027d9a79b80
[ 15.116629] x7 : 0000000000000000 x6 : 000000000000003f
[ 15.126252] x5 : 0000000000000001 x4 : 0000000000000000
[ 15.135781] x3 : 0000000000000600 x2 : 0000000000000040
[ 15.145221] x1 : 0000000000000004 x0 : 0000000000000001
[ 15.154472] Call trace:
[ 15.160674] iort_iommu_configure+0xdc/0x230
[ 15.168752] acpi_dma_configure+0x88/0xb8
[ 15.176461] pci_dma_configure+0xc0/0xe0
[ 15.183935] really_probe+0xbc/0x498
[ 15.190853] driver_probe_device+0x12c/0x148
[ 15.198426] device_driver_attach+0x74/0x98
[ 15.205860] __driver_attach+0xc4/0x178
[ 15.213045] bus_for_each_dev+0x84/0xd8
[ 15.220185] driver_attach+0x30/0x40
[ 15.227051] bus_add_driver+0x170/0x258
[ 15.234241] driver_register+0x64/0x118
[ 15.241432] __pci_register_driver+0x58/0x68
[ 15.249202] hibmc_pci_driver_init+0x28/0x30
[ 15.256966] do_one_initcall+0x54/0x250
[ 15.264301] kernel_init_freeable+0x24c/0x2e0
[ 15.272164] kernel_init+0x18/0x110
[ 15.279068] ret_from_fork+0x10/0x18
[ 15.286033] Code: 2a0003f6 35000840 b9401a80 360005a0 (b94012e0)
[ 15.295791] ---[ end trace 881fe61747538fd0 ]---
[ 15.304039] Kernel panic - not syncing: Fatal exception
I don't have a time slot to do the detail investigation, but seems
that we don't have the iommu_fwspec properly initialized with ACPI
booting after applying this patch set.
Thanks
Hanjun
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-03-06 8:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 15:08 [PATCH 00/14] iommu: Move iommu_fwspec out of 'struct device' Joerg Roedel
2020-02-28 15:08 ` [PATCH 01/14] ACPI/IORT: Remove direct access of dev->iommu_fwspec Joerg Roedel
2020-02-28 15:08 ` [PATCH 02/14] drm/msm/mdp5: " Joerg Roedel
2020-02-29 3:04 ` kbuild test robot
2020-02-28 15:08 ` [PATCH 03/14] iommu/tegra-gart: " Joerg Roedel
2020-02-28 15:08 ` [PATCH 04/14] iommu/arm-smmu: Fix uninitilized variable warning Joerg Roedel
2020-02-28 15:08 ` [PATCH 05/14] iommu: Rename struct iommu_param to dev_iommu Joerg Roedel
2020-02-28 15:08 ` [PATCH 06/14] iommu: Move iommu_fwspec to struct dev_iommu Joerg Roedel
2020-02-28 15:08 ` [PATCH 07/14] iommu: Introduce accessors for iommu private data Joerg Roedel
2020-02-28 15:08 ` [PATCH 08/14] iommu/arm-smmu-v3: Use accessor functions " Joerg Roedel
2020-02-28 15:08 ` [PATCH 09/14] iommu/arm-smmu: " Joerg Roedel
2020-02-28 15:08 ` [PATCH 10/14] iommu/renesas: " Joerg Roedel
2020-02-28 15:08 ` [PATCH 11/14] iommu/mediatek: " Joerg Roedel
2020-02-28 15:08 ` [PATCH 12/14] iommu/qcom: " Joerg Roedel
2020-02-28 15:08 ` [PATCH 13/14] iommu/virtio: " Joerg Roedel
2020-02-28 15:08 ` [PATCH 14/14] iommu: Move fwspec->iommu_priv to struct dev_iommu Joerg Roedel
2020-03-03 19:16 ` [PATCH 00/14] iommu: Move iommu_fwspec out of 'struct device' Will Deacon
2020-03-04 13:27 ` Joerg Roedel
2020-03-06 8:39 ` Hanjun Guo [this message]
2020-03-06 10:09 ` Jean-Philippe Brucker
2020-03-06 11:04 ` Hanjun Guo
2020-03-09 16:32 ` Joerg Roedel
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=ea839f32-194a-29ea-57fc-22caea40b981@huawei.com \
--to=guohanjun@huawei.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=joro@8bytes.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=matthias.bgg@gmail.com \
--cc=robin.murphy@arm.com \
--cc=sean@poorly.run \
--cc=sudeep.holla@arm.com \
--cc=thierry.reding@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=will@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