El 14/06/15 a les 14:05, Antti Kantee ha escrit:
On 14/06/15 11:54, Robert Millan wrote:

Thanks Antti. Here's the new patchset.

Almost there.  Still small nits:

 #ifdef RUMP_PCI_IOSPACE
-    pba.pba_flags |= PCI_FLAGS_IO_OKAY;
+#ifdef rumpcomp_pci_initiopl
+    error = rumpcomp_pci_initiopl();
+    if (error == 0) {
+        pba.pba_flags |= PCI_FLAGS_IO_OKAY;
+    } else {
+        aprint_error("pci: unable to raise I/O privilege level (error %d), direct 
I/O will be unavailable\n", error);
+    }
+#endif
 #endif

The print still doesn't match the call.  How do you know at that abstraction level that 
initiopl() will exactly "raise I/O privilege level"?

Well that's what "iopl" stands for! Perhaps we should pick another name? :-)

Btw, iopl() is a Linux-ism. An x86-ism even, IIRC. For example the FreeBSD/x86 way is 
open("/dev/io"). Maybe use something more generic like:

rumpcomp_pci_initio()

?

Also, do we still need RUMP_PCI_IOSPACE?  Or can we say that everything 
providing iospace access must now define rumpcomp_pci_initiopl?

A rumpcomp_pci_initiopl() dummy stub is cheap, seems reasonable to assume it's 
present.

--
--
Robert Millan

Reply via email to