Drivers
Do we have a list of drivers that have been validated to work in a Xen environment. Equally important would be the list of drivers that we know have some issues working in a Xen environment.
Thanks,
K. Y
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 3 lines
Do we have a list of drivers that have been validated to work in a Xen environment. Equally important would be the list of drivers that we know have some issues working in a Xen environment.
Pretty much all the drivers built into the current dom0 config have been booted on some machine and found to work.
There have been some reports of a strange issue involving the e100 driver and the debian startup scripts, but we haven't reproduced locally and there seems to be a good workaround. If someone sends us an oops message its probably trivial to fix.
I've actually been impressed (amazed!) at how few problems we've found with Linux drivers running over Xen. We're certainly rather stricter than what's possible to get away with on native x86, but I guess the ubiquity of PCI has meant that most popular drivers have been debugged on sparc/alpha/ia64/ppc and have had the bogus assumptions beaten out of them.
The only hardware drivers known to have problems are agpgart and drm. The patch directory contains a few patches that fix some obvious bugs, but more work is required. The xfree86 server VESA driver doesn't work due to it requiring support for vm86 mode. Stephan is looking into this.
The other driver that I know we have an issue with is the cisco linux-iscsi initiator on 2.4. There's a workaround by setting hacking the driver to set DISABLE_CLUSTERING. The 2.6 iscsi driver works fine.
Ian
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 2 lines · Ian Pratt
The only hardware drivers known to have problems are agpgart and drm.
And a bunch of old ISA drivers that need isa_virt_to_bus. Chances are the only one people will notice here is the floppy driver - but I haven't heard any complaints yet, so ;)
Signature · 11 lines
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan ------------------------------------------------------- This Newsletter Sponsored by: Macrovision For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
Quoted 8 lines · Ian Pratt
Quoted 3 lines
The only hardware drivers known to have problems are agpgart and drm.
And a bunch of old ISA drivers that need
isa_virt_to_bus. Chances are the only one people will notice here is the floppy driver - but I haven't heard any complaints yet, so ;)
Yes, good point. I guess this could cause problems for some older PCMCIA devices too.
However, since we now give dom0 a direct map of the bottom 1MB of memory (starting at PAGE_OFFSET) it may be trivial to implement isa_virt_to_bus e.g. as virt_to_phys as per normal i386.
Anyone still got a floppy drive to try this out on? ;-)
Ian
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
Quoted 9 lines
Quoted 8 lines · Ian Pratt
Quoted 3 lines
The only hardware drivers known to have problems are agpgart and drm.
And a bunch of old ISA drivers that need
isa_virt_to_bus. Chances are the only one people will notice here is the floppy driver - but I haven't heard any complaints yet, so ;)
Quoted 8 lines
Yes, good point. I guess this could cause problems for some older PCMCIA devices too.
However, since we now give dom0 a direct map of the bottom 1MB of memory (starting at
PAGE_OFFSET) it may be trivial to implementisa_virt_to_buse.g. asvirt_to_physas per normal i386.Anyone still got a floppy drive to try this out on? ;-)
The mapping of ISA space is actually in the fixmap region. Furthermore, it is only the lowest 1MB of memory -- but I think the isa_* macros can be used for the lowest 16MB.
-- Keir
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
Quoted 10 lines · Rik van Riel <riel <at> redhat.com> writes:
Quoted 2 lines · Ian Pratt
The only hardware drivers known to have problems are agpgart and drm.
And a bunch of old ISA drivers that need
isa_virt_to_bus. Chances are the only one people will notice here is the floppy driver - but I haven't heard any complaints yet, so ;)
I'm trying to compile a 2.6.9 dom0 kernel with 2.0 patches using a kernel configuration as close as possible to debian's 2.6.8-1-k7 kernel. Along the way, I get a lot of isa_virt_to_bus_is_UNSUPPORTED errors similar to the below:
CC [M] drivers/net/lance.odrivers/net/lance.c: In function `lance_probe1':drivers/net/lance.c:564: error: `isa_virt_to_bus_is_UNSUPPORTED' undeclared (fir st use in this function)drivers/net/lance.c:564: error: (Each undeclared identifier is reported only onc edrivers/net/lance.c:564: error: for each function it appears in.) drivers/net/lance.c: In function `lance_open':drivers/net/lance.c:780: error: `isa_virt_to_bus_is_UNSUPPORTED' undeclared (fir st use in this function)drivers/net/lance.c: In function `lance_init_ring':drivers/net/lance.c:875: error: `isa_virt_to_bus_is_UNSUPPORTED' undeclared (fir st use in this function)
So I guess that hits the problem that Rik mentioned above. I also had this problem for synclinc.c and floppy.h, so I rgrep'ed for isa_virt_to_bus in the kernel tree :
drivers/net/lance.cdrivers/net/cs89x0.cdrivers/net/ni65.cdrivers/net/3c505.cdrivers/net/3c515.cdrivers/net/3c527.cdrivers/char/esp.cdrivers/char/tpqic02.cdrivers/char/synclink.cdrivers/scsi/mca_53c9x.cdrivers/scsi/wd7000.cdrivers/scsi/ibmmca.cdrivers/scsi/aha1542.cdrivers/scsi/ultrastor.cdrivers/block/ps2esdi.cinclude/asm/io.hinclude/asm/floppy.hinclude/.asm-ignore/asm/io.hinclude/.asm-ignore/asm-i386/io.hinclude/asm-x86_64/io.hinclude/asm-x86_64/floppy.hinclude/asm-i386/io.hinclude/asm-i386/floppy.hinclude/asm-mips/io.hinclude/asm-arm/io.hinclude/asm-xen/asm/io.hinclude/asm-xen/asm-i386/io.h
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 ;)
-------------------------------------------------------
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
Quoted 7 lines
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