On 31/07/14 20:05, Robert Millan wrote: >> Now, since your rumpuser_io_init() is really only used by pci-userspace >> code, we don't have to make it part of the main rumpuser interface. You can >> add the interface to pci_user.h and then implement the counterpart in the >> pci-userspace repository. Please stop to consider at least for a few >> moments to make sure the interface is sufficiently, but not overly, generic. >> For example, is something like: >> >> rumpcomp_pci_init(int flags, int *caps) > > But the init function itself it quite bus-agnostic. What happens if something > outside of PCI also wants it?
You're right, but ... I think the same thing will happen as with bus_space/bus_dma being bundled as part of PCI support. Luckily, we can cross that hurdle when/if it pops up. In the hypothetical case where there is the need to introduce a similar call with a similar implementation for another bus, the worst thing that happens in code duplication, and not very many lines of that. Personally, I don't think the rumpuser interface should support I/O, and we're investigating pushing the remaining I/O functions out into driver-specific interfaces in hypercall rev 18: https://github.com/rumpkernel/buildrump.sh/issues/59 >> Better than just something with void? Then you could check caps and enable >> io space based on the value. > > I'm not sure what you mean by caps. Are you thinking about IOMMU, > authorization, etc? I probably was thinking that flags would be the "in" parameter and caps would be the "out" parameter. But I didn't think too much ... Sure, figuring out how iommu ties in with the interface(s) is another puzzle piece. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ rumpkernel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rumpkernel-users
