|
|
|
|
|
|
|
|
|
|
xen-users
RE: [Xen-users] Question on pseudo-physical memory
> > > Does this mean that a Domain0 Linux kernel driver which allocated > > kernel memory with kmalloc() or __get_free_pages() may not receive > > memory that is physically contiguous in the underlying real memory? > > Yep.
Is there, therefore, any way to guarantee that a kmalloc'ed (or similar) area is physically contiguous in machine memory? For example, if I need 8K (two pages) of physically continuous machine memory, how does a kernel device driver allocate this memory.
> > I ask because this could cause an issue for a device driver that > > must build scatter/gather lists for an external device. If this is > > true, is there documentation available on what's required to build a > > valid scatter/gather list which contains real physically contiguous > > segments? > > If your driver is using the DMA API properly as it should, this should > "just work", since the XenLinux DMA API implementations do the right > thing (e.g., using swiotlb for bouncing buffer which are not contigous > in machine memory).
Which "DMA API" are you referring to? I am writing a SCSI device driver which accepts a scatter-gather list from the SCSI midlayer uses the kernel dma_map_sg() service to map to (what the kernel believes are) real addresses. Under Xen, are these (pseudo-)physical addresses or machine addresses? My belief is that they are the former and may need another layer of translation to generate the real (machine) addresses.
Thanks for the help - Martin
With MSN Spaces email straight to your blog. Upload jokes, photos and more. It's free! It's free!
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|