qemu/tests/functional
Pierrick Bouvier 7bc86ccbb5 tests/functional: test device passthrough on aarch64
This test allows to document and exercise device passthrough, using a
nested virtual machine setup. Two disks are generated and passed to the
VM, and their content is compared to original images.

Guest and nested guests commands are executed through two scripts, and
init used in both system is configured to trigger a kernel panic in case
any command fails. This is more reliable and readable than executing all
commands through prompt injection and trying to guess what failed.

Initially, this test was supposed to test smmuv3 nested emulation
(combining both stages of translation), but I could not find any setup
(kernel + vmm) able to do the passthrough correctly, despite several
tries.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-id: 20250627200222.5172-1-pierrick.bouvier@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-07-01 17:22:31 +01:00
..
acpi-bits tests/functional: Convert the acpi-bits test into a standalone test 2024-09-04 11:14:33 +02:00
qemu_test tests/functional: Add hvf_available() helper 2025-07-01 17:22:27 +01:00
aspeed.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
meson.build tests/functional: test device passthrough on aarch64 2025-07-01 17:22:31 +01:00
replay_kernel.py tests/functional: Provide a proper name for the VMs in the replay tests 2025-02-26 07:43:25 +01:00
reverse_debugging.py tests/functional: Convert reverse_debugging tests to the functional framework 2025-04-23 07:51:25 +02:00
test_aarch64_aspeed_ast2700.py tests/function/aspeed: Add functional test for ast2700fc 2025-05-05 09:41:26 +02:00
test_aarch64_aspeed_ast2700fc.py tests/function/aspeed: Add functional test for ast2700fc 2025-05-05 09:41:26 +02:00
test_aarch64_device_passthrough.py tests/functional: test device passthrough on aarch64 2025-07-01 17:22:31 +01:00
test_aarch64_imx8mp_evk.py tests/functional: Require TCG to run Aarch64 imx8mp-evk test 2025-07-01 15:08:36 +01:00
test_aarch64_raspi3.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_aarch64_raspi4.py tests/functional: convert tests to new uncompress helper 2024-12-17 19:39:53 +01:00
test_aarch64_replay.py tests/functional: Use the tuxrun kernel for the aarch64 replay test 2025-04-23 07:51:25 +02:00
test_aarch64_reverse_debug.py tests/functional: Convert reverse_debugging tests to the functional framework 2025-04-23 07:51:25 +02:00
test_aarch64_rme_sbsaref.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_aarch64_rme_virt.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_aarch64_sbsaref.py tests/functional: Set sbsa-ref machine type in each test function 2025-07-01 15:08:35 +01:00
test_aarch64_sbsaref_alpine.py tests/functional: Set sbsa-ref machine type in each test function 2025-07-01 15:08:35 +01:00
test_aarch64_sbsaref_freebsd.py tests/functional: Set sbsa-ref machine type in each test function 2025-07-01 15:08:35 +01:00
test_aarch64_smmu.py tests/functional: Expand Aarch64 SMMU tests to run on HVF accelerator 2025-07-01 17:22:31 +01:00
test_aarch64_tcg_plugins.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_aarch64_tuxrun.py tests/functional: update the aarch64 tuxrun tests 2024-11-25 10:27:02 +00:00
test_aarch64_virt.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_aarch64_virt_gpu.py tests/functional/test_aarch64_virt_gpu: Skip if "dbus" display isn't available 2025-03-27 08:59:35 +01:00
test_aarch64_xen.py tests/functional: Restrict nested Aarch64 Xen test to TCG 2025-07-01 15:08:35 +01:00
test_aarch64_xlnx_versal.py tests/functional: Convert the xlnx_versal_virt avocado test 2024-12-11 09:18:39 +01:00
test_acpi_bits.py tests/functional: remove all class level fields 2025-03-19 07:41:32 +01:00
test_alpha_clipper.py tests/functional: convert tests to new uncompress helper 2024-12-17 19:39:53 +01:00
test_alpha_replay.py tests/functional: Convert the alpha replay avocado tests 2025-02-26 07:43:25 +01:00
test_arm_aspeed_ast1030.py tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030 2025-05-05 09:38:55 +02:00
test_arm_aspeed_ast2500.py tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 2025-05-05 09:38:55 +02:00
test_arm_aspeed_ast2600.py tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600 2025-05-05 09:38:55 +02:00
test_arm_aspeed_bletchley.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_arm_aspeed_palmetto.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_arm_aspeed_rainier.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_arm_aspeed_romulus.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_arm_aspeed_witherspoon.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_arm_bflt.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_arm_bpim2u.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_arm_canona1100.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_arm_collie.py tests/functional: remove many unused imports 2024-12-17 19:39:53 +01:00
test_arm_cubieboard.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_arm_emcraft_sf2.py tests/functional: switch over to using self.scratch_file() 2024-12-17 19:39:53 +01:00
test_arm_integratorcp.py tests/functional: Skip the screendump tests if the command is not available 2025-05-14 11:50:42 +02:00
test_arm_microbit.py tests/functional: Add a test for the arm microbit machine 2025-01-28 18:40:19 +00:00
test_arm_orangepi.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_arm_quanta_gsj.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_arm_raspi2.py tests/functional: convert tests to new uncompress helper 2024-12-17 19:39:53 +01:00
test_arm_realview.py tests/functional: Add a test for the realview-eb-mpcore machine 2025-06-12 15:50:17 +01:00
test_arm_replay.py tests/functional: Convert the arm replay avocado tests 2025-02-26 07:43:25 +01:00
test_arm_smdkc210.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_arm_stellaris.py tests/functional: Add a test for the Stellaris arm machines 2025-05-29 17:45:12 +01:00
test_arm_sx1.py tests/functional/test_arm_sx1: Check whether the serial console is working 2025-03-07 10:08:19 +00:00
test_arm_tuxrun.py tests/functional: update the arm tuxrun tests 2025-01-10 11:16:47 +00:00
test_arm_vexpress.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_arm_virt.py tests/functional: Convert the arm virt avocado test 2024-12-17 20:29:03 +01:00
test_avr_mega2560.py tests/functional: Speed up the avr_mega2560 test 2025-06-11 12:17:57 +02:00
test_avr_uno.py tests/functional: Add a test for the Arduino UNO machine 2025-06-10 12:59:09 +02:00
test_cpu_queries.py tests/functional: Convert simple avocado tests into standalone python tests 2024-09-04 10:52:29 +02:00
test_empty_cpu_model.py tests/functional: Convert simple avocado tests into standalone python tests 2024-09-04 10:52:29 +02:00
test_hppa_seabios.py tests/functional: Use -no-shutdown in the hppa_seabios test 2025-05-08 15:38:40 -04:00
test_i386_replay.py tests/functional: Convert the i386 replay avocado test 2025-04-23 07:51:25 +02:00
test_i386_tuxrun.py tests/functional: update the i386 tuxrun tests 2025-01-10 11:16:52 +00:00
test_info_usernet.py tests/functional: Add a helper function for retrieving the hostfwd port 2024-12-17 20:33:29 +01:00
test_intel_iommu.py tests/functional: Move the code for testing HTTP downloads to a common function 2025-03-07 07:50:19 +01:00
test_linux_initrd.py tests/functional: switch to new test skip decorators 2024-12-17 19:39:53 +01:00
test_loongarch64_virt.py tests/functional: Fix the running test case causes loongarch64 to hang 2024-11-27 09:17:15 +01:00
test_m68k_mcf5208evb.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_m68k_nextcube.py tests/functional: Skip the screendump tests if the command is not available 2025-05-14 11:50:42 +02:00
test_m68k_q800.py tests/functional: use 'none' audio driver for q800 tests 2025-05-25 11:28:28 +02:00
test_m68k_replay.py tests/functional: use 'none' audio driver for q800 tests 2025-05-25 11:28:28 +02:00
test_m68k_tuxrun.py tests/functional: add a m68k tuxrun tests 2025-01-10 11:16:59 +00:00
test_mem_addr_space.py tests/functional/test_mem_addr_space: Use set_machine() to select the machine 2025-05-30 09:52:08 +02:00
test_memlock.py tests/functional: add memlock tests 2025-06-11 12:17:57 +02:00
test_microblaze_replay.py tests/functional: Convert the microblaze replay avocado tests 2025-02-26 07:43:25 +01:00
test_microblaze_s3adsp1800.py tests/functional: Test both microblaze s3adsp1800 endianness variants 2025-05-30 09:52:08 +02:00
test_microblazeel_s3adsp1800.py tests/functional: Test both microblaze s3adsp1800 endianness variants 2025-05-30 09:52:08 +02:00
test_migration.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_mips64_malta.py tests/functional: Convert the 64-bit big endian Wheezy mips test 2025-04-23 07:51:25 +02:00
test_mips64_tuxrun.py tests/functional: update the mips64 tuxrun tests 2025-01-10 11:17:14 +00:00
test_mips64el_fuloong2e.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_mips64el_loongson3v.py tests/functional: switch to new test skip decorators 2024-12-17 19:39:53 +01:00
test_mips64el_malta.py tests/functional: Skip the screendump tests if the command is not available 2025-05-14 11:50:42 +02:00
test_mips64el_replay.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_mips64el_tuxrun.py tests/functional: update the mips64el tuxrun tests 2025-01-10 11:17:19 +00:00
test_mips_malta.py tests/functional/test_mips_malta: Re-enable the check for the PCI host bridge 2025-05-30 09:52:08 +02:00
test_mips_replay.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_mips_tuxrun.py tests/functional: update the mips32 tuxrun tests 2025-01-10 11:17:03 +00:00
test_mipsel_malta.py tests/functional: Convert the 32-bit little endian Wheezy mips test 2025-04-23 07:51:25 +02:00
test_mipsel_replay.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_mipsel_tuxrun.py tests/functional: update the mips32el tuxrun tests 2025-01-10 11:17:10 +00:00
test_multiprocess.py tests/functional: Convert the multiprocess avocado test into a standalone test 2024-09-11 09:49:12 +02:00
test_netdev_ethtool.py tests/functional: Correct typo in test_netdev_ethtool.py SPDX tag 2024-09-20 10:11:59 +03:00
test_or1k_replay.py tests/functional: Convert the or1k replay avocado tests 2025-02-26 07:43:25 +01:00
test_or1k_sim.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_pc_cpu_hotplug_props.py tests/functional/test_pc_cpu_hotplug_props: Set 'pc' machine type explicitly 2025-06-25 16:56:25 +02:00
test_ppc64_e500.py tests/functional: Require 'user' netdev for ppc64 e500 test 2025-03-12 18:15:30 +01:00
test_ppc64_hv.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_ppc64_mac99.py tests/functional: Add a ppc64 mac99 test 2025-01-30 10:38:51 +01:00
test_ppc64_powernv.py tests/functional: Convert the powernv tests from boot_linux_console.py 2024-09-24 13:45:06 +02:00
test_ppc64_pseries.py tests/functional/test_ppc64_pseries: Skip test_ppc64_linux_smt_boot if necessary 2025-04-30 20:44:20 +02:00
test_ppc64_replay.py tests/functional/test_ppc64_replay: Mark the e500 test as flaky 2025-03-27 08:59:35 +01:00
test_ppc64_reverse_debug.py tests/functional: Convert reverse_debugging tests to the functional framework 2025-04-23 07:51:25 +02:00
test_ppc64_tuxrun.py tests/functional: reduce tuxrun maxmem to work on 32-bit hosts 2025-03-06 08:10:04 +01:00
test_ppc_40p.py tests/functional: Extend PPC 40p test with Linux boot 2025-01-30 10:39:37 +01:00
test_ppc_74xx.py tests/functional: Convert avocado tests that just need a small adjustment 2024-09-04 10:52:29 +02:00
test_ppc_amiga.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_ppc_bamboo.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_ppc_mac.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_ppc_mpc8544ds.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_ppc_replay.py tests/functional: Convert the 32-bit ppc replay avocado tests 2025-02-26 07:43:25 +01:00
test_ppc_sam460ex.py tests/functional: Add a ppc sam460ex test 2025-02-11 13:27:07 +01:00
test_ppc_tuxrun.py tests/functional: update the ppc32 tuxrun tests 2025-01-10 11:17:22 +00:00
test_ppc_virtex_ml507.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_riscv32_tuxrun.py tests/functional: update the riscv32 tuxrun tests 2025-01-10 11:17:37 +00:00
test_riscv64_tuxrun.py tests/functional: update the riscv64 tuxrun tests 2025-01-10 11:17:41 +00:00
test_riscv_opensbi.py tests/functional: Convert the riscv_opensbi avocado test into a standalone test 2024-11-08 06:13:34 +01:00
test_rx_gdbsim.py tests/functional/test_rx_gdbsim: Use stable URL for test_linux_sash 2025-01-02 08:58:08 +01:00
test_s390x_ccw_virtio.py tests/functional: convert tests to new uncompress helper 2024-12-17 19:39:53 +01:00
test_s390x_replay.py tests/functional: Convert the s390x replay avocado tests 2025-02-26 07:43:25 +01:00
test_s390x_topology.py tests/functional: Remove semicolons at the end of lines 2025-04-23 07:51:25 +02:00
test_s390x_tuxrun.py tests/functional/test_s390x_tuxrun: Check whether the machine is available 2025-05-14 11:50:42 +02:00
test_sh4_r2d.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_sh4_tuxrun.py tests/functional: remove unused system imports 2024-12-11 09:18:39 +01:00
test_sh4eb_r2d.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_sparc64_sun4u.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_sparc64_tuxrun.py tests/functional/test_sparc64_tuxrun: Explicitly set the 'sun4u' machine 2025-05-30 09:52:08 +02:00
test_sparc_replay.py tests/functional: Convert the sparc replay avocado test 2025-02-26 07:43:25 +01:00
test_sparc_sun4m.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_version.py tests/functional: Convert avocado tests that just need a small adjustment 2024-09-04 10:52:29 +02:00
test_virtio_balloon.py tests/functional/test_virtio_balloon: Only use KVM for running this test 2025-03-07 09:24:00 +01:00
test_virtio_gpu.py tests/functional: switch over to using self.build_file(...) 2024-12-17 19:39:53 +01:00
test_virtio_version.py tests/functional: remove unused system imports 2024-12-11 09:18:39 +01:00
test_vnc.py tests/functional: Use the 'none' machine for the VNC test 2025-06-11 12:17:17 +02:00
test_x86_64_hotplug_blk.py tests/functional: Convert the hotplug_blk avocado test 2025-02-10 19:54:15 +01:00
test_x86_64_hotplug_cpu.py tests/functional/test_x86_64_hotplug_cpu: Fix race condition during unplug 2025-01-07 15:02:46 +01:00
test_x86_64_kvm_xen.py tests/functional: Remove unnecessary import statements 2025-04-23 07:51:25 +02:00
test_x86_64_replay.py tests/functional: Use the tuxrun kernel for the x86 replay test 2025-04-23 07:51:25 +02:00
test_x86_64_reverse_debug.py tests/functional: Convert reverse_debugging tests to the functional framework 2025-04-23 07:51:25 +02:00
test_x86_64_tuxrun.py tests/functional: update the x86_64 tuxrun tests 2025-01-10 11:17:52 +00:00
test_x86_cpu_model_versions.py tests/functional: Convert the x86_cpu_model_versions test 2024-09-04 11:14:33 +02:00
test_xtensa_lx60.py tests/functional: convert tests to new archive_extract helper 2024-12-17 19:39:53 +01:00
test_xtensa_replay.py tests/functional: Convert the xtensa replay test to the functional framework 2025-02-26 07:43:25 +01:00