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

[Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.