mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 20:19:44 +00:00
46f70ff148
After the call to virtio_vdev_has_feature(), we only care for legacy devices, so we don't need the extra check in virtio_is_big_endian(). Also the device_endian field is always set (VIRTIO_DEVICE_ENDIAN_UNKNOWN may only happen on a virtio_load() path that cannot lead here), so we don't need the assert() either. This open codes the device_endian checking in vhost_needs_vring_endian(). It also adds a comment to explain the logic, as recent reviews showed the cross-endian tweaks aren't that obvious. 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: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> |
||
---|---|---|
.. | ||
dataplane | ||
Makefile.objs | ||
vhost-backend.c | ||
vhost-user.c | ||
vhost.c | ||
virtio-balloon.c | ||
virtio-bus.c | ||
virtio-mmio.c | ||
virtio-pci.c | ||
virtio-pci.h | ||
virtio-rng.c | ||
virtio.c |