All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 215906] DMAR fault when connected usb hub (xhci_hcd)
Date: Thu, 02 Nov 2023 10:59:57 +0000	[thread overview]
Message-ID: <bug-215906-208809-aWFC9pSc1U@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-215906-208809@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=215906

--- Comment #17 from Mathias Nyman (mathias.nyman@linux.intel.com) ---
If I understand correctly this is caused by the VIA VL805 xHC controller with
bad firmware accessing some DMA address outside the allowed range.

With IOMMU enabled the IOMMU will prevent this access, and the controller
fails.

I'm speculating here, but it could be possible the controller accesses past one
of the DMA ranges wile trying to read-ahead.

If we can figure out past which area, then its possible to make a driver
workaround for this controller that allocates a bit larger DMA chunk for that
specific purpose. 

DMA memory allocated for xHC use before any USB device is connected:

- dcbaa device context base address array.
  arrays of pointers to device contexts
  dma_alloc_coherent(dev)

- command ring
  dma_pool_zalloc(segment_pool)

- event ring
  dma_pool_zalloc(segment_pool)

- event ring segment table
  info about event ring, segents, size and location
  dma_alloc_coherent(dev)

- Scratchpad,
  only touched (RW) by xHC controller, not driver.
  dma_alloc_coheret()

DMA memory allocated for each connected USB device.

- device contexts
  dma_pool_zalloc(device_pool)

- transfer rings,
  contains TRBs, metadata about transfers.
  dma_pool_zalloc(segment_pool)

- stream contexts,
  dma_alloc_coherent() or dma_pool_alloc(*_streams_pool)

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2023-11-02 10:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 20:21 [Bug 215906] New: DMAR fault when connected usb hub (xhci_hcd) bugzilla-daemon
2022-05-01 12:32 ` [Bug 215906] " bugzilla-daemon
2022-05-05  9:40 ` bugzilla-daemon
2022-05-05 12:30 ` bugzilla-daemon
2022-05-06 15:49 ` bugzilla-daemon
2022-05-09  5:42 ` bugzilla-daemon
2022-05-09  8:11 ` bugzilla-daemon
2022-05-09  9:00 ` bugzilla-daemon
2022-06-20  8:40 ` bugzilla-daemon
2023-10-22 19:19 ` bugzilla-daemon
2023-10-25  9:23 ` bugzilla-daemon
2023-10-29 22:39 ` bugzilla-daemon
2023-10-30 16:21 ` bugzilla-daemon
2023-10-30 16:26 ` bugzilla-daemon
2023-10-30 17:18 ` bugzilla-daemon
2023-10-31  9:10 ` bugzilla-daemon
2023-10-31 15:40 ` bugzilla-daemon
2023-11-02 10:59 ` bugzilla-daemon [this message]
2023-11-04  8:06 ` bugzilla-daemon

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=bug-215906-208809-aWFC9pSc1U@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-usb@vger.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 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.