Thread (27 messages) 27 messages, 5 authors, 2024-07-30

RE: [PATCH] xen: introduce xen_vring_use_dma

From: Peng Fan <peng.fan@nxp.com>
Date: 2020-06-30 01:40:10
Also in: linux-iommu, lkml, virtualization, xen-devel

Subject: RE: [PATCH] xen: introduce xen_vring_use_dma

On Mon, 29 Jun 2020, Peng Fan wrote:
quoted
quoted
quoted
If that is the case, how is it possible that virtio breaks on ARM
using the default dma_ops? The breakage is not Xen related (except
that Xen turns dma_ops on). The original message from Peng was:

  vring_map_one_sg -> vring_use_dma_api
                   -> dma_map_page
  		       -> __swiotlb_map_page
  		                ->swiotlb_map_page
  				->__dma_map_area(phys_to_virt(dma_to_phys(dev,
dev_addr)), size, dir);
quoted
  However we are using per device dma area for rpmsg, phys_to_virt
  could not return a correct virtual address for virtual address in
  vmalloc area. Then kernel panic.

I must be missing something. Maybe it is because it has to do with
RPMesg?
quoted
quoted
I think it's an RPMesg bug, yes
rpmsg bug is another issue, it should not use dma_alloc_coherent for
reserved area, and use vmalloc_to_page.

Anyway here using dma api will also trigger issue.
Is the stack trace above for the RPMesg issue or for the Trusty issue?
The stack trace you pasted is rpmsg issue.
If it is the stack trace for RPMesg, can you also post the Trusty stack trace? Or
are they indentical?
There is no stack dump here. It successfully using swiotlb to do a map,
but we actually no need swiotlb in domu to do the map.

Thanks,
Peng.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help