You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/tests/qtest/libqos
Nabih Estefan 26b20dc207 tests/qtest: Avoid unaligned access in IGB test
../tests/qtest/libqos/igb.c:106:5: runtime error: load of misaligned address 0x562040be8e33 for type 'uint32_t', which requires 4 byte alignment

Instead of straight casting the uint8_t array, we can use ldl_le_p and
lduw_l_p to assure the unaligned access works properly against
uint32_t and uint16_t.

Signed-off-by: Nabih Estefan <nabihestefan@google.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250429155621.2028198-1-nabihestefan@google.com>
[AJB: fix commit message, remove unneeded casts]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20250603110204.838117-5-alex.bennee@linaro.org>
14 hours ago
..
aarch64-xlnx-zcu102-machine.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
ahci.c tests/qtest : Use `g_assert_cmphex` instead of `g_assert_cmpuint` 1 year ago
ahci.h qtest/libqos: Reduce size_to_prdtl() declaration scope 1 year ago
arm-imx25-pdk-machine.c tests/qtest/libqos: Reuse TYPE_IMX_I2C define 5 months ago
arm-raspi2-machine.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
arm-sabrelite-machine.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
arm-smdkc210-machine.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
arm-virt-machine.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
arm-xilinx-zynq-a9-machine.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
e1000e.c tests/qtest/libqos/e1000e: Export macreg functions 2 years ago
e1000e.h tests/qtest/libqos/e1000e: Export macreg functions 2 years ago
fw_cfg.c tests/qtest/libqos: add DMA support for writing and reading fw_cfg files 4 months ago
fw_cfg.h tests/qtest/libqos: add DMA support for writing and reading fw_cfg files 4 months ago
generic-pcihost.c qapi: Move include/qapi/qmp/ to include/qobject/ 4 months ago
generic-pcihost.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
i2c-imx.c tests/qtest/libqos: Reuse TYPE_IMX_I2C define 5 months ago
i2c-omap.c tests: move libqtest.h back under qtest/ 3 years ago
i2c.c tests: move libqtest.h back under qtest/ 3 years ago
i2c.h tests: move libqtest.h back under qtest/ 3 years ago
igb.c tests/qtest: Avoid unaligned access in IGB test 14 hours ago
libqos-malloc.c cleanup: Drop pointless return at end of function 1 month ago
libqos-malloc.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
libqos-pc.c meson: convert tests/qtest to meson 5 years ago
libqos-pc.h tests: add G_GNUC_PRINTF for various functions 2 years ago
libqos-spapr.c meson: convert tests/qtest to meson 5 years ago
libqos-spapr.h tests/qtest: Move common define from libqos-spapr.h to new ppc-util.h 12 months ago
libqos.c qapi: Move include/qapi/qmp/ to include/qobject/ 4 months ago
libqos.h tests/qtest: Move mkimg() and have_qemu_img() from libqos to libqtest 2 years ago
loongarch-virt-machine.c tests/libqos: Add loongarch virt machine node 1 year ago
malloc-pc.c Remove qemu-common.h include from most units 3 years ago
malloc-pc.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
malloc-spapr.c Remove qemu-common.h include from most units 3 years ago
malloc-spapr.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
meson.build hw/ipack: Clarify KConfig symbols 4 months ago
pci-pc.c qapi: Move include/qapi/qmp/ to include/qobject/ 4 months ago
pci-pc.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
pci-spapr.c tests/qtest/libqos/pci: Introduce pio_limit 3 years ago
pci-spapr.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
pci.c qtest/libqos/pci: Do not write to PBA memory 4 months ago
pci.h tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggable 3 years ago
ppc64_pseries-machine.c tests: move libqtest.h back under qtest/ 3 years ago
qgraph.c tests/: spelling fixes 2 years ago
qgraph.h tests/qtest: fix some copy and paste errors in kdoc 5 months ago
qgraph_internal.h tests/: spelling fixes 2 years ago
qos_external.c qapi: Move include/qapi/qmp/ to include/qobject/ 4 months ago
qos_external.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
riscv-iommu.c test/qtest: add riscv-iommu-pci tests 7 months ago
riscv-iommu.h qtest/riscv-iommu-test: add init queues test 7 months ago
riscv-virt-machine.c tests/libqos: add riscv/virt machine nodes 1 year ago
rtas.c tests: move libqtest.h back under qtest/ 3 years ago
rtas.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
sdhci-cmd.c tests: move libqtest.h back under qtest/ 3 years ago
sdhci-cmd.h tests/qtest/npcm7xx_sdhci: Access the card using its published address 11 months ago
sdhci.c tests: move libqtest.h back under qtest/ 3 years ago
sdhci.h meson: convert tests/qtest to meson 5 years ago
tpci200.c tests: move libqtest.h back under qtest/ 3 years ago
usb.c tests: move libqtest.h back under qtest/ 3 years ago
usb.h meson: convert tests/qtest to meson 5 years ago
vhost-user-blk.c tests: move libqtest.h back under qtest/ 3 years ago
vhost-user-blk.h test: new qTest case to test the vhost-user-blk-server 4 years ago
virtio-9p-client.c tests/9p: add 'Tsetattr' request to test client 1 month ago
virtio-9p-client.h tests/9p: add 'Tsetattr' request to test client 1 month ago
virtio-9p.c tests: add G_GNUC_PRINTF for various functions 2 years ago
virtio-9p.h tests/9pfs: make create/remove test dir public 5 years ago
virtio-balloon.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-balloon.h meson: convert tests/qtest to meson 5 years ago
virtio-blk.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-blk.h meson: convert tests/qtest to meson 5 years ago
virtio-gpio.c tests/: spelling fixes 2 years ago
virtio-gpio.h tests/qtest: enable tests for virtio-gpio 3 years ago
virtio-iommu.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-iommu.h tests: qtest: Add virtio-iommu test 4 years ago
virtio-mmio.c tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
virtio-mmio.h meson: convert tests/qtest to meson 5 years ago
virtio-net.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-net.h meson: convert tests/qtest to meson 5 years ago
virtio-pci-modern.c tests/qtest: don't attempt to clock_step while waiting for virtio ISR 4 months ago
virtio-pci-modern.h
virtio-pci.c tests/qtest: don't attempt to clock_step while waiting for virtio ISR 4 months ago
virtio-pci.h meson: convert tests/qtest to meson 5 years ago
virtio-rng.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-rng.h meson: convert tests/qtest to meson 5 years ago
virtio-scmi.c licenses: Remove SPDX tags not being license identifier for Linaro 4 months ago
virtio-scmi.h tests/qtest: enable tests for virtio-scmi 2 years ago
virtio-scsi.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-scsi.h meson: convert tests/qtest to meson 5 years ago
virtio-serial.c tests: move libqtest.h back under qtest/ 3 years ago
virtio-serial.h meson: convert tests/qtest to meson 5 years ago
virtio.c tests/qtest/libqos: Avoid double swapping when using modern virtio 4 weeks ago
virtio.h tests/qtest: libqos: Rename malloc.h to libqos-malloc.h 3 years ago
x86_64_pc-machine.c tests: move libqtest.h back under qtest/ 3 years ago