qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 5/6] vhost: simplify vhost_needs_vring_endian


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v4 5/6] vhost: simplify vhost_needs_vring_endian()
Date: Fri, 5 Feb 2016 12:39:20 +0100

On Fri, 05 Feb 2016 11:46:04 +0100
Greg Kurz <address@hidden> wrote:

> 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 <address@hidden>
> ---
>  hw/virtio/vhost.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Reviewed-by: Cornelia Huck <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]