Re: DMA Faults with XHCI driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On 24.6.2022 17.38, Jörg Rödel wrote:
Hi Mathias,

here is a report about something strange happening on my system after a
recent IOMMU change. I am starting to see this message at boot:

	xhci_hcd 0000:02:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0xff00ffffffefe000 flags=0x0000]

It means that the XHCI device tried a DMA access at address
0xff00ffffffefe000, which was not mapped in the IOMMU page table.

Devices attached to that XHCI controller will not work after that
message.

There is a related change in the IOMMU code which uncovered this, the
change basically lets the IOMMU dma-allocator not allocate below 4GB by
default, but use the whole space covered by the DMA mask.

To better track this down I limited the DMA-space to 48 bits, and the
message still shows up.

I think this might be a problem in the XHCI driver, e.g. it might mangle
an allocated DMA address somehow if it is bigger than 32 bit.

The device behind 0000:02:00.0 is a

	02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43d0 (rev 01)

Please let me know what I can do to help tracking this down.

Thanks for reporting this.

Can you boot with xhci dynamic debug and tracing enabled? could help pinpoint
when the controller is trying to access the unmapped DMA address.

Add to kernel cmdline:
xhci_hcd.dyndbg=+p trace_event=xhci-hcd trace_buf_size=80M
<boot>
mount -t debugfs none /sys/kernel/debug
Send output of dmesg
Send content of /sys/kernel/debug/tracing/trace

Also if you could dump the content of following registers:
cat /sys/kernel/debug/usb/xhci/<pci address>/reg-op
cat /sys/kernel/debug/usb/xhci/<pci address>/reg-runtime

xhci driver writes dma addresses it allocated for the host into
some of those registers

Thanks
Mathias



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux