Re: [RFC] Small PCI core patch

Avi Kivity
2005-11-22T16:15:01Z

Jeff Garzik wrote:

>On Tue, Nov 22, 2005 at 05:46:41PM +0200, Avi Kivity wrote:
>
>
>>4) Write a translation layer (for xorg or the kernel) that can load
>>Windows drivers. Use binary translation for non-x86. Hope the APIs are
>>not patented.
>>
>>
>
>Give up all hope of ever diagnosing or fixing a crash.
>
>Welcome to Windows instability, circa 1995.
>
>
>
You exaggerate. Windows drivers work well enough in Windows (or so I
presume). One just has to implement the environment these drivers
expect, very carefully.

For the untrusting, options do remain:

- run the driver in userspace (if it's a xorg driver, in a separate
process) so that all outputs can be validated
- use binary translation even on x86 and validate all memory and I/O
accesses (like valgrind, but hopefully faster)

It's still possible for the driver to dma stuff where it shouldn't.
Maybe IOMMU games (where available) can help. But I seriously doubt it
will be that bad.