summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tcg: Use Error with alloc_code_gen_bufferRichard Henderson2021-01-071-26/+34
| | | | | | | | | | Report better error messages than just "could not allocate". Let alloc_code_gen_buffer set ctx->code_gen_buffer_size and ctx->code_gen_buffer, and simply return bool. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Make tb arg to synchronize_from_tb constRichard Henderson2021-01-0712-12/+23
| | | | | | | | | | | | There is nothing within the translators that ought to be changing the TranslationBlock data, so make it const. This does not actually use the read-only copy of the data structure that exists within the rx region. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Make DisasContextBase.tb constRichard Henderson2021-01-076-8/+8
| | | | | | | | | | | | There is nothing within the translators that ought to be changing the TranslationBlock data, so make it const. This does not actually use the read-only copy of the data structure that exists within the rx region. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Adjust tb_target_set_jmp_target for split-wxRichard Henderson2021-01-0714-42/+44
| | | | | | | Pass both rx and rw addresses to tb_target_set_jmp_target. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Adjust tcg_register_jit for constRichard Henderson2021-01-0710-14/+14
| | | | | | | | We must change all targets at once, since all must match the declaration in tcg.c. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Adjust tcg_out_label for constRichard Henderson2021-01-072-8/+8
| | | | | | | | | | Simplify the arguments to always use s->code_ptr instead of take it as an argument. That makes it easy to ensure that the value_ptr is always the rx version. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Adjust tcg_out_call for constRichard Henderson2021-01-0710-19/+19
| | | | | | | | | We must change all targets at once, since all must match the declaration in tcg.c. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Adjust TCGLabel for constRichard Henderson2021-01-077-9/+10
| | | | | | | | | Change TCGLabel.u.value_ptr to const, and initialize it with tcg_splitwx_to_rx. Propagate const through tcg/host/ only as far as needed to avoid errors from the value_ptr change. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Introduce tcg_splitwx_to_{rx,rw}Richard Henderson2021-01-0713-40/+105
| | | | | | | | | | | Add two helper functions, using a global variable to hold the displacement. The displacement is currently always 0, so no change in behaviour. Begin using the functions in tcg common code only. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add in_code_gen_bufferRichard Henderson2021-01-072-18/+19
| | | | | | | Create a function to determine if a pointer is within the buffer. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Move tcg epilogue pointer out of TCGContextRichard Henderson2021-01-0711-15/+16
| | | | | | | | This value is constant across all thread-local copies of TCGContext, so we might as well move it out of thread-local storage. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Move tcg prologue pointer out of TCGContextRichard Henderson2021-01-073-8/+14
| | | | | | | | | | | | | | | | | This value is constant across all thread-local copies of TCGContext, so we might as well move it out of thread-local storage. Use the correct function pointer type, and name the variable tcg_qemu_tb_exec, which means that we are able to remove the macro that does the casting. Replace HAVE_TCG_QEMU_TB_EXEC with CONFIG_TCG_INTERPRETER, as this is somewhat clearer in intent. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* util: Specialize flush_idcache_range for aarch64Richard Henderson2021-01-071-0/+69
| | | | | | | | | | | | | For darwin, the CTR_EL0 register is not accessible, but there are system routines that we can use. For other hosts, copy the single pointer implementation from libgcc and modify it to support the double pointer interface we require. This halves the number of cache operations required when split-rwx is enabled. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* util: Enhance flush_icache_range with separate data pointerRichard Henderson2021-01-079-30/+51
| | | | | | | | | | | | | We are shortly going to have a split rw/rx jit buffer. Depending on the host, we need to flush the dcache at the rw data pointer and flush the icache at the rx code pointer. For now, the two passed pointers are identical, so there is no effective change in behaviour. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Do not flush icache for interpreterRichard Henderson2021-01-071-0/+4
| | | | | | | | This is currently a no-op within tci/tcg-target.h, but is about to be moved to a more generic location. Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* util/oslib: Assert qemu_try_memalign() alignment is a power of 2Philippe Mathieu-Daudé2021-01-072-0/+3
| | | | | | | | | | | | | | | | | qemu_try_memalign() expects a power of 2 alignment: - posix_memalign(3): The address of the allocated memory will be a multiple of alignment, which must be a power of two and a multiple of sizeof(void *). - _aligned_malloc() The alignment value, which must be an integer power of 2. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201021173803.2619054-3-philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* util/oslib-win32: Use _aligned_malloc for qemu_try_memalignRichard Henderson2021-01-071-7/+4Star
| | | | | | | | | | We do not need or want to be allocating page sized quanta. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-Id: <20201018164836.1149452-1-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Introduce INDEX_op_qemu_st8_i32Richard Henderson2021-01-0715-12/+49
| | | | | | | | | Enable this on i386 to restrict the set of input registers for an 8-bit store, as required by the architecture. This removes the last use of scratch registers for user-only mode. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/i386: Adjust TCG_TARGET_HAS_MEMORY_BSWAPRichard Henderson2021-01-072-75/+47Star
| | | | | | | | Always true when movbe is available, otherwise leave this to generic code. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* linux-user: Conditionalize TUNSETVNETLERichard Henderson2021-01-071-0/+2
| | | | | | | | | This fixes the build for older ppc64 kernel headers. Fixes: 6addf06a3c4 Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-060121-4' ↵Peter Maydell2021-01-064-6/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Testing updates (back to green) - include ccache in Debian 10 docker image - iotests: drop 312 from auto group - bound reading of s390x framebuffer file - cirrus: drop non-x86 tests so we complete # gpg: Signature made Wed 06 Jan 2021 17:31:14 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-060121-4: cirrus: don't run full qtest on macOS tests/acceptance: bound the size of readline in s390_ccw_virtio tests/iotests: drop test 312 from auto group tests/docker: Include 'ccache' in Debian base image Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * cirrus: don't run full qtest on macOSDaniel P. Berrangé2021-01-061-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Cirrus CI macOS build hosts have exhibited a serious performance degradation in recent months. For example the "qom-test" qtest takes over an hour for only the qemu-system-aarch64 binary. This is as much 20-40 times slower than other environments. The other qtests all show similar performance degradation, as do many of the unit tests. This does not appear related to QEMU code changes, since older git commits which were known to fully complete in less than 1 hour on Cirrus CI now also show similar bad performance. Either Cirrus CI performance has degraded, or an change in its environment has exposed a latent bug widely affecting all of QEMU. Debugging the qom-test showed no easily identified large bottleneck - every step of the test execution was simply slower. macOS builds/tests run outside Cirrus CI show normal performance. With an inability to identify any obvious problem, the only viable way to get a reliably completing Cirrus CI macOS job is to cut out almost all of the qtests. We choose to run the x86_64 target only, since that has very few machine types and thus is least badly impacted in the qom-test execution. With this change, the macOS jobs complete in approx 35 minutes. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Message-Id: <20210106114159.981538-1-berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
| * tests/acceptance: bound the size of readline in s390_ccw_virtioAlex Bennée2021-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The read binary data as text via a PPM export of the frame buffer seems a bit sketchy and it did blow up in the real world when the assertion failed: https://gitlab.com/qemu-project/qemu/-/jobs/943183183 However short of cleaning up the test to be more binary focused at least limit the attempt to dump the whole file as hexified zeros in the logs. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Acked-by: Halil Pasic <pasic@linux.ibm.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210105124405.15424-1-alex.bennee@linaro.org>
| * tests/iotests: drop test 312 from auto groupAlex Bennée2021-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "auto" documentation states: That means they should run with every QEMU binary (also non-x86) which is not the case as the check-system-fedora build which only includes a rag tag group of rare and deprecated targets doesn't support the virtio device required. Fixes: ef9bba1484b ("quorum: Implement bdrv_co_block_status()") Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210105100402.12350-1-alex.bennee@linaro.org>
| * tests/docker: Include 'ccache' in Debian base imagePhilippe Mathieu-Daudé2021-01-061-0/+1
|/ | | | | | | | | Include the 'ccache' package to speed up compilation. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201213211601.253530-1-f4bug@amsat.org> Fixes: d6db2a1cdf ("docker: add debian-buster-arm64-cross") Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ↵Peter Maydell2021-01-0667-874/+1013
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging From Alex's pull request: * improve cross-build KVM coverage * new --without-default-features configure flag * add __repr__ for ConsoleSocket for debugging * build tcg tests with -Werror * test 32 bit builds with fedora * remove last traces of debian9 * hotfix for centos8 powertools repo * Move lots of feature detection code to meson (Alex, myself) * CFI and LTO support (Daniele) * test-char dangling pointer (Eduardo) * Build system and win32 fixes (Marc-André) * Initialization fixes (myself) * TCG include cleanup (Richard, myself) * x86 'int N' fix (Peter) # gpg: Signature made Wed 06 Jan 2021 09:21:25 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: (52 commits) win32: drop fd registration to the main-loop on setting non-block configure: move tests/qemu-iotests/common.env generation to meson meson.build: convert --with-default-devices to meson libattr: convert to meson cap_ng: convert to meson virtfs: convert to meson seccomp: convert to meson zstd: convert to meson lzfse: convert to meson snappy: convert to meson lzo: convert to meson rbd: convert to meson libnfs: convert to meson libiscsi: convert to meson bzip2: convert to meson glusterfs: convert to meson curl: convert to meson curl: remove compatibility code, require 7.29.0 brlapi: convert to meson configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # trace/meson.build
| * win32: drop fd registration to the main-loop on setting non-blockMarc-André Lureau2021-01-061-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Low-level fd users from QEMU use aio_set_fd_handler(), which handles event registration with the main loop; qemu_fd_register() is only needed together with the main loop's poll notifiers, of which SLIRP is the only user. This removes a dependency from oslib-win32.c to main-loop.c. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201218135712.674094-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure: move tests/qemu-iotests/common.env generation to mesonPaolo Bonzini2021-01-063-7/+6Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson.build: convert --with-default-devices to mesonPaolo Bonzini2021-01-063-11/+9Star
| | | | | | | | | | | | | | Pass the boolean option directly instead of writing CONFIG_MINIKCONF_MODE to config-host.mak. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * libattr: convert to mesonPaolo Bonzini2021-01-063-44/+41Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * cap_ng: convert to mesonPaolo Bonzini2021-01-064-35/+30Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * virtfs: convert to mesonPaolo Bonzini2021-01-063-31/+33
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * seccomp: convert to mesonPaolo Bonzini2021-01-066-37/+15Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * zstd: convert to mesonPaolo Bonzini2021-01-064-31/+13Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * lzfse: convert to mesonPaolo Bonzini2021-01-063-30/+23Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * snappy: convert to mesonPaolo Bonzini2021-01-063-31/+23Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * lzo: convert to mesonPaolo Bonzini2021-01-063-31/+24Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * rbd: convert to mesonPaolo Bonzini2021-01-063-33/+25Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * libnfs: convert to mesonPaolo Bonzini2021-01-023-26/+12Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * libiscsi: convert to mesonPaolo Bonzini2021-01-025-31/+14Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * bzip2: convert to mesonPaolo Bonzini2021-01-023-30/+21Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * glusterfs: convert to mesonPaolo Bonzini2021-01-023-102/+50Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * curl: convert to mesonPaolo Bonzini2021-01-024-32/+14Star
| | | | | | | | | | Reviewed-by: Daniel Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * curl: remove compatibility code, require 7.29.0Paolo Bonzini2021-01-022-35/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | cURL 7.16.0 was released in October 2006. Just remove code that is in all likelihood not being used anywhere, and require the oldest version found in currently supported distros, which is 7.29.0 from CentOS 7. pkg-config is enough for QEMU, since it does not need extra information such as the path for certicate authorities. All supported platforms today will all have pkg-config for curl, so we can drop curl-config. Suggested-by: Daniel Berrangé <berrange@redhat.com> Reviewed-by: Daniel Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * brlapi: convert to mesonPaolo Bonzini2021-01-024-32/+24Star
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSIONPaolo Bonzini2021-01-022-11/+2Star
| | | | | | | | | | | | | | version.rc can just use existing preprocessor symbols. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure: accept --enable-slirpPaolo Bonzini2021-01-021-0/+2
| | | | | | | | | | | | | | | | | | Meson understands -Dslirp=enabled, so there is no reason not to accept the configure option as well. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure: remove variable bogus_osPaolo Bonzini2021-01-021-3/+1Star
| | | | | | | | | | | | | | | | The condition can be tested also from $targetos, clean up. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure: remove useless code to check for Xen PCI passthroughPaolo Bonzini2021-01-021-12/+0Star
| | | | | | | | | | | | | | | | meson.build is already doing the same check, so remove it from configure. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson: cleanup Kconfig.host handlingPaolo Bonzini2021-01-023-36/+35Star
| | | | | | | | | | | | | | | | | | | | Build the array of command line arguments coming from config_host once for all targets. Add all accelerators to accel/Kconfig so that the command line arguments for accelerators can be computed easily in the existing "foreach sym: accelerators" loop. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>