OSDN Git Service

dataplane: fix cross-endian issues
authorGreg Kurz <gkurz@linux.vnet.ibm.com>
Fri, 26 Jun 2015 07:32:28 +0000 (09:32 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Jul 2015 08:21:37 +0000 (11:21 +0300)
commitbe1e50a27d5b6845729ae0854f57f3816cf47edb
tree3b543a0e15befd1267d0c35278fb6fe5f8294ed3
parentf6e3035f75e5c6a73485335765ae070304c7a110
dataplane: fix cross-endian issues

Accesses to vring_avail_event and vring_used_event must honor the queue
endianness.

This patch allows cross-endian setups to use dataplane (tested with ppc64
on ppc64le, and vice-versa).

Suggested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/virtio/dataplane/vring.c