- Jun 21, 2021
-
-
Richard Henderson authored
At present, we're referencing env->psw.mask directly, which fails to ensure that env->cc_op is incorporated or updated. Use s390_cpu_{set_psw,get_psw_mask} to fix this. Mirror the kernel's cleaning of the psw.mask in save_sigregs and restore_sigregs. Ignore PSW_MASK_RI for now, as qemu does not support that. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Tested-by:
jonathan.albrecht <jonathan.albrecht@linux.vnet.ibm.com> Tested-by:
<ruixin.bao@ibm.com> Message-Id: <20210615030744.1252385-6-richard.henderson@linaro.org> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Let's check for S390_FEAT_VECTOR_ENH and set HWCAP_S390_VXRS_EXT accordingly. Add all missing HWCAP defined in upstream Linux. Cc: Laurent Vivier <laurent@vivier.eu> Acked-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210608092337.12221-25-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
- Jun 20, 2021
-
-
Michael Forney authored
_sigev_un._tid is an internal glibc field and is not available on musl libc. The sigevent(7) man page and Linux UAPI headers both use sigev_notify_thread_id as a public way to access this field. musl libc supports this field since 1.2.2[0], and glibc plans to add support as well[1][2]. If sigev_notify_thread_id is not available, fall back to _sigev_un._tid as before. [0] http://git.musl-libc.org/cgit/musl/commit/?id=7c71792e87691451f2a6b76348e83ad1889f1dcb [1] https://www.openwall.com/lists/musl/2019/08/01/5 [2] https://sourceware.org/bugzilla/show_bug.cgi?id=27417 Signed-off-by:
Michael Forney <mforney@mforney.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210526035556.7931-1-mforney@mforney.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Michael Forney authored
The _POSIX_C_SOURCE and _XOPEN_SOURCE macros are used by the application to indicate to libc which declarations it should expose. Since qemu does not define them anywhere, it does not make sense to check their value. Instead, since the intent is to determine whether the host struct stat supports the st_*tim fields, use the configure test result which does exactly that. Signed-off-by:
Michael Forney <mforney@mforney.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210526035531.7871-1-mforney@mforney.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Khem Raj authored
glibc 2.34 is now checking for this in hwcaps at runtime [1] and failing to run the binary if machine does not support 128bit IEEE fp Fixes Fatal glibc error: CPU lacks float128 support (POWER 9 or later required) [1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d337345ce145e23c5f3a956f349d924fdf54ce2d;hp=eb24865637a271ab7dad13190330105eab0d478d Signed-off-by:
Khem Raj <raj.khem@gmail.com> Cc: Florian Weimer <fweimer@redhat.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210614191729.2981488-1-raj.khem@gmail.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Ilya Leoshkevich authored
The kernel allows doing this, so let's allow this in qemu as well. Valgrind relies on this. Signed-off-by:
Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210601145600.3131040-2-iii@linux.ibm.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
YAMAMOTO Takashi authored
Used by runc. Signed-off-by:
YAMAMOTO Takashi <yamamoto@midokura.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210531055019.10149-6-yamamoto@midokura.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 17, 2021
-
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210614144245.17660-1-alex.bennee@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 15, 2021
-
-
Michael Forney authored
This check is to ensure that the loop in signal_table_init() from SIGRTMIN to SIGRTMAX falls within the bounds of host_to_target_signal_table (_NSIG). However, it is not critical, since _NSIG is already defined to be the one larger than the largest signal supported by the system (as specified in the upcoming POSIX revision[0]). musl libc does not define __SIGRTMAX, so disabling this check when it is missing fixes one of the last remaining errors when building qemu. [0] https://www.austingroupbugs.net/view.php?id=741 Signed-off-by:
Michael Forney <mforney@mforney.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210526190203.4255-1-mforney@mforney.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Signal the translator to use host atomic instructions for guest operations, insofar as it is possible. This is the best we can do to allow the guest to interact atomically with other processes. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/121 Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210612060828.695332-1-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 11, 2021
-
-
Richard Henderson authored
Instead of delaying tcg_region_init until after tcg_prologue_init is complete, do tcg_region_init first and let tcg_prologue_init shrink the first region by the size of the generated prologue. Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jun 05, 2021
-
-
Philippe Mathieu-Daudé authored
Keep bitmask_transtbl in .rodata by marking the arrays const. Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210517055243.830491-1-f4bug@amsat.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jun 03, 2021
-
-
Richard Henderson authored
Use an enumeration instead of raw 32/64/80 values. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210525225817.400336-12-richard.henderson@linaro.org Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Jun 02, 2021
-
-
Stefano Garzarella authored
Commit e50caf4a ("tracing: convert documentation to rST") converted docs/devel/tracing.txt to docs/devel/tracing.rst. We still have several references to the old file, so let's fix them with the following command: sed -i s/tracing.txt/tracing.rst/ $(git grep -l docs/devel/tracing.txt) Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210517151702.109066-2-sgarzare@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 25, 2021
-
-
Richard Henderson authored
Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210525010358.152808-92-richard.henderson@linaro.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- May 19, 2021
-
-
Richard Henderson authored
The translation of branch instructions always results in exit from the TB. Remove the synthetic "exception" after no more uses. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210517205025.3777947-4-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Remove the synthetic "exception" after no more uses. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210517205025.3777947-3-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- May 18, 2021
-
-
Ilya Leoshkevich authored
Provide the following definitions required by the common code: * ELF_NREG: with the value of sizeof(s390_regs) / sizeof(long). * target_elf_gregset_t: define it like all the other arches do. * elf_core_copy_regs(): similar to kernel's s390_regs_get(). * USE_ELF_CORE_DUMP. * ELF_EXEC_PAGESIZE. Signed-off-by:
Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20210413205608.22587-1-iii@linux.ibm.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Ilya Leoshkevich authored
The current code dumps the memory between arg_start and arg_end, which contains the argv pointers. This results in the Core was generated by `<garbage>` message when opening the core file in GDB. This is because the code is supposed to dump the actual arg strings. Fix by using arg_strings and env_strings instead of arg_start and arg_end. Signed-off-by:
Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20210413205814.22821-1-iii@linux.ibm.com> [lv: add missing braces] Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Initialize variables instead of elses. Use an else instead of a goto. Add braces. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210422230227.314751-8-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
There's no longer a difference between the alpha code and the generic code. There is a type difference in target_old_sigaction.sa_flags, which can be resolved with a very much smaller ifdef, which allows us to finish sharing the target_sigaction definition. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210422230227.314751-7-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
This means that we can share the TARGET_NR_rt_sigaction code, and the target_rt_sigaction structure is unused. Untangling the ifdefs so that target_sigaction can be shared will wait until the next patch. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210422230227.314751-6-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Do not access a field that may not be present. This will become an issue when sharing more code in the next patch. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210422230227.314751-5-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
The value of ka_restorer needs to be saved in sigact_table. At the moment, the attempt to save it in do_syscall is improperly clobbering user memory. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210422230227.314751-4-richard.henderson@linaro.org> [lv: remove tab] Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Use ka_restorer, in line with TARGET_ARCH_HAS_KA_RESTORER vs TARGET_ARCH_HAS_SA_RESTORER, since Alpha passes this field as a syscall argument. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210422230227.314751-3-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
We incorrectly used the offset of the non-rt sigframe. Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210422230227.314751-2-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Daniel P. Berrangé authored
The GDateTime APIs provided by GLib avoid portability pitfalls, such as some platforms where 'struct timeval.tv_sec' field is still 'long' instead of 'time_t'. When combined with automatic cleanup, GDateTime often results in simpler code too. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210505103702.521457-7-berrange@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Giuseppe Musacchio authored
The implicit cast from abi_long to size_t may introduce an intermediate unwanted sign-extension of the value for 32bit targets running on 64bit hosts. Signed-off-by:
Giuseppe Musacchio <thatlemon@gmail.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210503174159.54302-3-thatlemon@gmail.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Giuseppe Musacchio authored
Signed-off-by:
Giuseppe Musacchio <thatlemon@gmail.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <20210503174159.54302-2-thatlemon@gmail.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-16-richard.henderson@linaro.org> [lv: fix indentation] Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- May 15, 2021
-
-
Richard Henderson authored
Reorder the function bodies to correspond to the kernel source. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-15-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
At point of usage, it's not immediately obvious that we don't need a loop to copy these arrays. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-14-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
The original value of frame_addr is still required for its use in the call to unlock_user_struct below. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-13-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
In order to properly present these arguments, we need to add code to target/s390x to record LowCore parameters for user-only. But in the meantime, at least zero the missing last_break argument, and fixup the comment style in the vicinity. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-12-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Note that PSW_ADDR_{64,32} are called PSW_MASK_{EA,BA} in the kernel source. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-11-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-10-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
The "save" routines copied from the kernel, which are currently commented out, are unnecessary in qemu. We can copy from env where the kernel needs special instructions. Fix comment style. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-9-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-8-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Richard Henderson authored
Using the host address of &frame->sregs is incorrect. We need the guest address. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-7-richard.henderson@linaro.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-