aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2024-06-24tests/qtest/fuzz: fix memleak in qos_fuzz.cDmitry Frolov1-0/+1
Found with fuzzing for qemu-8.2, but also relevant for master Signed-off-by: Dmitry Frolov <frolov@swemel.ru> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexander Bulekov <alxndr@bu.edu> Message-ID: <20240521103106.119021-3-frolov@swemel.ru> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-21tests/migration-tests: Cover postcopy failure on reconnectPeter Xu1-18/+77
Make sure there will be an event for postcopy recovery, irrelevant of whether the reconnect will success, or when the failure happens. The added new case is to fail early in postcopy recovery, in which case it didn't even reach RECOVER stage on src (and in real life it'll be the same to dest, but the test case is just slightly more involved due to the dual socketpair setup). To do that, rename the postcopy_recovery_test_fail to reflect either stage to fail, instead of a boolean. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21tests/migration-tests: Verify postcopy-recover-setup statusPeter Xu1-0/+6
Making sure the postcopy-recover-setup status is present in the postcopy failure unit test. Note that it only applies to src QEMU not dest. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21tests/migration-tests: migration_event_wait()Peter Xu2-9/+24
Introduce a small helper to wait for a migration event, generalized from the incoming migration path. Make the helper easier to use by allowing it to keep waiting until the expected event is received. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21tests/migration-tests: Always enable migration eventsPeter Xu2-0/+8
Libvirt should always enable it, so it'll be nice qtest also cover that for all tests on both sides. migrate_incoming_qmp() used to enable it only on dst, now we enable them on both, as we'll start to sanity check events even on the src QEMU. We'll need to leave the one in migrate_incoming_qmp(), because virtio-net-failover test uses that one only, and it relies on the events to work. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21tests/migration-tests: Drop most WIN32 ifdefs for postcopy failure testsPeter Xu1-8/+2
Most of them are not needed, we can stick with one ifdef inside postcopy_recover_fail() so as to cover the scm right tricks only. The tests won't run on windows anyway due to has_uffd always false. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21tests/qtest/migration: Add a test for mapped-ram with passing of fdsFabiano Rosas1-3/+102
Add a multifd test for mapped-ram with passing of fds into QEMU. This is how libvirt will consume the feature. There are a couple of details to the fdset mechanism: - multifd needs two distinct file descriptors (not duplicated with dup()) so it can enable O_DIRECT only on the channels that do aligned IO. The dup() system call creates file descriptors that share status flags, of which O_DIRECT is one. - the open() access mode flags used for the fds passed into QEMU need to match the flags QEMU uses to open the file. Currently O_WRONLY for src and O_RDONLY for dst. Note that fdset code goes under _WIN32 because fd passing is not supported on Windows. Reviewed-by: Peter Xu <peterx@redhat.com> [brought back the qmp_remove_fd() call at the end of the tests] Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21tests/qtest/migration: Add tests for file migration with direct-ioFabiano Rosas3-0/+114
The tests are only allowed to run in systems that know about the O_DIRECT flag and in filesystems which support it. Note: this also brings back migrate_set_parameter_bool() which went away when we removed the compression tests. I copied it verbatim. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-21monitor: Stop removing non-duplicated fdsFabiano Rosas3-5/+94
monitor_fdsets_cleanup() currently has three responsibilities: 1- Remove the fds that have been marked for removal(->removed=true) by qmp_remove_fd(). This is overly complicated, but ok. 2- Remove any file descriptors that have been passed into QEMU and never duplicated[1,2]. A file descriptor without duplicates indicates that no part of QEMU has made use of it. This is problematic because the current implementation does it only if the guest is not running and the monitor is closed. 3- Remove/free fdsets that have become empty due to the above removals. This is ok. The scenario described in (2) is starting to show some cracks now that we're trying to consume fds from the migration code: - Doing cleanup every time the last monitor connection closes works to reap unused fds, but also has the side effect of forcing the management layer to pass the file descriptors again in case of a disconnect/re-connect, if that happened to be the only monitor connection. Another side effect is that removing an fd with qmp_remove_fd() is effectively delayed until the last monitor connection closes. The usage of mon_refcount is also problematic because it's racy. - Checking runstate_is_running() skips the cleanup unless the VM is running and avoids premature cleanup of the fds, but also has the side effect of blocking the legitimate removal of an fd via qmp_remove_fd() if the VM happens to be in another state. This affects qmp_remove_fd() and qmp_query_fdsets() in particular because requesting a removal at a bad time (guest stopped) might cause an fd to never be removed, or to be removed at a much later point in time, causing the query command to continue showing the supposedly removed fd/fdset. Note that file descriptors that *have* been duplicated are owned by the code that uses them and will be removed after qemu_close() is called. Therefore we've decided that the best course of action to avoid the undesired side-effects is to stop managing non-duplicated file descriptors. 1- efb87c1697 ("monitor: Clean up fd sets on monitor disconnect") 2- ebe52b592d ("monitor: Prevent removing fd from set during init") Reviewed-by: Peter Xu <peterx@redhat.com> [fix logic mistake: s/fdset_free/fdset_free_if_empty] Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-20tests/qtest/migration: Add a precopy file test with fdsetFabiano Rosas1-0/+44
Add a test for file migration using fdset. The passing of fds is more complex than using a file path. This is also the scenario where it's most important we ensure that the initial migration stream offset is respected because the fdset interface is the one used by the management layer when providing a non empty migration file. Note that fd passing is not available on Windows, so anything that uses add-fd needs to exclude that platform. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-20tests/qtest/migration: Fix file migration offset checkFabiano Rosas1-31/+48
When doing file migration, QEMU accepts an offset that should be skipped when writing the migration stream to the file. The purpose of the offset is to allow the management layer to put its own metadata at the start of the file. We have tests for this in migration-test, but only testing that the migration stream starts at the correct offset and not that it actually leaves the data intact. Unsurprisingly, there's been a bug in that area that the tests didn't catch. Fix the tests to write some data to the offset region and check that it's actually there after the migration. While here, switch to using g_get_file_contents() which is more portable than mmap(). Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-19hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimmPhilippe Mathieu-Daudé1-5/+4
PCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Update the comment in Avocado test_phybits_low_pse36(). Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20240617071118.60464-14-philmd@linaro.org>
2024-06-16test/avocado/machine_aspeed.py: Add AST2700 test caseJamin Lin1-0/+62
Add a test case to test Aspeed OpenBMC SDK v09.01 on AST2700 board. It loads u-boot-nodtb.bin, u-boot.dtb, tfa and optee-os images to dram first which base address is 0x400000000. Then, boot and launch 4 cpu cores. ``` qemu-system-aarch64 -machine ast2700-evb -device loader,force-raw=on,addr=0x400000000,file=workdir/u-boot-nodtb.bin \ -device loader,force-raw=on,addr=uboot_dtb_load_addr,file=workdir/u-boot.dtb\ -device loader,force-raw=on,addr=0x430000000,file=workdir/bl31.bin\ -device loader,force-raw=on,addr=0x430080000,file=workdir/optee/tee-raw.bin\ -device loader,cpu-num=0,addr=0x430000000 \ -device loader,cpu-num=1,addr=0x430000000 \ -device loader,cpu-num=2,addr=0x430000000 \ -device loader,cpu-num=3,addr=0x430000000 \ -smp 4 \ -drive file=workdir/image-bmc,format=raw,if=mtd ``` A test image is downloaded from the ASPEED Forked OpenBMC GitHub release repository : https://github.com/AspeedTech-BMC/openbmc/releases/ Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@kaod.org>
2024-06-14tests/migration-test: add uadk compression testShameer Kolothum1-0/+23
Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-14tests/migration-test: add qpl compression testYuan Liu1-0/+24
add qpl to compression method test for multifd migration the qpl compression supports software path and hardware path(IAA device), and the hardware path is used first by default. If the hardware path is unavailable, it will automatically fallback to the software path for testing. Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Reviewed-by: Nanhai Zou <nanhai.zou@intel.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-14tests/qtest/migration-test: Use custom asm bios for ppc64Nicholas Piggin6-32/+131
Similar to other archs, build a custom bios memory updater. Running the test with OF code is a cool trick, but SLOF takes a long time to boot. This reduces test time by around 3x (150s to 50s). Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-14tests/qtest/migration-test: Enable on ppc64 TCGNicholas Piggin1-13/+3
ppc64 with TCG seems to no longer be failing this test, perhaps since commit 03bfc2188f061 ("physmem: Fix migration dirty bitmap coherency with TCG memory access") which is not ppc specific but was seen to hit ppc64 quite easily. Let's enable it again. The s390x problem has been identified so mention it while we are adjusting the comment. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Prasad Pandit <pjp@fedoraproject.org> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-14tests/qtest/migration-test: Quieten ppc64 QEMU warningsNicholas Piggin1-1/+3
Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-14tests/qtest: Move common define from libqos-spapr.h to new ppc-util.hNicholas Piggin5-10/+22
The spapr QEMU machine defaults is useful outside libqos, so create a new header for ppc specific qtests and move it there. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-13Merge tag 'pull-request-2024-06-12' of https://gitlab.com/thuth/qemu into ↵Richard Henderson19-142/+517
staging * Fix loongarch64 avocado test * Make qtests more flexible with regards to non-available CPU models * Improvements for the test-smp-parse unit test # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmZpoEoRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbVF6g/+JYTRKmaIduQIP9g2+NkM+qMTbjI9Ow47 # 8Vdj/ePMXNWOZsgMPkCUdisYeMZEC+XMcDN1xvwZXwLTMTJRacZCSFRpeN4P0m0W # 6aQ28+tPNgx+B9Eh2kc4TpxbiqSH8u5u4GEN4Y07rcX/3YbYyjFgZD8orRu/nJ+H # 0wV7Riq9csi1BkLxrgKaHocFSOl4eOga4OFi+u4wIn/xoW3MN0laxe4iuoQRMZPf # gJLPRhEija4lto8iIKNxJbTABB0wEcWRWtgqcbHxdatqh1lPTPBpWxmdD/v1LJn+ # H/eO+oh05NQdlhw7+xfWF9PD+MpIePbZ28oNb3X3uURROTdcxpBAgpPipv07FsT4 # LmU2nIBQ4FcpDOkhLnLmBmFBNO6uDCzuGzxFRhX1SIiGMABqTDOKynBQSgQI2iB0 # 5J47XUwHtnOoCvf4SRA/MZG8zNSQZdJbnuOBLgZ+vsCG14mWM2NbfSUwRkH6pd/J # fEbODuzHZoYgUTxjR9+WMbINAbNjMy+SP2sGZIBzcAIIkybKynOy58LoCyNT684U # ean9bnc65908PJxEfsQ6k9kNwkK4GwOqZi+X383nVgMJ9+3dDw8M76IVU59hsq1n # wnz4VgFcRdXMYhj9zghaCgH2Ezw8gZHILXH+RlX0Bav4LQ5vSZQ6tRNwM4+rfXBe # okF1Sxmz31U= # =s7+V # -----END PGP SIGNATURE----- # gpg: Signature made Wed 12 Jun 2024 06:19:06 AM PDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] * tag 'pull-request-2024-06-12' of https://gitlab.com/thuth/qemu: tests/tcg/s390x: Allow specifying extra QEMU options on the command line tests/unit/test-smp-parse: Test the full 8-levels topology hierarchy tests/unit/test-smp-parse: Test "modules" and "dies" combination case tests/unit/test-smp-parse: Test "modules" parameter in -smp tests/unit/test-smp-parse: Make test cases aware of module level tests/unit/test-smp-parse: Use default parameters=0 when not set in -smp tests/unit/test-smp-parse: Fix an invalid topology case tests/unit/test-smp-parse: Fix comment of parameters=1 case tests/unit/test-smp-parse: Fix comments of drawers and books case test: Remove libibumad dependence meson: Remove libibumad dependence tests/qtest/x86: check for availability of older cpu models before running tests tests/qtest/libqtest: add qtest_has_cpu_model() api qtest/x86/numa-test: do not use the obsolete 'pentium' cpu tests/avocado: Update LoongArch bios file Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-12tests/tcg/s390x: Allow specifying extra QEMU options on the command lineIlya Leoshkevich1-1/+1
The use case for this is `make check-tcg EXTFLAGS="-accel kvm"`, which allows validating the system TCG testcases on real hardware. EXTFLAGS name is borrowed from tests/tcg/xtensa/Makefile.softmmu-target. While at it, use += instead of = in order to be consistent with the other architectures. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240522184116.35975-1-iii@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Test the full 8-levels topology hierarchyZhao Liu1-44/+85
With module level, QEMU now support 8-levels topology hierarchy. Cover "modules" in SMP_CONFIG_WITH_FULL_TOPO related cases. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-9-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Test "modules" and "dies" combination caseZhao Liu1-0/+103
Since i386 PC machine supports both "modules" and "dies" in -smp, add the "modules" and "dies" combination test case to match the actual topology usage scenario. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-8-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Test "modules" parameter in -smpZhao Liu1-9/+103
Cover the module cases in test-smp-parse. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-7-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Make test cases aware of module levelZhao Liu1-2/+11
Currently, -smp supports module level. It is necessary to consider the effects of module in the test cases to ensure that the calculations are correct. This is also the preparation to add module test cases. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-6-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Use default parameters=0 when not set in -smpZhao Liu1-4/+4
Since -smp allows parameters=1 whether the level is supported by machine, to avoid the test scenarios where the parameter defaults to 1 cause some errors to be masked, explicitly set undesired parameters to 0. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-5-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Fix an invalid topology caseZhao Liu1-1/+1
Adjust the "cpus" parameter to match the comment configuration. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-4-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Fix comment of parameters=1 caseZhao Liu1-1/+3
SMP_CONFIG_WITH_FULL_TOPO hasn't support module level, so the parameter should indicate the "clusters". Additionally, reorder the parameters of -smp to match the topology hierarchy order. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-3-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/unit/test-smp-parse: Fix comments of drawers and books caseZhao Liu1-4/+4
Fix the comments to match the actual configurations. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Message-ID: <20240529061925.350323-2-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12test: Remove libibumad dependencezhenwei pi12-12/+0
Remove libibumad dependence from the test environment. Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240611105427.61395-3-pizhenwei@bytedance.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/qtest/x86: check for availability of older cpu models before running testsAni Sinha1-62/+108
It is better to check if some older cpu models like 486, athlon, pentium, penryn, phenom, core2duo etc are available before running their corresponding tests. Some downstream distributions may no longer support these older cpu models. Signature of add_feature_test() has been modified to return void as FeatureTestArgs* was not used by the caller. One minor correction. Replaced 'phenom' with '486' in the test 'x86/cpuid/auto-level/phenom/arat' matching the cpu used. Signed-off-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240610155303.7933-4-anisinha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/qtest/libqtest: add qtest_has_cpu_model() apiAni Sinha2-0/+91
Added a new test api qtest_has_cpu_model() in order to check availability of some cpu models in the current QEMU binary. The specific architecture of the QEMU binary is selected using the QTEST_QEMU_BINARY environment variable. This api would be useful to run tests against some older cpu models after checking if QEMU actually supported these models. Signed-off-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240610155303.7933-3-anisinha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12qtest/x86/numa-test: do not use the obsolete 'pentium' cpuAni Sinha1-1/+2
'pentium' cpu is old and obsolete and should be avoided for running tests if its not strictly needed. Use 'max' cpu instead for generic non-cpu specific numa test. Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Mario Casquero <mcasquer@redhat.com> Signed-off-by: Ani Sinha <anisinha@redhat.com> Message-ID: <20240610155303.7933-2-anisinha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-12tests/avocado: Update LoongArch bios fileSong Gao1-4/+4
The VM uses old bios to boot up only 1 cpu, causing the test case to fail. Update the bios to solve this problem. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-ID: <20240604030058.2327145-1-gaosong@loongson.cn> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-10crypto/block: drop qcrypto_block_open() n_threads argumentStefan Hajnoczi1-4/+0
The n_threads argument is no longer used since the previous commit. Remove it. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20240527155851.892885-3-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-06-08Hexagon: add PC alignment check and exceptionMatheus Tavares Bernardino2-0/+109
The Hexagon Programmer's Reference Manual says that the exception 0x1e should be raised upon an unaligned program counter. Let's implement that and also add some tests. Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com> Reviewed-by: Brian Cain <bcain@quicinc.com> Message-Id: <277b7aeda2c717a96d4dde936b3ac77707cb6517.1714755107.git.quic_mathbern@quicinc.com> Signed-off-by: Brian Cain <bcain@quicinc.com>
2024-06-08Hexagon: fix HVX store newMatheus Tavares Bernardino1-0/+23
At 09a7e7db0f (Hexagon (target/hexagon) Remove uses of op_regs_generated.h.inc, 2024-03-06), we've changed the logic of check_new_value() to use the new pre-calculated packet->insn[...].dest_idx instead of calculating the index on the fly using opcode_reginfo[...]. The dest_idx index is calculated roughly like the following: for reg in iset[tag]["syntax"]: if reg.is_written(): dest_idx = regno break Thus, we take the first register that is writtable. Before that, however, we also used to follow an alphabetical order on the register type: 'd', 'e', 'x', and 'y'. No longer following that makes us select the wrong register index and the HVX store new instruction does not update the memory like expected. Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Reviewed-by: Brian Cain <bcain@quicinc.com> Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com> Message-Id: <f548dc1c240819c724245e887f29f918441e9125.1716220379.git.quic_mathbern@quicinc.com> Signed-off-by: Brian Cain <bcain@quicinc.com>
2024-06-06Merge tag 'pull-loongarch-20240606' of https://gitlab.com/gaosong/qemu into ↵Richard Henderson4-1/+169
staging pull-loongarch-20240606 # -----BEGIN PGP SIGNATURE----- # # iLMEAAEKAB0WIQS4/x2g0v3LLaCcbCxAov/yOSY+3wUCZmE0HwAKCRBAov/yOSY+ # 396sA/90m/zr91pLQlkhFuYLHg958Ow3L5ysblcuAAmcTXGi8iE9IeTTeZru6WEO # H/CL/njUkIgP+/Tio0n0Lx6rWkxOzGxWCpvzqrabsPGvs4GUtFEjI/2pvEWP6C9/ # S6Jon3py0oZeoVx8D6Tr/CJrhD0IBptbEn1aiQNDRuSzeuCo1Q== # =xpjH # -----END PGP SIGNATURE----- # gpg: Signature made Wed 05 Jun 2024 08:59:27 PM PDT # gpg: using RSA key B8FF1DA0D2FDCB2DA09C6C2C40A2FFF239263EDF # gpg: Good signature from "Song Gao <m17746591750@163.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B8FF 1DA0 D2FD CB2D A09C 6C2C 40A2 FFF2 3926 3EDF * tag 'pull-loongarch-20240606' of https://gitlab.com/gaosong/qemu: target/loongarch: fix a wrong print in cpu dump hw/loongarch/virt: Enable extioi virt extension hw/loongarch/virt: Use MemTxAttrs interface for misc ops hw/intc/loongarch_extioi: Add extioi virt extension definition tests/qtest: Add numa test for loongarch system tests/libqos: Add loongarch virt machine node Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-06tests/lcitool: generate package lists for ansibleAlex Bennée1-1/+15
With the new ability to output YAML we can build the package list for our ansible setup scripts. We will integrate them in the next commit. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-12-alex.bennee@linaro.org>
2024-06-06tests/lcitool: Install mingw-w64-tools for the Windows cross-buildsThomas Huth2-0/+2
Beside g++ we also need the mingw-w64-tools for properly building the code in qga/vss-win32/ , so let's install that package now, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240601070543.37786-5-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-11-alex.bennee@linaro.org>
2024-06-06tests/lcitool: Bump to latest libvirt-ci and update Fedora and Alpine versionThomas Huth6-9/+12
Update to the latest version of lcitool. It dropped support for Fedora 38 and Alpine 3.18, so we have to update these to newer versions here, too. Python 3.12 dropped the "imp" module which we still need for running Avocado. Fortunately Fedora 40 still ships with a work-around package that we can use until somebody updates our Avocado to a newer version. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240601070543.37786-3-thuth@redhat.com> [AJB: regen on rebase] Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-10-alex.bennee@linaro.org>
2024-06-06tests/lcitool: Delete obsolete centos-stream-8.yml fileThomas Huth1-3/+0
We've missed to delete this file when removing support for CentOS 8. Since the current upstream version of the lcitool removed support for CentOS 8 now, too, we have to remove the file before updating. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240601070543.37786-2-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-8-alex.bennee@linaro.org>
2024-06-06tests/vm: remove plain centos imageAlex Bennée2-52/+0
This isn't really used and we have lighter weight docker containers for testing this stuff directly. Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-5-alex.bennee@linaro.org>
2024-06-06tests/vm: update centos.aarch64 image to 9Alex Bennée1-5/+5
As Centos Stream 8 goes out of support we need to update. To do this powertools is replaced by crb and we don't over specify the python3 we want. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240603175328.3823123-4-alex.bennee@linaro.org>
2024-06-06tests/qtest: Add numa test for loongarch systemBibo Mao2-1/+54
Add numa test case for loongarch system, it passes to run with command "make check-qtest". Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Thomas Huth <thuth@redhat.com> Tested-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240528082155.938586-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2024-06-06tests/libqos: Add loongarch virt machine nodeBibo Mao2-0/+115
Add loongarch virt machine to the graph. It is a modified copy of the existing riscv virtmachine in riscv-virt-machine.c It contains a generic-pcihost controller, and an extra function loongarch_config_qpci_bus() to configure GPEX pci host controller information, such as ecam and pio_base addresses. Also hotplug handle checking about TYPE_VIRTIO_IOMMU_PCI device is added on loongarch virt machine, since virtio_mmu_pci device requires it. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240528082053.938564-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2024-06-05Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingRichard Henderson3-3/+3
* virtio-blk: remove SCSI passthrough functionality * require x86-64-v2 baseline ISA * SEV-SNP host support * fix xsave.flat with TCG * fixes for CPUID checks done by TCG # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmZgKVYUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroPKYgf/QkWrNXdjjD3yAsv5LbJFVTVyCYW3 # b4Iax29kEDy8k9wbzfLxOfIk9jXIjmbOMO5ZN9LFiHK6VJxbXslsMh6hm50M3xKe # 49X1Rvf9YuVA7KZX+dWkEuqLYI6Tlgj3HaCilYWfXrjyo6hY3CxzkPV/ChmaeYlV # Ad4Y8biifoUuuEK8OTeTlcDWLhOHlFXylG3AXqULsUsXp0XhWJ9juXQ60eATv/W4 # eCEH7CSmRhYFu2/rV+IrWFYMnskLRTk1OC1/m6yXGPKOzgnOcthuvQfiUgPkbR/d # llY6Ni5Aaf7+XX3S7Avcyvoq8jXzaaMzOrzL98rxYGDR1sYBYO+4h4ZToA== # =qQeP # -----END PGP SIGNATURE----- # gpg: Signature made Wed 05 Jun 2024 02:01:10 AM PDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (46 commits) hw/i386: Add support for loading BIOS using guest_memfd hw/i386/sev: Use guest_memfd for legacy ROMs memory: Introduce memory_region_init_ram_guest_memfd() i386/sev: Allow measured direct kernel boot on SNP i386/sev: Reorder struct declarations i386/sev: Extract build_kernel_loader_hashes i386/sev: Enable KVM_HC_MAP_GPA_RANGE hcall for SNP guests i386/kvm: Add KVM_EXIT_HYPERCALL handling for KVM_HC_MAP_GPA_RANGE i386/sev: Invoke launch_updata_data() for SNP class i386/sev: Invoke launch_updata_data() for SEV class hw/i386/sev: Add support to encrypt BIOS when SEV-SNP is enabled i386/sev: Add support for SNP CPUID validation i386/sev: Add support for populating OVMF metadata pages hw/i386/sev: Add function to get SEV metadata from OVMF header i386/sev: Set CPU state to protected once SNP guest payload is finalized i386/sev: Add handling to encrypt/finalize guest launch data i386/sev: Add the SNP launch start context i386/sev: Update query-sev QAPI format to handle SEV-SNP i386/sev: Add a class method to determine KVM VM type for SNP guests i386/sev: Don't return launch measurements for SEV-SNP guests ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-05docs, tests: do not specify scsi=offPaolo Bonzini3-3/+3
This has been the default forever. Acked-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-04Merge tag 'pull-nbd-2024-05-30-v2' of https://repo.or.cz/qemu/ericb into stagingRichard Henderson2-0/+222
NBD patches for 2024-05-30 - Fix AioContext assertion with NBD+TLS # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmZd0MYACgkQp6FrSiUn # Q2rrxwf8C+nhCy5d/d0DfBvDANEWB5zFGffC89t9P2ULJ6ehGlZuAyF8bCqnptPM # 76qhZfCz1XCUM0B+H+JXzcOsphTY5Y+hQ6Aq95VbuJgzq4CbAz4D30RNS0P5Q/ei # v1+goMTEegH1sSS6b0NueTj4chesMui3bJpiUnb3qPptZ+L0OWhIsk6Pe0N418UM # kmWC3kPWUPkmpxqXprcV/OunS6ipkfSVORfjxFNbFQcceuP45lt+f0YxhMHU8NIU # PwFiUaPPCy/mDFTHgqCmpqoivFroUyhQIFl5ucHmds2wTOTx9VpxunYNcrVCq6vY # UUfKc/p5lRArTqJXEth8cHlo1sFOEw== # =7ZGy # -----END PGP SIGNATURE----- # gpg: Signature made Mon 03 Jun 2024 09:18:46 AM CDT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] * tag 'pull-nbd-2024-05-30-v2' of https://repo.or.cz/qemu/ericb: iotests: test NBD+TLS+iothread qio: Inherit follow_coroutine_ctx across TLS Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-06-03iotests: test NBD+TLS+iothreadEric Blake2-0/+222
Prevent regressions when using NBD with TLS in the presence of iothreads, adding coverage the fix to qio channels made in the previous patch. The shell function pick_unused_port() was copied from nbdkit.git/tests/functions.sh.in, where it had all authors from Red Hat, agreeing to the resulting relicensing from 2-clause BSD to GPLv2. CC: qemu-stable@nongnu.org CC: "Richard W.M. Jones" <rjones@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-ID: <20240531180639.1392905-6-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>