OSDN Git Service

vhost: set vring endianness for legacy virtio
authorGreg Kurz <gkurz@linux.vnet.ibm.com>
Wed, 17 Jun 2015 13:23:39 +0000 (15:23 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 17 Jun 2015 15:12:54 +0000 (17:12 +0200)
commit04b7a1523d65bb5c78832098cf3108a1aadcaf8a
treeffcd7a89ade77fd5603e0c3390d18822cd83409f
parent41d283bdab08868a244b9c19dce507fdf15a8990
vhost: set vring endianness for legacy virtio

Legacy virtio is native endian: if the guest and host endianness differ,
we have to tell vhost so it can swap bytes where appropriate. This is
done through a vhost ring ioctl.

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>
hw/virtio/vhost.c