summaryrefslogtreecommitdiffstats
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* tracing: excise the tcg related from tracetoolAlex Bennée2022-02-091-4/+0Star
| | | | | | | | | | | | | | Now we have no TCG trace events and no longer handle them in the code we can remove the handling from the tracetool to generate them. vcpu tracing is still available although the existing syscall event is an exercise in redundancy (plugins and -strace can also get the information). Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Cc: Luis Vilanova <vilanova@imperial.ac.uk> Cc: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220204204335.1689602-21-alex.bennee@linaro.org>
* drop libxml2 checks since libxml is not actually used (for parallels)Michael Tokarev2022-02-091-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a long time, we assumed that libxml2 is necessary for parallels block format support (block/parallels*). However, this format actually does not use libxml [*]. Since this is the only user of libxml2 in whole QEMU tree, we can drop all libxml2 checks and dependencies too. It is even more: --enable-parallels configure option was the only option which was silently ignored when it's (fake) dependency (libxml2) isn't installed. Drop all mentions of libxml2. [*] Actually the basis for libxml use were introduced in commit ed279a06c53 ("configure: add dependency") but the implementation was never merged: https://lore.kernel.org/qemu-devel/70227bbd-a517-70e9-714f-e6e0ec431be9@openvz.org/ Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220119090423.149315-1-mjt@msgid.tls.msk.ru> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [PMD: Updated description and adapted to use lcitool] Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220121154134.315047-5-f4bug@amsat.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20220204204335.1689602-9-alex.bennee@linaro.org>
* bsd-user: Add trace events for bsd-userWarner Losh2022-01-281-1/+4
| | | | | | | | | | | Add the bsd-user specific events and infrastructure. Only include the linux-user trace events for linux-user, not bsd-user. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Kyle Evans <kevans@freebsd.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* bsd-user: Add host signals to the buildWarner Losh2022-01-281-0/+1
| | | | | | | | Start to add the host signal functionality to the build. Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ↵Peter Maydell2022-01-281-9/+7Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging * configure and meson fixes * "meson test" switch for iotests * deprecation of old SGX QAPI * unexport InterruptStatsProviderClass-related functions # gpg: Signature made Fri 28 Jan 2022 10:13:36 GMT # 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] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: configure: fix parameter expansion of --cross-cc-cflags options qapi: Cleanup SGX related comments and restore @section-size check-block: replace -makecheck with TAP output qemu-iotests: require at least an argument to check-block.sh build: make check-block a meson test scripts/mtest2make: add support for SPEED=thorough check-block.sh: passthrough -jN flag of make to -j N flag of check meson: Use find_program() to resolve the entitlement.sh script exec/cpu: Make host pages variables / macros 'target agnostic' meson.build: Use a function from libfdt 1.5.1 for the library check intc: Unexport InterruptStatsProviderClass-related functions docker: add msitools to Fedora/mingw cross build-sys: fix undefined ARCH error build-sys: fix a meson deprecation warning Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * build: make check-block a meson testPaolo Bonzini2022-01-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | "meson test" can be asked to run tests verbosely; this makes it usable also for qemu-iotests's own harness, and it lets "make check-block" reuse mtest2make.py's infrastructure to find and build test dependencies. Adjust check-block.sh to use the standard exit code that reports a test as skipped. Alternatively, in the future we could make it produce TAP output, which is consistent with all other "make check" tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scripts/mtest2make: add support for SPEED=thoroughPaolo Bonzini2022-01-281-2/+3
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson: Use find_program() to resolve the entitlement.sh scriptPhilippe Mathieu-Daudé2022-01-281-6/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ../configure without any particular option generates 31 targets on Darwin, and meson search for the entitlement.sh script 31 times: Program nm found: YES Program scripts/undefsym.py found: YES (/opt/homebrew/opt/python@3.9/bin/python3.9 /Code/qemu/scripts/undefsym.py) Program scripts/feature_to_c.sh found: YES (/bin/sh /Code/qemu/scripts/feature_to_c.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Program scripts/entitlement.sh found: YES (/Code/qemu/scripts/entitlement.sh) Configuring 50-edk2-i386-secure.json using configuration Configuring 50-edk2-x86_64-secure.json using configuration Use find_program() which seems to cache the script path once found. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220122002052.83745-1-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson.build: Use a function from libfdt 1.5.1 for the library checkThomas Huth2022-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fdt version test in meson.build uses a function from libfdt v1.4.7, but we require version 1.5.1 nowadays. Thus use a function that has been introduced in that version instead. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/822 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220118170548.97288-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | meson: generate trace events for qmp commandsVladimir Sementsov-Ogievskiy2022-01-271-0/+3
|/ | | | | | | | | | | | | | | | 1. Use --gen-trace when generate qmp commands 2. Add corresponding .trace-events files as outputs in qapi_files custom target 3. Define global qapi_trace_events list of .trace-events file targets, to fill in trace/qapi.build and to use in trace/meson.build 4. In trace/meson.build use the new array as an additional source of .trace_events files to be processed Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220126161130.3240892-5-vsementsov@virtuozzo.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
* target/riscv: enable riscv kvm accelYifei Jiang2022-01-211-0/+2
| | | | | | | | | | | Add riscv kvm support in meson.build file. Signed-off-by: Yifei Jiang <jiangyifei@huawei.com> Signed-off-by: Mingwang Li <limingwang@huawei.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Message-id: 20220112081329.1835-14-jiangyifei@huawei.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
* meson: require liburing >= 0.3Daniel P. Berrangé2022-01-181-1/+2
| | | | | | | | | | | | | | | | | | | | openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build. ../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’: ../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration] if (io_uring_sq_ready(&ctx->fdmon_io_uring)) { ^~~~~~~~~~~~~~~~~ io_uring_cq_ready This method was introduced in liburing 0.3, so set that as a minimum requirement. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20211215141949.3512719-4-berrange@redhat.com> Message-Id: <20220105135009.1584676-4-alex.bennee@linaro.org>
* meson: build all modules by defaultPaolo Bonzini2022-01-121-1/+3
| | | | | | | | | | | | | With more recent versions of Meson, the build.ninja file is more selective as to what is built by default, and not building the modules results in test failures. Mark the modules as built-by-default and, to make the dependencies more precise, also require them to be up-to-date before running tests. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/801 Tested-by: Li Zhang <lizhang@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* meson: add comments in the target-specific flags sectionPaolo Bonzini2022-01-121-0/+5
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure, meson: move config-poison.h to mesonPaolo Bonzini2022-01-121-0/+12
| | | | | | | This ensures that the file is regenerated properly whenever config-target.h or config-devices.h files change. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/file-posix: Simplify the XFS_IOC_DIOINFO handlingThomas Huth2022-01-121-1/+0Star
| | | | | | | | | | | | | | | | | | | The handling for the XFS_IOC_DIOINFO ioctl is currently quite excessive: This is not a "real" feature like the other features that we provide with the "--enable-xxx" and "--disable-xxx" switches for the configure script, since this does not influence lots of code (it's only about one call to xfsctl() in file-posix.c), so people don't gain much with the ability to disable this with "--disable-xfsctl". It's also unfortunate that the ioctl will be disabled on Linux in case the user did not install the right xfsprogs-devel package before running configure. Thus let's simplify this by providing the ioctl definition on our own, so we can completely get rid of the header dependency and thus the related code in the configure script. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20211215125824.250091-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* meson: cleanup common-user/ buildPaolo Bonzini2022-01-121-12/+1Star
| | | | | | | | | | | | | | | | | It is not necessary to have a separate static_library just for common_user files; using the one that already covers the rest of common_ss is enough unless you need to reuse some source files between emulators and tests. Just place common files for all user-mode emulators in common_ss, similar to what is already done for softmmu_ss in full system emulators. The only disadvantage is that the include_directories under bsd-user/include/ and linux-user/include/ are now enabled for all targets rather than only user mode emulators. This however is not different from how include/sysemu/ is available when building user mode emulators. Tested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* meson: reuse common_user_inc when building files specific to user-mode emulatorsPaolo Bonzini2022-01-121-1/+1
| | | | | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* bsd-user: create a per-arch signal.c fileWarner Losh2022-01-081-1/+1
| | | | | | | | | Create a place-holder signal.c file for each of the architectures that are currently built. In the future, some code that's currently inlined in target_arch_signal.h will live here. Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* meson: Unify mips and mips64 in host_archRichard Henderson2021-12-311-0/+2
| | | | | | | | | | Fixes the build on a mips64 host. Prior to the break, we identified the arch via the __mips__ define; afterward we use meson's host_machine.cpu_family(). Restore the previous combination. Fixes: 823eb013452e ("configure, meson: move ARCH to meson.build") Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Merge tag 'for-upstream-mtest' of https://gitlab.com/bonzini/qemu into stagingRichard Henderson2021-12-231-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace tap-driver.pl with "meson test". # gpg: Signature made Thu 23 Dec 2021 01:06:34 AM PST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [unknown] # gpg: aka "Paolo Bonzini <pbonzini@redhat.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: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream-mtest' of https://gitlab.com/bonzini/qemu: build: use "meson test" as the test harness Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * build: use "meson test" as the test harnessPaolo Bonzini2021-12-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | "meson test" starting with version 0.57 is just as capable and easy to use as QEMU's own TAP driver. All existing options for "make check" work. The only required code change involves how to mark "slow" tests; they need to belong to an additional "slow" suite. The rules for .tap output are replaced by JUnit XML; GitLab is able to parse that output and present it in the CI pipeline report. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | configure, meson.build: Mark support for loongarch64 hostsWANG Xuerui2021-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output of `uname -a` on an initial Gentoo LA64 port, running the upstream submission version of Linux (with some very minor patches not influencing output here): > Linux <hostname> 5.14.0-10342-g37a00851b145 #5 SMP PREEMPT Tue Aug 10 12:56:24 PM CST 2021 loongarch64 GNU/Linux And the same on the vendor-supplied Loongnix 20 system, with an early in-house port of Linux, and using the old-world ABI: > Linux <hostname> 4.19.167-rc5.lnd.1-loongson-3 #1 SMP Sat Apr 17 07:32:32 UTC 2021 loongarch64 loongarch64 loongarch64 GNU/Linux So a name of "loongarch64" matches both, fortunately. Signed-off-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211221054105.178795-31-git@xen0n.name> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* | ui: add a D-Bus display backendMarc-André Lureau2021-12-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "dbus" display backend exports the QEMU consoles and other UI-related interfaces over D-Bus. By default, the connection is established on the session bus, but you can specify a different bus with the "addr" option. The backend takes the "org.qemu" service name, while still allowing further instances to queue on the same name (so you can lookup all the available instances too). It accepts any number of clients at this point, although this is expected to evolve with options to restrict clients, or only accept p2p via fd passing. The interface is intentionally very close to the internal QEMU API, and can be introspected or interacted with busctl/dfeet etc: $ ./qemu-system-x86_64 -name MyVM -display dbus $ busctl --user introspect org.qemu /org/qemu/Display1/Console_0 org.qemu.Display1.Console interface - - - .RegisterListener method h - - .SetUIInfo method qqiiuu - - .DeviceAddress property s "pci/0000/01.0" emits-change .Head property u 0 emits-change .Height property u 480 emits-change .Label property s "VGA" emits-change .Type property s "Graphic" emits-change .Width property u 640 emits-change [...] See the interfaces XML source file and Sphinx docs for the generated API documentations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* | build-sys: set glib dependency versionMarc-André Lureau2021-12-211-2/+4
| | | | | | | | | | | | | | | | | | Further meson configuration tests are to be added based on the glib version. Also correct the version reporting in the config log. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | ui/vdagent: add CHECK_SPICE_PROTOCOL_VERSIONMarc-André Lureau2021-12-211-0/+5
|/ | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* meson: Move bsd_user_ss to bsd-user/Richard Henderson2021-12-201-3/+0Star
| | | | | | | | | We have no need to reference bsd_user_ss outside of bsd-user. Go ahead and merge it directly into specific_ss. Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* meson: Move linux_user_ss to linux-user/Richard Henderson2021-12-201-3/+0Star
| | | | | | | | | We have no need to reference linux_user_ss outside of linux-user. Go ahead and merge it directly into specific_ss. Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* linux-user: Move thunk.c from top-levelRichard Henderson2021-12-201-1/+0Star
| | | | | | | | | So far, linux-user is the only user of these functions. Clean up the build machinery by restricting it to linux-user. Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* common-user: Move safe-syscall.* from linux-userRichard Henderson2021-12-201-1/+17
| | | | | | | | | | | Move linux-user safe-syscall.S and safe-syscall-error.c to common-user so that bsd-user can also use it. Also move safe-syscall.h to include/user/. Since there is nothing here that is related to the guest, as opposed to the host, build it once. Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* configure, meson: move ARCH to meson.buildPaolo Bonzini2021-12-181-9/+17
| | | | | | | | $ARCH and the HOST_* symbols are only used by the QEMU build; configure uses $cpu instead. Remove it from config-host.mak. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* meson: rename "arch" variablePaolo Bonzini2021-12-181-6/+6
| | | | | | | | | Avoid confusion between the ARCH variable of configure/config-host.mak and the same-named variable of meson.build. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: unify x86_64 and x32Paolo Bonzini2021-12-181-2/+1Star
| | | | | | | | | | | | | | | The only difference between the two, as far as either configure or Meson are concerned, is in the multilib flags passed to the compiler. For QEMU, this fixes the handling of TYPE_OLDDEVT in include/exec/user/thunk.h and enables testing of dirty ring buffer, because both are using HOST_X86_64. For tests/tcg, this means that on a hypothetical x32 host the cross compiler will not be used to build the tests. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Move the libssh setup from configure to meson.buildThomas Huth2021-12-151-4/+9
| | | | | | | | It's easier to do this in meson.build now. Message-Id: <20211209144801.148388-1-thuth@redhat.com> Acked-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingRichard Henderson2021-11-191-13/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bugfixes for 6.2. # gpg: Signature made Fri 19 Nov 2021 10:33:29 AM CET # 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: chardev/wctable: don't free the instance in wctablet_chr_finalize meson.build: Support ncurses on MacOS and OpenBSD docs: Spell QEMU all caps qtest/am53c974-test: add test for reset before transfer esp: ensure that async_len is reset to 0 during esp_hard_reset() nvmm: Fix support for stable version meson: fix botched compile check conversions Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * meson.build: Support ncurses on MacOS and OpenBSDStefan Weil2021-11-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MacOS provides header files for curses 5.7 with support for wide characters, but requires _XOPEN_SOURCE_EXTENDED=1 to activate that. By default those old header files are used even if there is a newer Homebrew installation of ncurses 6.2 available. Change also the old macro definition of NCURSES_WIDECHAR and set it to 1 like it is done in newer versions of curses.h when _XOPEN_SOURCE_EXTENDED=1 is defined. OpenBSD has the same version of ncurses and needs the same fix. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Brad Smith <brad@comstyle.com> Message-Id: <20211117205355.1392292-1-sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * nvmm: Fix support for stable versionnia2021-11-191-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NVMM user version 1 is the version being shipped with netbsd-9, which is the most recent stable branch of NetBSD. This makes it possible to use the NVMM accelerator on the most recent NetBSD release, 9.2, which lacks nvmm_cpu_stop. (CC'ing maintainers) Signed-off-by: Nia Alarie <nia@NetBSD.org> Reviewed-by: Kamil Rytarowski <kamil@netbsd.org> Message-Id: <YWblCe2J8GwCaV9U@homeworld.netbsd.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson: fix botched compile check conversionsPaolo Bonzini2021-11-161-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bunch of incorrect conversions from configure to Meson, which result in different outcomes with --extra-cflags=-Werror. pthread_setname_np needs "#define _GNU_SOURCE" on Linux (which I am using also for the non-Linux check, so that it correctly fails with an error about having too few parameters). Fix struct checks to use has_type instead of has_symbol, and "#define _GNU_SOURCE" too in the case of struct mmsghdr. Remove an apostrophe that ended up at the end of a #include line. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | meson.build: Merge riscv32 and riscv64 cpu familyRichard Henderson2021-11-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In ba0e73336200, we merged riscv32 and riscv64 in configure. However, meson does not treat them the same. We need to merge them here as well. Fixes: ba0e73336200 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20211116095042.335224-1-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
* | Merge tag 'pull-nbd-2021-11-16' of https://repo.or.cz/qemu/ericb into stagingRichard Henderson2021-11-161-1/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nbd patches for 2021-11-16 - Rich Jones: Add 'qemu-nbd --selinux-label' option for running Unix socket with appropriate SELinux labeling - Eric Blake: Address clang sanitizer warning # gpg: Signature made Tue 16 Nov 2021 05:32:26 PM CET # 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-2021-11-16' of https://repo.or.cz/qemu/ericb: nbd/server: Add --selinux-label option nbd/server: Silence clang sanitizer warning Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * | nbd/server: Add --selinux-label optionRichard W.M. Jones2021-11-161-1/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under SELinux, Unix domain sockets have two labels. One is on the disk and can be set with commands such as chcon(1). There is a different label stored in memory (called the process label). This can only be set by the process creating the socket. When using SELinux + SVirt and wanting qemu to be able to connect to a qemu-nbd instance, you must set both labels correctly first. For qemu-nbd the options to set the second label are awkward. You can create the socket in a wrapper program and then exec into qemu-nbd. Or you could try something with LD_PRELOAD. This commit adds the ability to set the label straightforwardly on the command line, via the new --selinux-label flag. (The name of the flag is the same as the equivalent nbdkit option.) A worked example showing how to use the new option can be found in this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1984938 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1984938 Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> [eblake: rebase to configure changes, reject --selinux-label if it is not compiled in or not used on a Unix socket] Note that we may relax some of these restrictions at a later date, such as making it possible to label a TCP socket, although it may be smarter to do so as a generic QMP action rather than more one-off command lines in qemu-nbd. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20211115202944.615966-1-eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [eblake: adjust meson output as suggested by thuth] Signed-off-by: Eric Blake <eblake@redhat.com>
* / meson: remove useless libdl testPaolo Bonzini2021-11-161-7/+1Star
|/ | | | | | | | | | | | dlopen is never used after it is sought via cc.find_library, because plugins use gmodule instead; remove the test. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20211110092454.30916-1-pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211115142915.3797652-5-alex.bennee@linaro.org>
* tcg: Remove TCI experimental statusPhilippe Mathieu-Daudé2021-11-111-2/+2
| | | | | | | | | | | | | | The following commits (released in v6.0.0) made raised the quality of the TCI backend to the other TCG architectures, thus is is not considerated experimental anymore: - c6fbea47664..2f74f45e32b - dc09f047edd..9e9acb7b348 - b6139eb0578..2fc6f16ca5e - dbcbda2cd84..5e8892db93f Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211106111457.517546-1-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* meson: Fix 'interpretor' typoPhilippe Mathieu-Daudé2021-11-091-1/+1
| | | | | | | | | | | Fix a typo from commit fa2f7b0b9b7 ("meson: Warn when TCI is selected but TCG backend is available"). Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20210521103423.2780345-1-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* meson: perform snappy test with the C++ compiler if usedPaolo Bonzini2021-11-081-1/+5
| | | | | | | | | Snappy is written in C++ and as such needs to link against libstdc++. When linking statically, this means that the compile test cannot succeed unless performed with a C++ compiler. Do so if link_language is set to C++; if it is C, the test will usually fail and snappy will be disabled. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ebpf: really include it only in system emulatorsPaolo Bonzini2021-11-041-2/+0Star
| | | | | | | | | | | | | | eBPF libraries are being included in user emulators, which is useless and also breaks --static compilation if a shared library for libbpf is present in the system. Reported-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20211012162252.263933-1-pbonzini@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-bt: Warner Losh <imp@bsdimp.com> Message-Id: <20211026102234.3961636-13-alex.bennee@linaro.org>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingRichard Henderson2021-11-031-21/+9Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Build system fixes and cleanups * DMA support in the multiboot option ROM * Rename default-bus-bypass-iommu * Deprecate -watchdog and cleanup -watchdog-action * HVF fix for <PAGE_SIZE regions * Support TSC scaling for AMD nested virtualization * Fix for ESP fuzzing bug # gpg: Signature made Tue 02 Nov 2021 10:57:37 AM EDT # 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] * remotes/bonzini/tags/for-upstream: (27 commits) configure: fix --audio-drv-list help message configure: Remove the check for the __thread keyword Move the l2tpv3 test from configure to meson.build meson: remove unnecessary coreaudio test program meson: remove pointless warnings meson.build: Allow to disable OSS again meson: bump submodule to 0.59.3 qtest/am53c974-test: add test for cancelling in-flight requests esp: ensure in-flight SCSI requests are always cancelled KVM: SVM: add migration support for nested TSC scaling hw/i386: fix vmmouse registration watchdog: remove select_watchdog_action vl: deprecate -watchdog watchdog: add information from -watchdog help to -device help hw/i386: Rename default_bus_bypass_iommu hvf: Avoid mapping regions < PAGE_SIZE as ram configure: do not duplicate CPU_CFLAGS into QEMU_LDFLAGS configure: remove useless NPTL probe target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types optionrom: add a DMA-enabled multiboot ROM ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * Move the l2tpv3 test from configure to meson.buildThomas Huth2021-11-021-0/+8
| | | | | | | | | | | | | | | | | | | | And while we're at it, also provide a proper entry for this feature in meson_options.txt, so that people who don't need it have a knob to disable this feature. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20211028185910.1729744-3-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson: remove unnecessary coreaudio test programPaolo Bonzini2021-11-021-16/+0Star
| | | | | | | | | | | | | | | | | | | | AudioGetCurrentHostTime has been present forever, so the test is not enforcing a specific version of macOS. In fact the test was broken since it was not linking against the coreaudio dependency; just remove it. Fixes: 87430d5b13 ("configure, meson: move audio driver detection to Meson", 2021-10-14) Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson: remove pointless warningsPaolo Bonzini2021-11-021-4/+0Star
| | | | | | | | | | | | | | | | | | Meson tests sometimes warn if the required libraries and headers are present but a test program fails to link. In the case of DirectSound and OSS, however, there is no test program so there is no need to warn. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>