WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] USB virt status --- Help please!!!


On 14 Nov 2005, at 10:12, harry wrote:

When running on Xen, just because Linux has allocated adjacent pages
from its 'physical' memory map, doesn't mean they really are physically
contiguous. For I/O we have to go to extra effort to really allocate
truly contiguous multi-page extents.

So your code is correct. If you can preallocate buffers then you could
do that with dma_alloc_coherent and that would guarantee contigous
buffers....

I'm given the buffers by the assorted USB drivers.  I could stage the
data using memcpy into my own buffer allocated using dma_alloc_coherent.
Or should I go through all the USB drivers and change the buffer
allocation?

Your first approach would be equivalent to just using swiotlb. But it is easy to implement and at least avoids 'use swiotlb=force' crashes. One possibility is to switch to having swiotlb default to 'on' and then need to force it off.

The second approach would never get past the kernel maintainers. This is a very xen-specific problem and the maintainers won't allow us to solve it by hacking at generic driver code.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel