aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-06-14tests/qtest/migration-test: Quieten ppc64 QEMU warningsNicholas Piggin
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 Piggin
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 Henderson
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 Leoshkevich
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 Liu
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 Liu
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 Liu
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 Liu
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 Liu
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 Liu
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 Liu
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 Liu
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 pi
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 Sinha
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 Sinha
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 Sinha
'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 Gao
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 Hajnoczi
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 Bernardino
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 Bernardino
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 Henderson
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ée
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 Huth
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 Huth
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 Huth
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ée
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ée
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 Mao
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 Mao
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 Henderson
* 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 Bonzini
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 Henderson
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 Blake
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>
2024-05-30tests/avocado: update sbsa-ref firmwareMarcin Juszkiewicz
Partial support for NUMA setup: - cpu nodes - memory nodes Used versions: - Trusted Firmware v2.11.0 - Tianocore EDK2 stable202405 - Tianocore EDK2 Platforms code commit 4bbd0ed Firmware is built using Debian 'bookworm' cross toolchain (gcc 12.2.0). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-05-29fuzz: specify audiodev for usb-audioAlexander Bulekov
Fixes test-failure on Fedora 40 CI. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240527040711.311865-1-alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-05-29tests/tcg/s390x: Add per.SRichard Henderson
Add a small test to avoid regressions. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Tested-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-ID: <20240502054417.234340-15-richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-05-28iotests/pylintrc: allow up to 10 similar linesVladimir Sementsov-Ogievskiy
We want to have similar QMP objects in different tests. Reworking these objects to make common parts by calling some helper functions doesn't seem good. It's a lot more comfortable to see the whole QAPI request in one place. So, let's increase the limit, to unblock further commit "iotests: add backup-discard-source" Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
2024-05-28iotests: add backup-discard-sourceVladimir Sementsov-Ogievskiy
Add test for a new backup option: discard-source. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Fiona Ebner <f.ebner@proxmox.com> Message-Id: <20240313152822.626493-6-vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
2024-05-28block/copy-before-write: create block_copy bitmap in filter nodeVladimir Sementsov-Ogievskiy
Currently block_copy creates copy_bitmap in source node. But that is in bad relation with .independent_close=true of copy-before-write filter: source node may be detached and removed before .bdrv_close() handler called, which should call block_copy_state_free(), which in turn should remove copy_bitmap. That's all not ideal: it would be better if internal bitmap of block-copy object is not attached to any node. But that is not possible now. The simplest solution is just create copy_bitmap in filter node, where anyway two other bitmaps are created. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Fiona Ebner <f.ebner@proxmox.com> Message-Id: <20240313152822.626493-4-vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
2024-05-26Merge tag 'pull-lu-20240526' of https://gitlab.com/rth7680/qemu into stagingRichard Henderson
target/i386: Introduce X86Access and use for xsave and friends linux-user/i386: Fix allocation and alignment of fp state in signal frame # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmZT2GwdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV87pQf9F/cmrKQG1mVWKmJd # MI7l63lbxejdgAADv1nmro+oapCsJSaQeUSrYp904ydqJjVfBJkaoXfknGsvxrNA # oW7nEuYt0sBKdaBUKhYpMOJ3ivfw7lVVMJmjNv9ngZRhW+WOoJrBHoleUkVLiM7D # rxkMLL+LQ7BR9i0Lv1unorOkqUPGNOnEd45qRn6k1g/Qnqi8SNMzxFwO8+232u8m # EG9un/oh4mKPyb5vSg3Y4JLg+yDKCRScBqBU1wcKFe1u+umBkv2BNcU+k62AJh1q # bv8i1n+X/dFAd1aj0NEupi04EOZIof5m3T4YIWg7M4I94NiFWNZ18vgskkmiO+Mo # 0KPd/A== # =sYrE # -----END PGP SIGNATURE----- # gpg: Signature made Sun 26 May 2024 05:48:44 PM PDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-lu-20240526' of https://gitlab.com/rth7680/qemu: (28 commits) target/i386: Pass host pointer and size to cpu_x86_{xsave,xrstor} target/i386: Pass host pointer and size to cpu_x86_{fxsave,fxrstor} target/i386: Pass host pointer and size to cpu_x86_{fsave,frstor} target/i386: Convert do_xrstor to X86Access target/i386: Convert do_xsave to X86Access linux-user/i386: Honor xfeatures in xrstor_sigcontext linux-user/i386: Fix allocation and alignment of fp state linux-user/i386: Return boolean success from xrstor_sigcontext linux-user/i386: Return boolean success from restore_sigcontext linux-user/i386: Fix -mregparm=3 for signal delivery linux-user/i386: Split out struct target_fregs_state linux-user/i386: Replace target_fpstate_fxsave with X86LegacyXSaveArea linux-user/i386: Remove xfeatures from target_fpstate_fxsave linux-user/i386: Drop xfeatures_size from sigcontext arithmetic target/i386: Add {hw,sw}_reserved to X86LegacyXSaveArea target/i386: Add rbfm argument to cpu_x86_{xsave,xrstor} target/i386: Split out do_xsave_chk target/i386: Convert do_xrstor_* to X86Access target/i386: Convert do_xsave_* to X86Access tagret/i386: Convert do_fxsave, do_fxrstor to X86Access ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-05-26linux-user/i386: Fix allocation and alignment of fp stateRichard Henderson
For modern cpus, the kernel uses xsave to store all extra cpu state across the signal handler. For xsave/xrstor to work, the pointer must be 64 byte aligned. Moreover, the regular part of the signal frame must be 16 byte aligned. Attempt to mirror the kernel code as much as possible. Use enum FPStateKind instead of use_xsave() and use_fxsr(). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1648 Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-05-25meson: remove unnecessary dependencyPaolo Bonzini
The dbus_display1_dep is not really used since all occurrences also request gio independently. Just list the generated sources and drop dbus_display1_dep. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-23Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingRichard Henderson
* hw/i386/pc_sysfw: Alias rather than copy isa-bios region * target/i386: add control bits support for LAM * target/i386: tweaks to new translator * target/i386: add support for LAM in CPUID enumeration * hw/i386/pc: Support smp.modules for x86 PC machine * target-i386: hyper-v: Correct kvm_hv_handle_exit return value # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmZOMlAUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNTSwf8DOPgipepNcsxUQoV9nOBfNXqEWa6 # DilQGwuu/3eMSPITUCGKVrtLR5azwCwvNfYYErVBPVIhjImnk3XHwfKpH1csadgq # 7Np8WGjAyKEIP/yC/K1VwsanFHv3hmC6jfcO3ZnsnlmbHsRINbvU9uMlFuiQkKJG # lP/dSUcTVhwLT6eFr9DVDUnq4Nh7j3saY85pZUoDclobpeRLaEAYrawha1/0uQpc # g7MZYsxT3sg9PIHlM+flpRvJNPz/ZDBdj4raN1xo4q0ET0KRLni6oEOVs5GpTY1R # t4O8a/IYkxeI15K9U7i0HwYI2wVwKZbHgp9XPMYVZFJdKBGT8bnF56pV9A== # =lp7q # -----END PGP SIGNATURE----- # gpg: Signature made Wed 22 May 2024 10:58:40 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: (23 commits) target-i386: hyper-v: Correct kvm_hv_handle_exit return value i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14] i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[4] i386: Add cache topology info in CPUCacheInfo hw/i386/pc: Support smp.modules for x86 PC machine tests: Add test case of APIC ID for module level parsing i386/cpu: Introduce module-id to X86CPU i386: Support module_id in X86CPUTopoIDs i386: Expose module level in CPUID[0x1F] i386: Support modules_per_die in X86CPUTopoInfo i386: Introduce module level cpu topology to CPUX86State i386/cpu: Decouple CPUID[0x1F] subleaf with specific topology level i386: Split topology types of CPUID[0x1F] from the definitions of CPUID[0xB] i386/cpu: Introduce bitmap to cache available CPU topology levels i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid() i386/cpu: Use APIC ID info get NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14] i386/cpu: Use APIC ID info to encode cache topo in CPUID[4] i386/cpu: Fix i/d-cache topology to core level for Intel CPU target/i386: add control bits support for LAM target/i386: add support for LAM in CPUID enumeration ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-05-22tests/qtest/migration-test: Fix the check for a successful run of ↵Thomas Huth
analyze-migration.py If analyze-migration.py cannot be run or crashes, the error is currently ignored since the code only checks for nonzero values in case the child exited properly. For example, if you run the test with a non-existing Python interpreter, it still succeeds: $ PYTHON=wrongpython QTEST_QEMU_BINARY=./qemu-system-x86_64 tests/qtest/migration-test ... # Running /x86_64/migration/analyze-script # Using machine type: pc-q35-9.1 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-417639.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-417639.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -accel kvm -accel tcg -machine pc-q35-9.1, -name source,debug-threads=on -m 150M -serial file:/tmp/migration-test-XPLUN2/src_serial -drive if=none,id=d0,file=/tmp/migration-test-XPLUN2/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -uuid 11111111-1111-1111-1111-111111111111 -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-417639.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-417639.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -accel kvm -accel tcg -machine pc-q35-9.1, -name target,debug-threads=on -m 150M -serial file:/tmp/migration-test-XPLUN2/dest_serial -incoming tcp:127.0.0.1:0 -drive if=none,id=d0,file=/tmp/migration-test-XPLUN2/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -accel qtest ** ERROR:../../devel/qemu/tests/qtest/migration-test.c:1603:test_analyze_script: code should not be reached migration-test: ../../devel/qemu/tests/qtest/libqtest.c:240: qtest_wait_qemu: Assertion `pid == s->qemu_pid' failed. migration-test: ../../devel/qemu/tests/qtest/libqtest.c:240: qtest_wait_qemu: Assertion `pid == s->qemu_pid' failed. ok 2 /x86_64/migration/analyze-script ... Let's better fail the test in case the child did not exit properly, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-05-22tests/qtest/migration-test: Run some basic tests on s390x and ppc64 with ↵Thomas Huth
TCG, too On s390x, we recently had a regression that broke migration / savevm (see commit bebe9603fc ("hw/intc/s390_flic: Fix crash that occurs when saving the machine state"). The problem was merged without being noticed since we currently do not run any migration / savevm related tests on x86 hosts. While we currently cannot run all migration tests for the s390x target on x86 hosts yet (due to some unresolved issues with TCG), we can at least run some of the non-live tests to avoid such problems in the future. Thus enable the "analyze-script" and the "bad_dest" tests before checking for KVM on s390x or ppc64 (this also fixes the problem that the "analyze-script" test was not run on s390x at all anymore since it got disabled again by accident in a previous refactoring of the code). Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-05-22tests: Add test case of APIC ID for module level parsingZhuocheng Ding
After i386 supports module level, it's time to add the test for module level's parsing. Signed-off-by: Zhuocheng Ding <zhuocheng.ding@intel.com> Co-developed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Yanan Wang <wangyanan55@huawei.com> Tested-by: Babu Moger <babu.moger@amd.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20240424154929.1487382-18-zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-22i386: Support modules_per_die in X86CPUTopoInfoZhao Liu
Support module level in i386 cpu topology structure "X86CPUTopoInfo". Since x86 does not yet support the "modules" parameter in "-smp", X86CPUTopoInfo.modules_per_die is currently always 1. Therefore, the module level width in APIC ID, which can be calculated by "apicid_bitwidth_for_count(topo_info->modules_per_die)", is always 0 for now, so we can directly add APIC ID related helpers to support module level parsing. In addition, update topology structure in test-x86-topo.c. Tested-by: Yongwei Ma <yongwei.ma@intel.com> Co-developed-by: Zhuocheng Ding <zhuocheng.ding@intel.com> Signed-off-by: Zhuocheng Ding <zhuocheng.ding@intel.com> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Message-ID: <20240424154929.1487382-14-zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-18Merge tag 'hw-misc-20240517' of https://github.com/philmd/qemu into stagingRichard Henderson
Misc HW patches queue - Fix build when GBM buffer management library is detected (Cédric) - Fix PFlash block write (Gerd) - Allow 'parameter=1' for SMP topology on any machine (Daniel) - Allow guest-debug tests to run with recent GDB (Gustavo) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmZHcOsACgkQ4+MsLN6t # wN4CqxAA15Ow9ubxipORpM+XJgJ5isyPjD1s/6bR6lj7joBS6CYQbMaaskXuDQK8 # FpeoWw2DI2Fh/61NcUMAk7XBFF59DLrtngDhfLZJYdwBh0S8RFs1wp6sKyaBA9K6 # wDy39plxt/abKGzj3EcJUGDvhBLPJNnqy5OF9fZtWGrQg+A1i9uLMu/ac6srfX+K # zau/CxQaHYRYLYFmRcQCOhFVAtp2TQHw14CiiLYMCxF3GvUCN0xmtg8lzj9/y4ke # Yt0VN6jC3opfmQuDtPJNNkp8beaHbwMARFmXepDVB2cHp8DY5Gm4Ij2WiR0K985G # fqDknHEXDPI+RislV9+EN3p2c05m7ihPKLiDLYCulD4TIRDz+eUf71Onus9uecj9 # zCDdPYjU1ly9pyt7EVG2Bla9D/F51ZvbrzJQrHbvqhxWuZGOPSzHdpSsHZBIOXk6 # OhxTtUPeWDYW5K+wdNpxYPy5dqIR3jSEbDwLh2Wts2iPKxCGC8ly6CbZJPgA5lQE # hwYbiSKNcxAMV3V9qBfKLRSGadnnfPwG/zrGOHBni9ejz+m7foA13mJ4H6VFBn7Q # GGe9f00MCKcWTTlzRty1oIzAKcpupCOanX0MpVNcTYUqVtODhlQpDdH63ZVuiyRU # kux9xz71I+mwkjQiTHTki1qcAbLNj9+jgwbcc74Zz1BngIauqtc= # =Octv # -----END PGP SIGNATURE----- # gpg: Signature made Fri 17 May 2024 04:59:55 PM CEST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'hw-misc-20240517' of https://github.com/philmd/qemu: tests: Gently exit from GDB when tests complete tests: add testing of parameter=1 for SMP topology hw/core: allow parameter=1 for SMP topology on any machine hw/pflash: fix block write start ui/console: Only declare variable fence_fd when CONFIG_GBM is defined Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-05-17tests: Gently exit from GDB when tests completeGustavo Romero
GDB commit a207f6b3a38 ('Rewrite "python" command exception handling') changed how exit() called from Python scripts loaded by GDB behave, turning it into an exception instead of a generic error code that is returned. This change caused several QEMU tests to crash with the following exception: Python Exception <class 'SystemExit'>: 0 Error occurred in Python: 0 This happens because in tests/guest-debug/test_gdbstub.py exit is called after the tests have completed. This commit fixes it by politely asking GDB to exit via gdb.execute, passing the proper fail_count to be reported to 'make', instead of abruptly calling exit() from the Python script. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240515173132.2462201-4-gustavo.romero@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-05-17tests: add testing of parameter=1 for SMP topologyDaniel P. Berrangé
Validate that it is possible to pass 'parameter=1' for any SMP topology parameter, since unsupported parameters are implicitly considered to always have a value of 1. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Message-ID: <20240513123358.612355-3-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>