aboutsummaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)AuthorFilesLines
13 daysMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingRichard Henderson1-51/+49
* meson: Pass objects and dependencies to declare_dependency(), not static_library() * meson: Drop the .fa library suffix * target/i386: drop AMD machine check bits from Intel CPUID * target/i386: add avx-vnni-int16 feature * target/i386: SEV bugfixes * target/i386: SEV-SNP -cpu host support * char: fix exit issues # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmaGceoUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNcpgf/XziKojGOTvYsE7xMijOUswYjCG5m # ZVLqxTug8Q0zO/9mGvluKBTWmh8KhRWOovX5iZL8+F0gPoYPG4ONpNhh3wpA9+S7 # H7ph4V6sDJBX4l3OrOK6htD8dO5D9kns1iKGnE0lY60PkcHl+pU8BNWfK1zYp5US # geiyzuRFRRtDmoNx5+o+w+D+W5msPZsnlj5BnPWM+O/ykeFfSrk2ztfdwHKXUhCB # 5FJcu2sWVx+wsdVzdjgT8USi5+VTK4vabq3SfccmNRxBRnJOCU5MrR63stMDceo4 # TswSB88I0WRV1848AudcGZRkjvKaXLyHJ+QTjg2dp7itEARJ3MGsvOpS5A== # =3kv7 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 04 Jul 2024 02:56:58 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: target/i386/SEV: implement mask_cpuid_features target/i386: add support for masking CPUID features in confidential guests char-stdio: Restore blocking mode of stdout on exit target/i386: add avx-vnni-int16 feature i386/sev: Fallback to the default SEV device if none provided in sev_get_capabilities() i386/sev: Fix error message in sev_get_capabilities() target/i386: do not include undefined bits in the AMD topoext leaf target/i386: SEV: fix formatting of CPUID mismatch message target/i386: drop AMD machine check bits from Intel CPUID target/i386: pass X86CPU to x86_cpu_get_supported_feature_word meson: Drop the .fa library suffix Revert "meson: Propagate gnutls dependency" meson: Pass objects and dependencies to declare_dependency() meson: merge plugin_ldflags into emulator_link_args meson: move block.syms dependency out of libblock meson: move shared_module() calls where modules are already walked Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13 daysMerge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu ↵Richard Henderson1-1/+1
into staging virtio: features,fixes A bunch of improvements: - vhost dirty log is now only scanned once, not once per device - virtio and vhost now support VIRTIO_F_NOTIFICATION_DATA - cxl gained DCD emulation support - pvpanic gained shutdown support - beginning of patchset for Generic Port Affinity Structure - s3 support - friendlier error messages when boot fails on some illegal configs - for vhost-user, VHOST_USER_SET_LOG_BASE is now only sent once - part of vhost-user support for any POSIX system - not yet enabled due to qtest failures - sr-iov VF setup code has been reworked significantly - new tests, particularly for risc-v ACPI - bugfixes Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmaF068PHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRp+DMIAMC//mBXIZlPprfhb5cuZklxYi31Acgu5TUr # njqjCkN+mFhXXZuc3B67xmrQ066IEPtsbzCjSnzuU41YK4tjvO1g+LgYJBv41G16 # va2k8vFM5pdvRA+UC9li1CCIPxiEcszxOdzZemj3szWLVLLUmwsc5OZLWWeFA5m8 # vXrrT9miODUz3z8/Xn/TVpxnmD6glKYIRK/IJRzzC4Qqqwb5H3ji/BJV27cDUtdC # w6ns5RYIj5j4uAiG8wQNDggA1bMsTxFxThRDUwxlxaIwAcexrf1oRnxGRePA7PVG # BXrt5yodrZYR2sR6svmOOIF3wPMUDKdlAItTcEgYyxaVo5rAdpc= # =p9h4 # -----END PGP SIGNATURE----- # gpg: Signature made Wed 03 Jul 2024 03:41:51 PM PDT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [undefined] # 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: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (85 commits) hw/pci: Replace -1 with UINT32_MAX for romsize pcie_sriov: Register VFs after migration pcie_sriov: Remove num_vfs from PCIESriovPF pcie_sriov: Release VFs failed to realize pcie_sriov: Reuse SR-IOV VF device instances pcie_sriov: Ensure VF function number does not overflow pcie_sriov: Do not manually unrealize hw/ppc/spapr_pci: Do not reject VFs created after a PF hw/ppc/spapr_pci: Do not create DT for disabled PCI device hw/pci: Rename has_power to enabled virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged virtio: remove virtio_tswap16s() call in vring_packed_event_read() hw/cxl/events: Mark cxl-add-dynamic-capacity and cxl-release-dynamic-capcity unstable hw/cxl/events: Improve QMP interfaces and documentation for add/release dynamic capacity. tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs meson.build: Add RISC-V to the edk2-target list tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path tests/data/acpi: Move x86 ACPI tables under x86/${machine} path tests/qtest/bios-tables-test.c: Set "arch" for x86 tests ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13 daysmeson.build: Add RISC-V to the edk2-target listSunil V L1-1/+1
so that ACPI table test can be supported. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20240625150839.1358279-12-sunilvl@ventanamicro.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 daysutil/cpuinfo-riscv: Use linux __riscv_hwprobe syscallRichard Henderson1-0/+6
With recent linux kernels, there is a syscall to probe for various ISA extensions. These bits were phased in over several kernel releases, so we still require checks for symbol availability. Acked-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
14 daysmeson: Drop the .fa library suffixPaolo Bonzini1-15/+2
The non-standard .fa library suffix breaks the link source de-duplication done by Meson so drop it. The lack of link source de-duplication causes AddressSanitizer to complain ODR violations, and makes GNU ld abort when combined with clang's LTO. Fortunately, the non-standard suffix is not necessary anymore for two reasons. First, the non-standard suffix was necessary for fork-fuzzing. Meson wraps all standard-suffixed libraries with --start-group and --end-group. This made a fork-fuzz.ld linker script wrapped as well and broke builds. Commit d2e6f9272d33 ("fuzz: remove fork-fuzzing scaffolding") dropped fork-fuzzing so we can now restore the standard suffix. Second, the libraries are not even built anymore, because it is possible to just use the object files directly via extract_all_objects(). The occurences of the suffix were detected and removed by performing a tree-wide search with 'fa' and .fa (note the quotes and dot). Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20240524-xkb-v4-4-2de564e5c859@daynix.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 daysRevert "meson: Propagate gnutls dependency"Akihiko Odaki1-2/+2
This reverts commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2. It was only needed because of duplicate objects caused by declare_dependency(link_whole: ...), and can be dropped now that meson.build specifies objects and dependencies separately for the internal dependencies. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20240524-objects-v1-2-07cbbe96166b@daynix.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 daysmeson: Pass objects and dependencies to declare_dependency()Akihiko Odaki1-19/+25
We used to request declare_dependency() to link_whole static libraries. If a static library is a thin archive, GNU ld keeps all object files referenced by the archive open, and sometimes exceeds the open file limit. Another problem with link_whole is that suboptimal handling of nested dependencies. link_whole by itself does not propagate dependencies. In particular, gnutls, a dependency of crypto, is not propagated to its users, and we currently workaround the issue by declaring gnutls as a dependency for each crypto user. On the other hand, if you write something like libfoo = static_library('foo', 'foo.c', dependencies: gnutls) foo = declare_dependency(link_whole: libfoo) libbar = static_library('bar', 'bar.c', dependencies: foo) bar = declare_dependency(link_whole: libbar, dependencies: foo) executable('prog', sources: files('prog.c'), dependencies: [foo, bar]) hoping to propagate the gnutls dependency into bar.c, you'll see a linking failure for "prog", because the foo.c.o object file is included in libbar.a and therefore it is linked twice into "prog": once from libfoo.a and once from libbar.a. Here Meson does not see the duplication, it just asks the linker to link all of libfoo.a and libbar.a into "prog". Instead of using link_whole, extract objects included in static libraries and pass them to declare_dependency(); and then the dependencies can be added as well so that they are propagated, because object files on the linker command line are always deduplicated. This requires Meson 1.1.0 or later. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20240524-objects-v1-1-07cbbe96166b@daynix.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 daysmeson: move block.syms dependency out of libblockPaolo Bonzini1-2/+3
In order to define libqemuutil symbols that are requested by block modules, QEMU currently uses a combination of the "link_depends" argument of libraries (which is propagated into dependencies, but not available in dependencies) and the "link_args" argument of declare_dependency() (which _is_ available in static_library, but probably not used for historical reasons only). Unfortunately the link_depends will not be propagated into the "block" dependency if it is defined using declare_dependency(objects: ...); and it is not possible to add it directly to the dependency because the keyword argument simply is not available. The only solution, in order to switch to defining the dependency without using "link_whole" (which has problems of its own, see https://github.com/mesonbuild/meson/pull/8151#issuecomment-754796420), is unfortunately to add the link_args and link_depends to the executables directly; fortunately there is just four of them. It is possible (and I will look into it) to add "link_depends" to declare_dependency(), but it probably will be a while before QEMU can use it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 daysmeson: move shared_module() calls where modules are already walkedPaolo Bonzini1-15/+19
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-28meson: remove dead optimization optionPaolo Bonzini1-13/+0
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-28meson: allow configuring the x86-64 baselinePaolo Bonzini1-8/+33
Add a Meson option to configure which x86-64 instruction set to use. QEMU will now default to x86-64-v1 + cmpxchg16b for 64-bit builds (that corresponds to a Pentium 4 for 32-bit builds). The baseline can be tuned down to Pentium Pro for 32-bit builds (with -Dx86_version=0), or up as desired. Acked-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-14configure: Add uadk optionShameer Kolothum1-0/+14
Add --enable-uadk and --disable-uadk options to enable and disable UADK compression accelerator. This is for using UADK based hardware accelerators for live migration. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Reviewed-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-14configure: add --enable-qpl build optionYuan Liu1-0/+8
add --enable-qpl and --disable-qpl options to enable and disable the QPL compression method for multifd migration. The Query Processing Library (QPL) is an open-source library that supports data compression and decompression features. It is based on the deflate compression algorithm and use Intel In-Memory Analytics Accelerator(IAA) hardware for compression and decompression acceleration. For more live migration with IAA, please refer to the document docs/devel/migration/qpl-compression.rst Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Reviewed-by: Nanhai Zou <nanhai.zou@intel.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> 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 Henderson1-3/+1
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-12meson: Remove libibumad dependencezhenwei pi1-3/+1
RDMA based migration has no dependence on libumad. libibverbs and librdmacm are enough. libumad was used by rdmacm-mux which has been already removed. It's remained mistakenly. Fixes: 1dfd42c4264b ("hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper") Cc: 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-2-pizhenwei@bytedance.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-06-10tracetool: Remove unused vcpu.py scriptPhilippe Mathieu-Daudé1-1/+0
vcpu.py is pointless since commit 89aafcf2a7 ("trace: remove code that depends on setting vcpu"), remote it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-id: 20240606102631.78152-1-philmd@linaro.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2024-06-08meson: Don't even detect posix_madvise() on DarwinMichal Privoznik1-4/+10
On Darwin, posix_madvise() has the same return semantics as plain madvise() [1]. That's not really what our usage expects. Fortunately, madvise() is available and preferred anyways so we may stop detecting posix_madvise() on Darwin. 1: https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/man/man2/madvise.2.auto.html Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Message-ID: <00f71753bdeb8c0f049fda05fb63b84bb5502fb3.1717584048.git.mprivozn@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-05meson: assume x86-64-v2 baseline ISAPaolo Bonzini1-3/+7
x86-64-v2 processors were released in 2008, assume that we have one. Unfortunately there is no GCC flag to enable all the features without disabling what came after; so enable them one by one. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-25migration: remove unnecessary zlib dependencyPaolo Bonzini1-1/+1
zlib code is only used by the emulators, not by the tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-24configure: move -mcx16 flag out of CPU_CFLAGSArtyom Kunakovsky1-0/+7
The point of CPU_CFLAGS is really just to select the appropriate multilib, for example for library linking tests, and -mcx16 is not needed for that purpose. Furthermore, if -mcx16 is part of QEMU's choice of a basic x86_64 instruction set, it should be applied to cross-compiled x86_64 code too; it is plausible that tests/tcg would want to cover cmpxchg16b as well, for example. In the end this makes just as much sense as a per sub-build tweak, so move the flag to meson.build and cross_cc_cflags_x86_64. This leaves out contrib/plugins, which would fail when attempting to use __sync_val_compare_and_swap_16 (note it does not do yet); while minor, this *is* a disadvantage of this change. But building contrib/plugins with a Makefile instead of meson.build is something self-inflicted just for the sake of showing that it can be done, and if this kind of papercut started becoming a problem we could make the directory part of the meson build. Until then, we can live with the limitation. Signed-off-by: Artyom Kunakovsky <artyomkunakovsky@gmail.com> Message-ID: <20240523051118.29367-1-artyomkunakovsky@gmail.com> [rewrite commit message, remove from configure. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-14Bump minimum glib version to v2.66Thomas Huth1-15/+1
Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According to repology.org, available versions are: CentOS Stream 9: 2.66.7 Debian 11: 2.66.8 Fedora 38: 2.74.1 Freebsd: 2.78.4 Homebrew: 2.80.0 Openbsd: 2.78.4 OpenSuse leap 15.5: 2.70.5 pkgsrc_current: 2.78.4 Ubuntu 22.04: 2.72.1 Thus it should be safe to bump the minimum glib version to 2.66 now. Version 2.66 comes with new functions for URI parsing which will allow further clean-ups in the following patches. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240418101056.302103-8-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-05-10configs: disable emulators that require it if libfdt is not foundPaolo Bonzini1-1/+5
Since boards can express their dependency on libfdt and system/device_tree.c, only leave TARGET_NEED_FDT if the target has a hard dependency. Those emulators will be skipped if libfdt is disabled, or if it is "auto" and not found and --disable-download is passed; unless the target is mentioned explicitly in --target-list, in which case the build will fail. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-10kconfig: allow compiling out QEMU device tree code per targetPaolo Bonzini1-0/+1
Introduce a new Kconfig symbol, CONFIG_DEVICE_TREE, that specifies whether to include the common device tree code in system/device_tree.c and to link to libfdt. For now, include it unconditionally if libfdt is available. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-10meson: move libfdt together with other dependenciesPaolo Bonzini1-41/+38
Move the libfdt detection code together with other dependencies instead of keeping it with subprojects. This has the disadvantage of performing the detection even if no target requires libfdt; but it has the advantage that Kconfig will be able to observe the availability of the library. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-10meson: pick libfdt from common_ss when building target-specific filesPaolo Bonzini1-3/+11
Avoid having to list dependencies such as libfdt twice, both on common_ss and specific_ss. Instead, just take all the dependencies in common_ss and allow the target-specific libqemu-*.fa library to use them. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-08migration: Remove block migrationFabiano Rosas1-2/+0
The block migration has been considered obsolete since QEMU 8.2 in favor of the more flexible storage migration provided by the blockdev-mirror driver. Two releases have passed so now it's time to remove it. Deprecation commit 66db46ca83 ("migration: Deprecate block migration"). Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-05-03meson: make target endianneess available to KconfigPaolo Bonzini1-5/+7
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. MIPS boards may only be available for big-endian or only for little-endian emulators, add a symbol so that this can be described with a "depends on" clause. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-26exec: Expose 'target_page.h' API to user emulationPhilippe Mathieu-Daudé1-1/+1
User-only objects might benefit from the "exec/target_page.h" API, which allows to build some objects once for all targets. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231211212003.21686-3-philmd@linaro.org>
2024-04-26exec: Rename NEED_CPU_H -> COMPILING_PER_TARGETPhilippe Mathieu-Daudé1-2/+2
'NEED_CPU_H' guard target-specific code; it is defined by meson altogether with the 'CONFIG_TARGET' definition. Rename NEED_CPU_H as COMPILING_PER_TARGET to clarify its meaning. Mechanical change running: $ sed -i s/NEED_CPU_H/COMPILING_PER_TARGET/g $(git grep -l NEED_CPU_H) then manually add a /* COMPILING_PER_TARGET */ comment after the '#endif' when the block is large. Inspired-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240322161439.6448-4-philmd@linaro.org>
2024-04-24meson: Make DEBUG_REMAP a meson optionIlya Leoshkevich1-0/+4
Currently DEBUG_REMAP is a macro that needs to be manually #defined to be activated, which makes it hard to have separate build directories dedicated to testing the code with it. Promote it to a meson option. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20240312002402.14344-1-iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-04-24Merge tag 'housekeeping-20240424' of https://github.com/philmd/qemu into stagingRichard Henderson1-38/+0
Removal of deprecated code - Remove the Nios II target and hardware - Remove pvrdma device and rdmacm-mux helper - Remove GlusterFS RDMA protocol handling - Update Sriram Yagnaraman mail address # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmYpE0YACgkQ4+MsLN6t # wN5PIA//egomANjRHAUAf9tdjljgT/JR49ejM7iInyxspR/xaiq0TlP2kP6aDNps # y1HAWBwfj5lGxeMgQ1mSKJGka3v2AIPWb7RbNT+9AaiWHv+sx5OrEytozUsFHLo8 # gSgRQocq0NY2a9dPbtkDqfbmq/rkCC7wgZzwroHsyOdiqYsWDKPJFleBDMjGmEaf # colhiDmhUPgvE3NNpwfEVNh/2SzxUxY8k5FHal6qij5z56ZqBglgnziDZEvGVCZ1 # uF4Hca/kh7TV2MVsdStPbGWZYDhJ/Np/2FnRoThD1Hc4qq8d/SH997m2F94tSOud # YeH54Vp5lmCeYgba5y8VP0ZPx/b9XnTtLvKggNdoqB+T2LBWPRt8kehqoaxvammF # ALzbY/t2vUxL6nIVbosOaTyqVOXvynk3/Js5S0jbnlu+vP2WvvFEzfYKIs2DIA8w # z56o/rG4KfyxF0aDB+CvLNwtJS8THqeivPqmYoKTdN9FPpN2RyBNLITrKo389ygF # 3oWy3+xsKGIPdNFY0a4l25xntqWNhND89ejzyL9M6G1cQ9RdEmTIUGTrinPQQmfP # oHIJMBeTdj7EqPL4LB3BR/htw9U5PobeMNYKFsRkS39PjGDqba5wbIdk3w5/Rcxa # s/PKdspDKWPwZ5jhcLD0qxAGJFnqM2UFjPo+U8qyI3RXKXFAn0E= # =c8Aj # -----END PGP SIGNATURE----- # gpg: Signature made Wed 24 Apr 2024 07:12:22 AM PDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'housekeeping-20240424' of https://github.com/philmd/qemu: block/gluster: Remove deprecated RDMA protocol handling hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper hw/timer: Remove the ALTERA_TIMER model target/nios2: Remove the deprecated Nios II target MAINTAINERS: Update Sriram Yagnaraman mail address Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-04-24hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helperPhilippe Mathieu-Daudé1-36/+0
The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Remove: - PVRDMA device - generated vmw_pvrdma/ directory from linux-headers - rdmacm-mux tool from contrib/ Cc: Yuval Shaia <yuval.shaia.ml@gmail.com> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20240328130255.52257-2-philmd@linaro.org>
2024-04-24target/nios2: Remove the deprecated Nios II targetPhilippe Mathieu-Daudé1-2/+0
The Nios II target is deprecated since v8.2 in commit 9997771bc1 ("target/nios2: Deprecate the Nios II architecture"). Remove: - Buildsys / CI infra - User emulation - System emulation (10m50-ghrd & nios2-generic-nommu machines) - Tests Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Marek Vasut <marex@denx.de> Message-Id: <20240327144806.11319-3-philmd@linaro.org>
2024-04-18hw: Include minimal source set in user emulation buildPhilippe Mathieu-Daudé1-1/+5
Only the files in hwcore_ss[] are required to link a user emulation binary. Have meson process the hw/ sub-directories if system emulation is selected, otherwise directly process hw/core/ to get hwcore_ss[], which is the only set required by user emulation. This removes about 10% from the time needed to run "../configure --disable-system --disable-tools --disable-guest-agent". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240404194757.9343-8-philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20240408155330.522792-9-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-18meson: do not link pixman automatically into all targetsPaolo Bonzini1-1/+1
The dependency on pixman is listed manually in all sourcesets that need it. There is no need to bring into libqemuutil, since there is nothing in util/ that needs pixman either. Reported-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240408155330.522792-2-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-12meson.build: Disable -fzero-call-used-regs on OpenBSDThomas Huth1-1/+5
QEMU currently does not work on OpenBSD since the -fzero-call-used-regs option that we added to meson.build recently does not work with the "retguard" extension from OpenBSD's Clang. Thus let's disable the -fzero-call-used-regs here until there's a better solution available. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2278 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240411120819.56417-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-03-20meson: remove dead dictionary accessPaolo Bonzini1-1/+1
The "link_depends" key has not been used since commit c46f76d1586 ("meson: specify fuzz linker script as a project arg", 2020-09-08), and even before that it was only used for fork-fuzzing which we removed in commit d2e6f9272d3 ("fuzz: remove fork-fuzzing scaffolding", 2023-02-16). So, remove it for a very small simplification of meson.build. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-03-13Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into ↵Peter Maydell1-23/+40
staging Pull request # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmXwpoYACgkQnKSrs4Gr # c8gE0wf/c0hNDKoV01N8IwfJdmIBySNeCYRQiwcR84iiPoGGAwYdKuLa7wHaQKiO # iM0EV/ltJiiOGCHxlffVqLBzJurJHsHG6m429KBLRBXWc6gVzhCN9TjD8DwHxiTU # qzczoev8NJ2y5mrxzPPPjMxSSJEe3Ynas6ngeHeYBUtu0PRNp79zceWdtS0sPzia # sCI8EH/oCZQgVcwI/UkIOXjzbKK1lZWa2805//KIqvG27i9zHzLJ0l5eeLtbpZpy # LnFGRyQGGf+jEKAJuT6598q6T+jCkLCMN6zpyKWGvcYleNvBnlw6+N8Il8zV7KSc # TE5BNk+C7I9aimrRyaz3WrFCZW5DbQ== # =q9Im # -----END PGP SIGNATURE----- # gpg: Signature made Tue 12 Mar 2024 19:01:26 GMT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu: meson: generate .stp files for tools too tracetool: remove redundant --target-type / --target-name args Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-03-12meson: generate .stp files for tools tooDaniel P. Berrangé1-21/+40
The qemu-img, qemu-io, qemu-nbd, qemu-storage-daemon tools all have support for systemtap tracing built-in, so should be given corresponding .stp files to define their probes. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20240108171356.1037059-3-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2024-03-12tracetool: remove redundant --target-type / --target-name argsDaniel P. Berrangé1-2/+0
The --target-type and --target-name args are used to construct the default probe prefix if '--probe-prefix' is not given. The meson.build will always pass '--probe-prefix', so the other args are effectively redundant. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20240108171356.1037059-2-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2024-03-12Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into stagingPeter Maydell1-3/+7
# -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEIV1G9IJGaJ7HfzVi7wSWWzmNYhEFAmXwPUAACgkQ7wSWWzmN # YhFnIwgAgctDniJwlRxXB01eVlzXz7IulHnpSby07XEJxENSpGB8ufaeE4eK5gJy # NVK6C2+1EU2vRxm4oIdcvtN4C4/jtRbYYjiSTx7eE4FmSkqshSnR5XCV72LDqG3i # WbzInjMvYfysmcMXLfrWgxOnVew9WqEzlpEWlc7FfNKnkzBVf+JDztfqCUx0XM7H # qefw4ImjqQw993QxJpipXC7aEGUyouB0RIBB71FkCa9ihlh9x7W68evbOI/jTn5q # HWuStgS02sKHjRFliMbdbMY77FNUz4Yroo/GKSvGt64atxkQSJqPNAV+/9n18LNy # QAH5eK6cXFPOIAaYpADU5kHDVVAFiw== # =iBdx # -----END PGP SIGNATURE----- # gpg: Signature made Tue 12 Mar 2024 11:32:16 GMT # gpg: using RSA key 215D46F48246689EC77F3562EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * tag 'net-pull-request' of https://github.com/jasowang/qemu: ebpf: Updated eBPF program and skeleton. qmp: Added new command to retrieve eBPF blob. virtio-net: Added property to load eBPF RSS with fds. ebpf: Added eBPF initialization by fds. ebpf: Added eBPF map update through mmap. Avoid unaligned fetch in ladr_match() e1000e: fix link state on resume igb: fix link state on resume Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-03-12ebpf: Updated eBPF program and skeleton.Andrew Melnychenko1-3/+7
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Added check for BPF_F_MMAPABLE flag to meson script and requirements to libbpf version. Also changed fragmentation flag check - some TCP/UDP packets may be considered fragmented if DF flag is set. Signed-off-by: Andrew Melnychenko <andrew@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2024-03-11meson.build: Always require an objc compiler on macos hostsPeter Maydell1-1/+1
We currently only insist that an ObjectiveC compiler is present on macos hosts if we're building the Cocoa UI. However, since then we've added some other parts of QEMU which are also written in ObjC: the coreaudio audio backend, and the vmnet net backend. This means that if you try to configure QEMU on macos with --disable-cocoa the build will fail: ../meson.build:3741:13: ERROR: No host machine compiler for 'audio/coreaudio.m' Since in practice any macos host will have an ObjC compiler available, rather than trying to gate the compiler detection on an increasingly complicated list of every bit of QEMU that uses ObjC, just require it unconditionally on macos hosts. Resolves https://gitlab.com/qemu-project/qemu/-/issues/2138 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240311133334.3991537-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-03-08meson: Remove --warn-common ldflagAkihiko Odaki1-5/+0
--warn-common ldflag causes warnings for multiple definitions of ___asan_globals_registered when enabling AddressSanitizer with clang. The warning is somewhat obsolete so just remove it. The common block is used to allow duplicate definitions of uninitialized global variables. In the past, GCC and clang used to place such variables in a common block by default, which prevented programmers for noticing accidental duplicate definitions. Commit 49237acdb725 ("Enable ld flag --warn-common") added --warn-common ldflag so that ld warns in such a case. Today, both of GCC and clang don't use common blocks by default[1][2] so any remaining use of common blocks should be intentional. Remove --warn-common ldflag to suppress warnings for intentional use of common blocks. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678 [2]: https://reviews.llvm.org/D75056 Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20240304-common-v1-1-1a2005d1f350@daynix.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-03-04meson: detect broken clang 17 with -fzero-call-used-regsDaniel P. Berrangé1-5/+12
Clang 17 will segv if given -fzero-call-used-regs and optimization is enabled. Since upstream hasn't triaged the bug, distros are increasingly shipping with broken Clang. https://github.com/llvm/llvm-project/issues/75168 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277474 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240304144456.3825935-2-berrange@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-02-23meson: Enable -WvlaPeter Maydell1-0/+1
QEMU has historically used variable length arrays only very rarely. Variable length arrays are a potential security issue where an on-stack dynamic allocation isn't correctly size-checked, especially when the size comes from the guest. (An example problem of this kind from the past is CVE-2021-3527). Forbidding them entirely is a defensive measure against further bugs of this kind. Enable -Wvla to prevent any new uses from sneaking into the codebase. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20240125173211.1786196-3-peter.maydell@linaro.org> [thuth: rebased to current master branch] Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240221162636.173136-4-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-02-09crypto: Introduce SM4 symmetric cipher algorithmHyman Huang1-0/+26
Introduce the SM4 cipher algorithms (OSCCA GB/T 32907-2016). SM4 (GBT.32907-2016) is a cryptographic standard issued by the Organization of State Commercial Administration of China (OSCCA) as an authorized cryptographic algorithms for the use within China. Detect the SM4 cipher algorithms and enable the feature silently if it is available. Signed-off-by: Hyman Huang <yong.huang@smartx.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-02-09meson: sort C warning flags alphabeticallyDaniel P. Berrangé1-19/+21
When scanning the list of warning flags to see if one is present, it is helpful if they are in alphabetical order. It is further helpful to separate out the 'no-' prefixed warnings. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-02-06meson: Link with libinotify on FreeBSDIlya Leoshkevich1-4/+19
make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-inotify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) in archive libqemuutil.a On FreeBSD the inotify functions are defined in libinotify.so. Add it to the dependencies. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240206002344.12372-5-iii@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-02-01hw/fsi: Introduce IBM's Local busNinad Palsule1-0/+1
This is a part of patchset where IBM's Flexible Service Interface is introduced. The LBUS is modelled to maintain mapped memory for the devices. The memory is mapped after CFAM config, peek table and FSI slave registers. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> [ clg: - removed lbus_add_device() bc unused - removed lbus_create_device() bc used only once - removed "address" property - updated meson.build to build fsi dir - included an empty hw/fsi/trace-events ] Signed-off-by: Cédric Le Goater <clg@kaod.org>