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/
Home Products Support Community News


Re: [Xen-devel] Re: Drivers

To: A Streetcar Named <desire@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: Drivers
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 14 Nov 2004 12:08:56 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 14 Nov 2004 12:41:57 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Sun, 14 Nov 2004 00:21:56 GMT." <loom.20041114T010605-989@xxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> 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

 -- 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

<Prev in Thread] Current Thread [Next in Thread>