[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing
- To: Claire Chang <tientzu@xxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>
- From: Robin Murphy <robin.murphy@xxxxxxx>
- Date: Thu, 24 Jun 2021 12:14:39 +0100
- Cc: Qian Cai <quic_qiancai@xxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Rob Herring <robh+dt@xxxxxxxxxx>, mpe@xxxxxxxxxxxxxx, Joerg Roedel <joro@xxxxxxxxxx>, Frank Rowand <frowand.list@xxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, heikki.krogerus@xxxxxxxxxxxxxxx, thomas.hellstrom@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, joonas.lahtinen@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, chris@xxxxxxxxxxxxxxxxxx, grant.likely@xxxxxxx, paulus@xxxxxxxxx, mingo@xxxxxxxxxx, Jianxiong Gao <jxgao@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Saravana Kannan <saravanak@xxxxxxxxxx>, xypron.glpk@xxxxxx, "Rafael J . Wysocki" <rafael.j.wysocki@xxxxxxxxx>, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>, bskeggs@xxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Thierry Reding <treding@xxxxxxxxxx>, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, matthew.auld@xxxxxxxxx, linux-devicetree <devicetree@xxxxxxxxxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, airlied@xxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, jani.nikula@xxxxxxxxxxxxxxx, Nicolas Boichat <drinkcat@xxxxxxxxxxxx>, rodrigo.vivi@xxxxxxxxx, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "list@xxxxxxx:IOMMU DRIVERS" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Jim Quinlan <james.quinlan@xxxxxxxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, bauerman@xxxxxxxxxxxxx
- Delivery-date: Thu, 24 Jun 2021 11:15:02 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2021-06-24 07:05, Claire Chang wrote:
On Thu, Jun 24, 2021 at 1:43 PM Christoph Hellwig <hch@xxxxxx> wrote:
On Wed, Jun 23, 2021 at 02:44:34PM -0400, Qian Cai wrote:
is_swiotlb_force_bounce at /usr/src/linux-next/./include/linux/swiotlb.h:119
is_swiotlb_force_bounce() was the new function introduced in this patch here.
+static inline bool is_swiotlb_force_bounce(struct device *dev)
+{
+ return dev->dma_io_tlb_mem->force_bounce;
+}
To me the crash looks like dev->dma_io_tlb_mem is NULL. Can you
turn this into :
return dev->dma_io_tlb_mem && dev->dma_io_tlb_mem->force_bounce;
for a quick debug check?
I just realized that dma_io_tlb_mem might be NULL like Christoph
pointed out since swiotlb might not get initialized.
However, `Unable to handle kernel paging request at virtual address
dfff80000000000e` looks more like the address is garbage rather than
NULL?
I wonder if that's because dev->dma_io_tlb_mem is not assigned
properly (which means device_initialize is not called?).
What also looks odd is that the base "address" 0xdfff800000000000 is
held in a couple of registers, but the offset 0xe looks too small to
match up to any relevant structure member in that dereference chain :/
Robin.
|