All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about DMA on 1:1 mapping dom0 of arm64
@ 2015-04-17 11:24 Chen Baozi
  2015-04-17 13:21 ` Ian Campbell
  2015-04-17 14:32 ` Stefano Stabellini
  0 siblings, 2 replies; 21+ messages in thread
From: Chen Baozi @ 2015-04-17 11:24 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, ian.campbell, stefano.stabellini

Hi all,

According to my recent experience, there might be some problems of swiotlb
dma map on 1:1 mapping arm64 dom0 with large memory. The issue is like below:

For those arm64 server with large memory, it is possible to set dom0_mem >
4G (e.g. I have one set with 16G). In this case, according to my understanding,
there is chance that the dom0 kernel needs to map some buffers above 4G to do
DMA operations (e.g. in snps,dwmac ethernet driver). However, most DMA engines
support only 32-bit physical address, thus aren't able to operate directly on
those memory. IIUC, swiotlb is implemented to solve this (using bounce buffer),
if there is no IOMMU or IOMMU is not enabled on the system. Sadly, it seems
that xen_swiotlb_map_page in my dom0 kernel allocates
(start_dma_addr = 0x944800000) the buffers for DMA above 4G which fails
dma_capable() checking and was then unable to return from xen_swiotlb_map_page()
successfully.

If I set dom0_mem to a small value (e.g. 512M), which makes all physical memory
of dom0 below 4G, everything goes fine.

I am not familiar with swiotlb-xen, so there would be misunderstanding about
the current situation. Fix me if I did/understood anything wrong.

Any ideas?

Cheers,

Chen Baozi

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-04-20 17:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 11:24 Question about DMA on 1:1 mapping dom0 of arm64 Chen Baozi
2015-04-17 13:21 ` Ian Campbell
2015-04-17 14:34   ` Stefano Stabellini
2015-04-17 14:46     ` Ian Campbell
2015-04-17 16:13       ` Stefano Stabellini
2015-04-17 16:31         ` Ian Campbell
2015-04-18  9:08         ` Chen Baozi
2015-04-18  9:23           ` Chen Baozi
2015-04-20  9:00             ` Ian Campbell
2015-04-20  9:58           ` Stefano Stabellini
2015-04-20 10:11             ` Ian Campbell
2015-04-20 10:38               ` Stefano Stabellini
2015-04-20 11:11                 ` Ian Campbell
2015-04-20 17:28                   ` Stefano Stabellini
2015-04-20 10:46             ` Chen Baozi
2015-04-17 16:41   ` Chen Baozi
2015-04-20  9:07     ` Ian Campbell
2015-04-17 14:32 ` Stefano Stabellini
2015-04-17 14:38   ` Ian Campbell
2015-04-18  6:56   ` Chen Baozi
2015-04-18  8:29   ` Chen Baozi

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.