Hi, This serie addresses the comments made on v5. The main goal is to share most of the code to support both the current legacy virtio and the yet to come 1.0 implementations.
The changes since the last post are: - introduce a per-device property to supersede the evil virtio_byteswap global - pass VirtIODevice to virtio memory accessors so they can use the per-device property - migration support - fix SCSI event endianness issue in virtio-scsi Thank you for your comments. --- Greg Greg Kurz (1): virtio-9p: use virtio wrappers to access headers Rusty Russell (7): virtio_legacy_get_byteswap: endian-ambivalent targets using legacy virtio virtio: allow byte swapping for vring and config access virtio-net: use virtio wrappers to access headers virtio-balloon: use virtio wrappers to access page frame numbers virtio-blk: use virtio wrappers to access headers virtio-scsi: use virtio wrappers to access headers virtio-serial-bus: use virtio wrappers to access headers hw/9pfs/virtio-9p-device.c | 3 + hw/block/virtio-blk.c | 40 ++++++----- hw/char/virtio-serial-bus.c | 39 ++++++---- hw/net/virtio-net.c | 17 +++-- hw/scsi/virtio-scsi.c | 38 +++++----- hw/virtio/virtio-balloon.c | 4 + hw/virtio/virtio.c | 98 +++++++++++++++----------- include/hw/virtio/virtio-access.h | 139 +++++++++++++++++++++++++++++++++++++ include/hw/virtio/virtio.h | 3 + stubs/Makefile.objs | 1 stubs/virtio_get_byteswap.c | 6 ++ 11 files changed, 288 insertions(+), 100 deletions(-) create mode 100644 include/hw/virtio/virtio-access.h create mode 100644 stubs/virtio_get_byteswap.c