On (Mon) Mar 22 2010 [14:16:32], Michael S. Tsirkin wrote: > > > > I can't certainly predict how many ports might be needed, but I think > > > > we'll have other ways of communication if we need > 200 ports. > > > > > > If, say, 32 bytes are sufficient, let's just reserve a fixed size > > > array and everything will be simpler? > > > > Yes, 32 bytes means 256 ports. Should be OK; if not, one could add more > > such devices and get more ports. But if I have to choose between fixing > > the number of ports in the config space vs using the control queue for > > the bitmap, I'll go for the latter. That's assuming we really really > > don't want to use the config space for storing the bitmap. > > I guess with control queue we also simply use message per port > state change - would that be simpler than a bitmap? Yes, that's how hot-unplug is done currently (before this patchset). I'll cook up a similar version like you suggest for adding ports as well. > > > > > > + port_bit = ffs(*map); > > > > > > + port_bit--; /* ffs returns bit location */ > > simple u32 port_bit = ffs(*map) - 1; not clear enough? Well yeah; I'll just open-code it. Amit -- http://log.amitshah.net/ _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization