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

Re: [Xen-devel] Re: Drivers



> So I guess these are the specific ones to watch out for.  Is it safe for me to
> just remove each of the above (lance, cs89x0, floppy, etc) from the kernel
> configuration?  Also, lots of things include <asm/io.h> - is that safe?
> 
> Ian mentioned that it may be trivial to implement isa_virt_to_bus; if you do, 
> I
> have floppies to test it out on ;)

asm/io.h is in general safe, but the drivers that use isa_virt_to_bus
are *not*.

Implementing isa_virt_to_bus() is currently not possible -- the issue
is that ISA devices can only DMA to/from the lowest 16MB of physical
memory. In native Linux the ZONE_DMA allocator region contains
suitable memory -- drivers can allocate from there then program the
ISA DMA controller with addresses from isa_virt_to_bus().

On XenLinux the ZONE_DMA is filled with the lowest 16MB of
*pseudophysical* memory, not real physical. This means that
isa_virt_to_bus() on an address allocated with, e.g. the GFP_DMA flag,
is a nonsense. The resulting address is almost certainly above 16MB in
real physical memory -- also drivers will assume that buffers alloc'ed
with GFP_DMA are contiguous in real physical memory, but XenLinux does
not guarantee this.

So --- the drivers you list are basically non-starters for
XenLinux. The floppy driver can probably be salvaged, however. What
I'll do is customise floppy.h for Xen so that it always uses 'virtual
DMA' mode (basically PIO). It does this for memory >1MB by default
anyway, so that code path should be well tested and cause no
problems. 

 -- Keir

PS. We have a similar problem for any device that has a DMA limit !=
architectural physmem limit. We need to audit checks in the kernel
that they are doing the comparison of DMA buffers against the device
limit in real physical addresses, not pseudophysical.

We also probably need to add a list of unsupported devices to a README
or a FAQ.


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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