aboutsummaryrefslogtreecommitdiff
path: root/linux-user/sh4
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-11-14 12:20:24 +0100
committerJason Wang <jasowang@redhat.com>2017-11-20 11:08:00 +0800
commitc527e0afcd7d719abc3a5ca5e4c8ac2fe48b999f (patch)
treed682fd216c49d2de2bb1a37c423b9d6e3e0a5237 /linux-user/sh4
parent0dacea92d26c31d453c58de2e99c178fee554166 (diff)
hw/net/vmxnet3: Fix code to work on big endian hosts, too
Since commit ab06ec43577177a442e8 we test the vmxnet3 device in the pxe-tester, too (when running "make check SPEED=slow"). This now revealed that the code is not working there if the host is a big endian machine (for example ppc64 or s390x) - "make check SPEED=slow" is now failing on such hosts. The vmxnet3 code lacks endianness conversions in a couple of places. Interestingly, the bitfields in the structs in vmxnet3.h already tried to take care of the *bit* endianness of the C compilers - but the code missed to change the *byte* endianness when reading or writing the corresponding structs. So the bitfields are now wrapped into unions which allow to change the byte endianness during runtime with the non-bitfield member of the union. With these changes, "make check SPEED=slow" now properly works on big endian hosts, too. Reported-by: David Gibson <dgibson@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: David Gibson <dgibson@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'linux-user/sh4')
0 files changed, 0 insertions, 0 deletions