On Thu, 2012-09-06 at 11:56 +0930, Rusty Russell wrote: > Excellent. I have applied and pushed this revision. > > I was tempted to ask for an explicit endian marker, as switching to > explicit little endian was high on the TODO list for virtio2. On the > other hand, we could say virtio2-pci config space is always > little-endian, and virtio-ccw config space is always big-endian. > > That covers the config endian, and and if we introduce a new ring > format, that endian debate can be separate.
I'm not too happy with having different endians for the transport. That somewhat relies on making sure "client" code always use the proper size-based accessors to any element in the config space, whether it's the common one or the device specific part. I've seen that assumption broken multiple times in the past (iirc, maybe I'm just mis-remembering here :-) I would think that it would be much better to define the endianness of the virtio config space once and for all regardless of the underlying transport. It's not like a few byteswaps on config accesses are going to hurt s390 performance... Cheers, Ben.