653b87eb | 12-Jan-2021 |
Roman Bolshakov <r.bolshakov@yadro.com> |
tcg: Toggle page execution for Apple Silicon
Pages can't be both write and executable at the same time on Apple Silicon. macOS provides public API to switch write protection [1] for JIT applications
tcg: Toggle page execution for Apple Silicon
Pages can't be both write and executable at the same time on Apple Silicon. macOS provides public API to switch write protection [1] for JIT applications, like TCG.
1. https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon
Tested-by: Alexander Graf <agraf@csgraf.de> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20210113032806.18220-1-r.bolshakov@yadro.com> [rth: Inline the qemu_thread_jit_* functions; drop the MAP_JIT change for a follow-on patch.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
65269192 | 17-Jan-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
accel/tcg: Restrict cpu_io_recompile() from other accelerators
As cpu_io_recompile() is only called within TCG accelerator in cputlb.c, declare it locally.
Signed-off-by: Philippe Mathieu-Daudé <f4
accel/tcg: Restrict cpu_io_recompile() from other accelerators
As cpu_io_recompile() is only called within TCG accelerator in cputlb.c, declare it locally.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210117164813.4101761-6-f4bug@amsat.org> [rth: Adjust vs changed tb_flush_jmp_cache patch.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ee64036a | 17-Jan-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
accel/tcg: Declare missing cpu_loop_exit*() stubs
cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, and are not available when TCG accelerator is not built. Add stubs so linkin
accel/tcg: Declare missing cpu_loop_exit*() stubs
cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, and are not available when TCG accelerator is not built. Add stubs so linking without TCG succeed.
Problematic files:
- hw/semihosting/console.c in qemu_semihosting_console_inc() - hw/ppc/spapr_hcall.c in h_confer() - hw/s390x/ipl.c in s390_ipl_reset_request() - hw/misc/mips_itu.c
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210117164813.4101761-5-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
c03f041f | 21-Jan-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
accel/tcg: Restrict tb_gen_code() from other accelerators
tb_gen_code() is only called within TCG accelerator, declare it locally.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id
accel/tcg: Restrict tb_gen_code() from other accelerators
tb_gen_code() is only called within TCG accelerator, declare it locally.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210117164813.4101761-4-f4bug@amsat.org> [rth: Adjust vs changed tb_flush_jmp_cache patch.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
0f4abea8 | 20-Jan-2021 |
Richard Henderson <richard.henderson@linaro.org> |
accel/tcg: Move tb_flush_jmp_cache() to cputlb.c
Move and make the function static, as the only users are here in cputlb.c.
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Ric
accel/tcg: Move tb_flush_jmp_cache() to cputlb.c
Move and make the function static, as the only users are here in cputlb.c.
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
d9d699dd | 17-Jan-2021 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
accel/tcg: Make cpu_gen_init() static
cpu_gen_init() is TCG specific, only used in tcg/translate-all.c. No need to export it to other accelerators, declare it statically.
Reviewed-by: Claudio Fonta
accel/tcg: Make cpu_gen_init() static
cpu_gen_init() is TCG specific, only used in tcg/translate-all.c. No need to export it to other accelerators, declare it statically.
Reviewed-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210117164813.4101761-2-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
bfff072c | 22-Sep-2020 |
Douglas Crosher <dtc-ubuntu@scieneer.com> |
tcg: update the cpu running flag in cpu_exec_step_atomic
The cpu_exec_step_atomic() function is called with the cpu->running clear and proceeds to run target code without setting this flag. If this
tcg: update the cpu running flag in cpu_exec_step_atomic
The cpu_exec_step_atomic() function is called with the cpu->running clear and proceeds to run target code without setting this flag. If this target code generates an exception then handle_cpu_signal() will unnecessarily abort. For example if atomic code generates a memory protection fault.
This patch at least sets and clears this running flag, and adds some assertions to help detect other cases.
Signed-off-by: Douglas Crosher <dtc-ubuntu@scieneer.com> Message-Id: <a272c656-f7c5-019d-1cc0-499b8f80f2fc@scieneer.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
eb8b1a79 | 18-Jan-2021 |
Jiaxun Yang <jiaxun.yang@flygoat.com> |
accel/kvm: avoid using predefined PAGE_SIZE
As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h.
PAGE_SIZE is used in included kernel uapi headers.
To prevent coll
accel/kvm: avoid using predefined PAGE_SIZE
As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h.
PAGE_SIZE is used in included kernel uapi headers.
To prevent collosion of definition, we discard PAGE_SIZE from defined by libc and take QEMU's variable.
[1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <20210118063808.12471-8-jiaxun.yang@flygoat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
80c44bba | 17-Apr-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Use tcg_constant_{i32,i64} with tcg plugins
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
de2fac62 | 05-Nov-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Remove TCG_TARGET_SUPPORT_MIRROR
Now that all native tcg hosts support splitwx, remove the define. Replace the one use with a test for CONFIG_TCG_INTERPRETER.
Reviewed-by: Joelle van Dyne <j@g
tcg: Remove TCG_TARGET_SUPPORT_MIRROR
Now that all native tcg hosts support splitwx, remove the define. Replace the one use with a test for CONFIG_TCG_INTERPRETER.
Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
d1861aa4 | 04-Nov-2020 |
Richard Henderson <richard.henderson@linaro.org> |
accel/tcg: Add mips support to alloc_code_gen_buffer_splitwx_memfd
Re-use the 256MiB region handling from alloc_code_gen_buffer_anon, and replace that with the shared file mapping.
Signed-off-by: R
accel/tcg: Add mips support to alloc_code_gen_buffer_splitwx_memfd
Re-use the 256MiB region handling from alloc_code_gen_buffer_anon, and replace that with the shared file mapping.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
eba40358 | 29-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Return the TB pointer from the rx region from exit_tb
This produces a small pc-relative displacement within the generated code to the TB structure that preceeds it.
Reviewed-by: Joelle van Dyn
tcg: Return the TB pointer from the rx region from exit_tb
This produces a small pc-relative displacement within the generated code to the TB structure that preceeds it.
Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
6f70ddee | 29-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
accel/tcg: Support split-wx for darwin/iOS with vm_remap
Cribbed from code posted by Joelle van Dyne <j@getutm.app>, and rearranged to a cleaner structure.
Reviewed-by: Joelle van Dyne <j@getutm.ap
accel/tcg: Support split-wx for darwin/iOS with vm_remap
Cribbed from code posted by Joelle van Dyne <j@getutm.app>, and rearranged to a cleaner structure.
Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
a8c35b2c | 29-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
accel/tcg: Support split-wx for linux with memfd
We cannot use a real temp file, because we would need to find a filesystem that does not have noexec enabled. However, a memfd is not associated wit
accel/tcg: Support split-wx for linux with memfd
We cannot use a real temp file, because we would need to find a filesystem that does not have noexec enabled. However, a memfd is not associated with any filesystem.
Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
a35b3e14 | 28-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Add --accel tcg,split-wx property
Plumb the value through to alloc_code_gen_buffer. This is not supported by any os or tcg backend, so for now enabling it will result in an error.
Reviewed-by
tcg: Add --accel tcg,split-wx property
Plumb the value through to alloc_code_gen_buffer. This is not supported by any os or tcg backend, so for now enabling it will result in an error.
Reviewed-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
6bc14423 | 28-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Use Error with alloc_code_gen_buffer
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 re
tcg: Use Error with alloc_code_gen_buffer
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>
show more ...
|
d9971435 | 29-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Make DisasContextBase.tb const
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 t
tcg: Make DisasContextBase.tb const
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>
show more ...
|
1acbad0f | 29-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Adjust tb_target_set_jmp_target for split-wx
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.he
tcg: Adjust tb_target_set_jmp_target for split-wx
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>
show more ...
|
db0c51a3 | 28-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Introduce tcg_splitwx_to_{rx,rw}
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
tcg: Introduce tcg_splitwx_to_{rx,rw}
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>
show more ...
|
4846cd37 | 30-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Add in_code_gen_buffer
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.henders
tcg: Add in_code_gen_buffer
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>
show more ...
|
8b5c2b62 | 28-Oct-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Move tcg epilogue pointer out of TCGContext
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 va
tcg: Move tcg epilogue pointer out of TCGContext
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>
show more ...
|
aadac5b3 | 06-Jan-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
From Alex's pull request: * improve cross-build KVM coverage * new --without-default-features configure flag * ad
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into 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
show more ...
|
6d3ef048 | 15-Dec-2020 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Use memset for large vector byte replication
In f47db80cc07, we handled odd-sized tail clearing for the case of hosts that have vector operations, but did not handle the case of hosts that do n
tcg: Use memset for large vector byte replication
In f47db80cc07, we handled odd-sized tail clearing for the case of hosts that have vector operations, but did not handle the case of hosts that do not have vector ops.
This was ok until e2e7168a214b, which changed the encoding of simd_desc such that the odd sizes are impossible.
Add memset as a tcg helper, and use that for all out-of-line byte stores to vectors. This includes, but is not limited to, the tail clearing operation in question.
Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/bugs/1907817 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
0a189110 | 17-Nov-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
meson: cleanup Kconfig.host handling
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
meson: cleanup Kconfig.host handling
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>
show more ...
|
3b9bd3f4 | 16-Dec-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
remove TCG includes from common code
Enable removing tcg/$tcg_arch from the include path when TCG is disabled. Move translate-all.h to include/exec, since stubs exist for the functions defined there
remove TCG includes from common code
Enable removing tcg/$tcg_arch from the include path when TCG is disabled. Move translate-all.h to include/exec, since stubs exist for the functions defined therein.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|