On Sun, 30 Nov 2014 17:09:50 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote:
> virtio 1.0 makes all memory structures LE, so > we need APIs to conditionally do a byteswap on BE > architectures. > > To make it easier to check code statically, > add virtio specific types for multi-byte integers > in memory. > > Add low level wrappers that do a byteswap conditionally, these will be > useful e.g. for vhost. Add high level wrappers that > query device endian-ness and act accordingly. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > --- > include/linux/virtio_byteorder.h | 59 > +++++++++++++++++++++++++++++++++++++++ > include/linux/virtio_config.h | 32 +++++++++++++++++++++ > include/uapi/linux/virtio_ring.h | 45 ++++++++++++++--------------- > include/uapi/linux/virtio_types.h | 46 ++++++++++++++++++++++++++++++ > include/uapi/linux/Kbuild | 1 + > 5 files changed, 161 insertions(+), 22 deletions(-) > create mode 100644 include/linux/virtio_byteorder.h > create mode 100644 include/uapi/linux/virtio_types.h Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/