Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] x86 swiotlb questions

To: "Keir Fraser" <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] x86 swiotlb questions
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 22 Dec 2006 16:20:28 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 22 Dec 2006 08:19:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
One more thing: Is it really necessary to restrict dma_alloc_coherent() to 
dma_bits?
I.e., couldn't we, once the bit-level page allocator is merged, use the real 
bit width
needed for the requesting device here? If not, this would then permit using the
original implementation of swiotlb_dma_supported() (as dma_alloc_coherent() then
no longer depends on dma_bits), and perhaps even auto-setting dma_bits based
on what memory we can get out of Xen in swiotlb_init(), making the mismatching 
of
command line options (between Xen and kernel) impossible (the kernel simply
wouldn't have one anymore).

As a nice side effect, using the original implementation of 
swiotlb_dma_supported()
would require slightly less tweaking of lib/swiotlb.c, hence slightly raising 
the
chances of the changes getting accepted into mainline. And clearly, if the 
kernel
manages to allocate the swiotlb at an address with less than dma_bits bits, 
there
seems to be no reason to refuse use of I/O devices that the actual buffer fits, 
but
dma_bits doesn't.

Jan

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