[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [PATCH 00/16] Totally strawman Linux v1.0 conversions.
From: Rusty Russell <rusty@rustcorp.com.au> Hi all, I mentioned I was playing with lguest (the tiny toy Linux x86 hypervisor) to see what the effect of the proposed endianness changes would be on real code. This patch series is the result; there are some cleanups along the way, but you get the idea. Notes: 1) Since LE conversions on x86 are a noop, the macros actually convert to BE. Obviously, that's wrong. 2) I converted in three stages: I - the virtio ring. II - the per-device config space. III - the per-device headers (just net for now). 3) GCC is reasonably good at folding multiple "if (legacy)" branches together, so I don't get too smart at that. 4) My plan would be to place explicit endian annotations for sparse checking, the virtio macros would force convert if in legacy mode. 5) No benchmarking has been done... we'd need qemu/kvm for that. And we'd obviously need some vhost changes to support it too. Feedback welcome, Rusty. Rusty Russell (16): virtio: use u32, not bitmap for struct virtio_device's features virtio: add support for 64 bit features. virtio: implement "v1.0" bit. NOTE: For testing on lgeust/x86, these are BE conversions, not LE conversions! virtio_ring: store mask, rather than calculating it based on num. virtio_ring: implement endian reversal based on VERSION_1 feature. lguest: switch on version1 bit. lguest: implement endian conversion macros. lguest: implement endian conversion for ring operations. virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: remove virtio_config_val virtio_config: endian conversion for v1.0. lguest: support v1 endian for per-device config. virtio_net: use v1.0 endian. lguest: support v1 endian for net device headers. drivers/block/virtio_blk.c | 77 +++++------- drivers/char/virtio_console.c | 17 +-- drivers/lguest/lguest_device.c | 16 +-- drivers/net/caif/caif_virtio.c | 23 ++-- drivers/net/virtio_net.c | 59 +++++---- drivers/remoteproc/remoteproc_virtio.c | 7 +- drivers/s390/kvm/kvm_virtio.c | 10 +- drivers/s390/kvm/virtio_ccw.c | 32 ++--- drivers/scsi/virtio_scsi.c | 12 +- drivers/virtio/virtio.c | 25 ++-- drivers/virtio/virtio_balloon.c | 10 +- drivers/virtio/virtio_mmio.c | 20 +-- drivers/virtio/virtio_pci.c | 8 +- drivers/virtio/virtio_ring.c | 218 +++++++++++++++++++++++---------- include/linux/virtio.h | 45 ++++++- include/linux/virtio_config.h | 172 +++++++++++++++++++++----- include/uapi/linux/virtio_config.h | 3 + net/9p/trans_virtio.c | 9 +- tools/lguest/lguest.c | 184 +++++++++++++++++++++++----- tools/virtio/linux/virtio.h | 22 +--- tools/virtio/linux/virtio_config.h | 2 +- tools/virtio/virtio_test.c | 5 +- tools/virtio/vringh_test.c | 16 +-- 23 files changed, 667 insertions(+), 325 deletions(-) -- 1.8.1.2
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]