qemu-e2k/hw/misc
Thomas Huth 51af0ec9fa hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
The "slow" ivshmem-tests currently fail when they are running on a
big endian host:

$ uname -m
ppc64
$ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/ivshmem-test -m slow
/x86_64/ivshmem/single: OK
/x86_64/ivshmem/hotplug: OK
/x86_64/ivshmem/memdev: OK
/x86_64/ivshmem/pair: OK
/x86_64/ivshmem/server-msi: qemu-system-x86_64:
 -device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID message
Broken pipe

The problem is that the server side code in ivshmem_server_send_one_msg()
correctly translates all messages IDs into little endian 64-bit values,
but the client side code in the ivshmem_recv_msg() function does not swap
the byte order back. Fix it by passing the value through le64_to_cpu().

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1504100343-26607-1-git-send-email-thuth@redhat.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-09-19 18:21:33 +02:00
..
macio
a9scu.c
applesmc.c Convert single line fprintf(.../n) to warn_report() 2017-09-19 14:09:34 +02:00
arm11scu.c
arm_integrator_debug.c
arm_l2x0.c
arm_sysctl.c
aspeed_scu.c
aspeed_sdmc.c Convert error_report() to warn_report() 2017-07-13 13:49:58 +02:00
auxbus.c auxbus: use get_uint() for "addr" property 2017-06-20 14:31:33 +02:00
bcm2835_mbox.c
bcm2835_property.c
bcm2835_rng.c
cbus.c
debugexit.c
eccmemctl.c
edu.c
exynos4210_clk.c
exynos4210_pmu.c
exynos4210_rng.c hw/misc: Add Exynos4210 Pseudo Random Number Generator 2017-07-11 11:21:26 +01:00
hyperv_testdev.c
imx6_ccm.c
imx6_src.c
imx25_ccm.c
imx31_ccm.c
imx_ccm.c
ivshmem.c hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems 2017-09-19 18:21:33 +02:00
Makefile.objs configure: Rename CONFIG_IVSHMEM to CONFIG_IVSHMEM_DEVICE 2017-07-20 14:56:20 +01:00
max111x.c vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
milkymist-hpdmc.c
milkymist-pfpu.c
mips_cmgcr.c mips_cmgcr: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
mips_cpc.c
mips_itu.c
mmio_interface.c mmio-interface: Mark as not user creatable 2017-08-15 17:42:02 +01:00
mps2-scc.c hw/mps2_scc: fix incorrect properties 2017-07-31 13:11:56 +01:00
mst_fpga.c
omap_clk.c
omap_gpmc.c
omap_l4.c
omap_sdrc.c
omap_tap.c
pc-testdev.c
pci-testdev.c
puv3_pm.c
pvpanic.c pvpanic: use get_uint() for "ioport" property 2017-06-20 14:31:33 +02:00
sga.c
slavio_misc.c
stm32f2xx_syscfg.c
tmp105.c
tmp105.h
tmp421.c
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
unimp.c
vmport.c
zynq_slcr.c
zynq-xadc.c