Hi Zoltan,
On 2/12/26 5:19 PM, BALATON Zoltan wrote:
On Thu, 12 Feb 2026, Pierrick Bouvier wrote:
This simplifies code compared to having
virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1) or
!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1).
Signed-off-by: Pierrick Bouvier <[email protected]>
---
include/hw/virtio/virtio-access.h | 3 +--
include/hw/virtio/virtio.h | 12 +++++++++++-
hw/net/virtio-net.c | 2 +-
hw/virtio/vhost.c | 2 +-
hw/virtio/virtio-pci.c | 2 +-
hw/virtio/virtio.c | 16 ++++++++--------
6 files changed, 23 insertions(+), 14 deletions(-)
It's longer than before with two more functions to look up when reading
the code to understand it so I would not say it's simpler. Maybe more
readable for some but I don't think it adds much more clarity and so patch
could just be dropped. But I don't care so if others don't mind or think
it's better then I don't mind.
patches 1-2 helped me to reach patch 3 conclusion, which is the only one
that really matters in the end. Hopefully it will help reviewers to
reach the same conclusion.
If you and others are ok with it, we can just replace
virtio_access_is_big_endian with virtio_is_big_endian and call it a day
(even though I still think this is confusing regarding cpu ops having
the same name).
Regards,
BALATON Zoltan
Thanks,
Pierrick