- 10 3月, 2018 1 次提交
-
-
由 Richard Henderson 提交于
As an implementation choice, widening VL has zeroed the previously inaccessible portion of the sve registers. Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRichard Henderson <richard.henderson@linaro.org> Acked-by: NAlex Bennée <alex.bennee@linaro.org> Message-id: 20180303143823.27055-2-richard.henderson@linaro.org Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 07 3月, 2018 1 次提交
-
-
由 Michael Clark 提交于
Implementation of linux user emulation for RISC-V. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NSagar Karandikar <sagark@eecs.berkeley.edu> Signed-off-by: NMichael Clark <mjc@sifive.com>
-
- 19 2月, 2018 2 次提交
-
-
由 Samuel Thibault 提交于
We properly computed the capped mask size to be put to the application buffer, but didn't actually used it. Also, we need to return the capped mask size instead of 0 on success. Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <20180211174704.27441-1-samuel.thibault@ens-lyon.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Andreas Schwab 提交于
With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl. Signed-off-by: NAndreas Schwab <schwab@suse.de> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <mvmbmhdosb9.fsf_-_@suse.de> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
- 09 2月, 2018 1 次提交
-
-
由 Markus Armbruster 提交于
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the change to target/s390x/gen-features.c manually reverted, and blank lines around deletions collapsed. Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-3-armbru@redhat.com>
-
- 06 2月, 2018 1 次提交
-
-
由 Peter Maydell 提交于
We dropped support for ia64 host CPUs in the 2.11 release (removing the TCG backend for it, and advertising the support as being completely removed in the changelog). However there are a few bits and pieces of code still floating about. Remove those, too. We can drop the check in configure for "ia64 or hppa host?" entirely, because we don't support hppa hosts either any more. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-Id: <1516897189-11035-1-git-send-email-peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 23 1月, 2018 6 次提交
-
-
由 Andreas Schwab 提交于
This is needed for new architectures like RISC-V which do not provide any other rename-like syscall. Signed-off-by: NAndreas Schwab <schwab@suse.de> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <mvm607su9qs.fsf@suse.de> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Samuel Thibault 提交于
Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <20180112081435.21299-1-samuel.thibault@ens-lyon.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Samuel Thibault 提交于
sched_get/setaffinity linux-user syscalls were missing conversions for little/big endian, which is hairy since longs may not be the same size either. For simplicity, this just introduces loops to convert bit by bit like is done for select. Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <20180109201643.1479-1-samuel.thibault@ens-lyon.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Peter Maydell 提交于
The third argument to dup3() is a flags word which may be O_CLOEXEC. We weren't translating this flag from target to host value, which meant that if the target used a different value from the host (eg sparc guest and x86 host) the dup3() call would fail EINVAL. Do the correct translation. Fixes: https://bugs.launchpad.net/qemu/+bug/1704658Reported-by: NBruno Haible <bruno@clisp.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <1513351080-25917-1-git-send-email-peter.maydell@linaro.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Peter Maydell 提交于
The Linux struct cmsghdr is already guaranteed to be sufficiently aligned that CMSG_ALIGN(sizeof struct cmsghdr) is always equal to sizeof struct cmsghdr. Stop doing the unnecessary alignment arithmetic for host and target cmsghdr. This follows kernel commit 1ff8cebf49ed9e9ca2 and brings our TARGET_CMSG_* macros back into line with the kernel ones, as well as making them easier to understand. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <1513345976-22958-3-git-send-email-peter.maydell@linaro.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Peter Maydell 提交于
The handling of length calculations in host_to_target_cmsg() was rather confused: * when checking for whether the target cmsg header fit in the remaining buffer, we were using the host struct size, not the target size * we were setting tgt_len to "target payload + header length" but then using it as if it were the target payload length alone * in various message type cases we weren't handling the possibility that host or target buffers were truncated Fix these problems. The second one in particular is liable to result in us overrunning the guest provided buffer, since we will try to convert more data than is actually present. Fixes: https://bugs.launchpad.net/qemu/+bug/1701808Reported-by: NBruno Haible <bruno@clisp.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-Id: <1513345976-22958-2-git-send-email-peter.maydell@linaro.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
- 08 11月, 2017 5 次提交
-
-
由 Peter Maydell 提交于
SPARC is like Alpha in its handling of the rt_sigaction syscall: it takes an extra parameter 'restorer' which needs to be copied into the sa_restorer field of the sigaction struct. The order of the arguments differs slightly between SPARC and Alpha but the implementation is otherwise the same. (Compare the rt_sigaction() functions in arch/sparc/kernel/sys_sparc_64.c and arch/alpha/kernel/signal.c.) Note that this change is somewhat moot until SPARC acquires support for actually delivering RT signals. Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 James Cowgill 提交于
If an application tries to install a seccomp filter using prctl(PR_SET_SECCOMP), the filter is likely for the target instead of the host architecture. This will probably cause qemu to be immediately killed when it executes another syscall. Prevent this from happening by returning EINVAL from both seccomp prctl calls. This is the error returned by the kernel when seccomp support is disabled. Fixes: https://bugs.launchpad.net/qemu/+bug/1726394Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NJames Cowgill <james.cowgill@mips.com> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Emilio G. Cota 提交于
Signed-off-by: NEmilio G. Cota <cota@braap.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 James Clarke 提交于
Fixes: https://bugs.launchpad.net/qemu/+bug/1716767Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Tested-By: NJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: NJames Clarke <jrtc27@jrtc27.com> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Helge Deller 提交于
Add the missing defines and for TARGET_MAP_STACK and TARGET_MAP_HUGETLB for alpha, mips, ppc, x86, hppa. Fix the mmap_flags translation table to translate MAP_HUGETLB between host and target architecture, and to drop MAP_STACK. Signed-off-by: NHelge Deller <deller@gmx.de> Message-Id: <20170311183016.GA20514@ls3530.fritz.box> [rth: Drop MAP_STACK instead of translating it, since it is ignored in the kernel anyway. Fix tabs to spaces.] Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
- 25 10月, 2017 1 次提交
-
-
由 Emilio G. Cota 提交于
This enables parallel TCG code generation. However, we do not take advantage of it yet since tb_lock is still held during tb_gen_code. In user-mode we use a single TCG context; see the documentation added to tcg_region_init for the rationale. Note that targets do not need any conversion: targets initialize a TCGContext (e.g. defining TCG globals), and after this initialization has finished, the context is cloned by the vCPU threads, each of them keeping a separate copy. TCG threads claim one entry in tcg_ctxs[] by atomically increasing n_tcg_ctxs. Do not be too annoyed by the subsequent atomic_read's of that variable and tcg_ctxs; they are there just to play nice with analysis tools such as thread sanitizer. Note that we do not allocate an array of contexts (we allocate an array of pointers instead) because when tcg_context_init is called, we do not know yet how many contexts we'll use since the bool behind qemu_tcg_mttcg_enabled() isn't set yet. Previous patches folded some TCG globals into TCGContext. The non-const globals remaining are only set at init time, i.e. before the TCG threads are spawned. Here is a list of these set-at-init-time globals under tcg/: Only written by tcg_context_init: - indirect_reg_alloc_order - tcg_op_defs Only written by tcg_target_init (called from tcg_context_init): - tcg_target_available_regs - tcg_target_call_clobber_regs - arm: arm_arch, use_idiv_instructions - i386: have_cmov, have_bmi1, have_bmi2, have_lzcnt, have_movbe, have_popcnt - mips: use_movnz_instructions, use_mips32_instructions, use_mips32r2_instructions, got_sigill (tcg_target_detect_isa) - ppc: have_isa_2_06, have_isa_3_00, tb_ret_addr - s390: tb_ret_addr, s390_facilities - sparc: qemu_ld_trampoline, qemu_st_trampoline (build_trampolines), use_vis3_instructions Only written by tcg_prologue_init: - 'struct jit_code_entry one_entry' - aarch64: tb_ret_addr - arm: tb_ret_addr - i386: tb_ret_addr, guest_base_flags - ia64: tb_ret_addr - mips: tb_ret_addr, bswap32_addr, bswap32u_addr, bswap64_addr Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEmilio G. Cota <cota@braap.org> Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
-
- 17 10月, 2017 2 次提交
-
-
由 Marco A L Barbosa 提交于
Signed-off-by: NMarco A L Barbosa <malbarbo@gmail.com> Reviewed-by: NLaurent Vivier <lvivier@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
likely introduced in 3532fa74Signed-off-by: NCarlo Marcelo Arenas Belón <carenas@gmail.com> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 16 10月, 2017 2 次提交
-
-
likely introduced in 3532fa74Signed-off-by: NCarlo Marcelo Arenas Belón <carenas@gmail.com> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Riku Voipio 提交于
Since O_TMPFILE might differ between guest and host, add it to the bitmask_transtbl. While at it, fix the definitions of O_DIRECTORY etc which should arm32 according to kernel sources. This fixes open14 and openat03 ltp testcases. Fixes: https://bugs.launchpad.net/qemu/+bug/1709170
-
- 08 8月, 2017 1 次提交
-
-
由 Paolo Bonzini 提交于
This reverts commit a59629fc. This is not needed anymore because the IOThread mutex is not "magic" anymore (need not kick the CPU thread)and also because fork callbacks are only enabled at the very beginning of QEMU's execution. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 31 7月, 2017 4 次提交
-
-
由 Peter Maydell 提交于
This reverts commit bc658e4a. Some versions of gcc warn about this: linux-user/syscall.c: In function ‘do_ioctl_rt’: linux-user/syscall.c:5577:37: error: ‘host_rt_dev_ptr’ may be used uninitialized in this function [-Werror=uninitialized] and in particular the Travis builds fail; they use gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3. Revert the change to fix the travis builds. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
linux-user/syscall.c:555:25: warning: Out of bound memory access (accessed memory precedes memory block) target_fd_trans[fd] = trans; ~~~~~~~~~~~~~~~~~~~~^~~~~~~ Reported-by: Clang Static Analyzer Suggested-by: NLaurent Vivier <lvivier@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Philippe Mathieu-Daudé 提交于
linux-user/syscall.c:1627:35: warning: 1st function call argument is an uninitialized value target_saddr->sa_family = tswap16(addr->sa_family); ^~~~~~~~~~~~~~~~~~~~~~~~ linux-user/syscall.c:1629:25: warning: The left operand of '==' is a garbage value if (addr->sa_family == AF_NETLINK && len >= sizeof(struct sockaddr_nl)) { ~~~~~~~~~~~~~~~ ^ Reported-by: Clang Static Analyzer Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Philippe Mathieu-Daudé 提交于
linux-user/syscall.c:5581:9: warning: Dereference of undefined pointer value if (*host_rt_dev_ptr != 0) { ^~~~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Suggested-by: NLaurent Vivier <lvivier@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 14 7月, 2017 1 次提交
-
-
由 Alex Bennée 提交于
This was only used by the gdbstub and even then was only being set for subsequent threads. Rather the continue duplicating the number just make the gdbstub get the information from TaskState structure. Now the tid is correctly reported for all threads the bug I was seeing with "vCont;C04:0;c" packets is fixed as the correct tid is reported to gdb. I moved cpu_gdb_index into the gdbstub to facilitate easy access to the TaskState which is used elsewhere in gdbstub. To prevent BSD failing to build I've included ts_tid into its TaskStruct but not populated it - which was the same state as the old cpu->host_tid. I'll leave it up to the BSD maintainers to actually populate this properly if they want a working gdbstub with user-threads. Signed-off-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NGreg Kurz <groug@kaod.org> Reviewed-by: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <20170712105216.747-4-alex.bennee@linaro.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 29 5月, 2017 10 次提交
-
-
由 Miloš Stojanović 提交于
Add a new system call: rt_tgsigqueueinfo(). This system call is similar to rt_sigqueueinfo(), but instead of sending the signal and data to the whole thread group with the ID equal to the argument tgid, it sends it to a single thread within that thread group. The ID of the thread is specified by the tid argument. The implementation is based on the rt_sigqueueinfo() in linux-user mode, where the tid is added as the second argument and the previous second and third argument become arguments three and four, respectively. Signed-off-by: NMiloš Stojanović <Milos.Stojanovic@rt-rk.com> Conflicts: linux-user/syscall.c Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Miloš Stojanović 提交于
Change the type of the first argument of rt_sigqueinfo() from int to pid_t in the syscall declaration to match specifications of the system call. Proper spacing is added to satisfy checkpatch.pl. Signed-off-by: NMiloš Stojanović <Milos.Stojanovic@rt-rk.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Miloš Stojanović 提交于
Change the unlock_user() argument from arg1 to arg3 to match with lock_user(), since arg3 contains the pointer to the siginfo_t structure. Signed-off-by: NMiloš Stojanović <Milos.Stojanovic@rt-rk.com> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Miloš Stojanović 提交于
Fix the ssetmask() system call by removing the invocation of sigorset(). The ssetmask() system call should replace the old signal mask with the new and return the old mask. It shouldn't combine the old and the new mask with sigorset(). Fetching the old mask for sigorset() is also no longer needed. The problem was detected after running LTP test group syscalls for the MIPS EL 32 R2 architecture where the test ssetmask01 failed with exit code 1. The test passes now that the ssetmask() system call is fixed. Signed-off-by: NMiloš Stojanović <Milos.Stojanovic@rt-rk.com> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Andreas Schwab 提交于
Instead of post-processing the real contents use the remembered target argv. That removes all traces of qemu, including command line options, and handles QEMU_ARGV0. Signed-off-by: NAndreas Schwab <schwab@suse.de> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Prasad J Pandit 提交于
Arguments passed to execve(2) call from user program could be large, allocating stack memory for them via alloca(3) call would lead to bad behaviour. Use 'g_new0' to allocate memory for such arguments. Reported-by: NJann Horn <jannh@google.com> Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Laurent Vivier 提交于
When a fd is opened using inotify_init(), a read provides one or more inotify_event structures: struct inotify_event { int wd; uint32_t mask; uint32_t cookie; uint32_t len; char name[]; }; The integer fields must be byte-swapped to the target endianness. Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Laurent Vivier 提交于
On ppc, advice is arg2, not arg6: long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, u32 len_high, u32 len_low) Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Laurent Vivier 提交于
When a fd is opened using eventfd(), a read provides a 64bit counter in the host byte order, and a write increase the internal counter by the provided 64bit value. Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Laurent Vivier 提交于
As for sendmsg() or sendto(), we must call the target to host data translator if it is defined. This is needed for eventfd(): the write() syscall allows to add a value to the internal counter, and so, it must be byte-swapped to the host order. Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
- 28 2月, 2017 2 次提交
-
-
The current implementation of the mincore(2) syscall sets errno to EFAULT when the region identified by the first two parameters is invalid. This goes against the man page specification, where mincore(2) should only fail with EFAULT when the third parameter is an invalid address; and fail with ENOMEM when the checked region does not point to mapped memory. Signed-off-by: NFranklin "Snaipe" Mathieu <snaipe@diacritic.io> Cc: Riku Voipio <riku.voipio@linaro.org> Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
The current implementation of the mincore(2) syscall sets errno to EFAULT when the region identified by the first two parameters is invalid. This goes against the man page specification, where mincore(2) should only fail with EFAULT when the third parameter is an invalid address; and fail with ENOMEM when the checked region does not point to mapped memory. Signed-off-by: NFranklin "Snaipe" Mathieu <snaipe@diacritic.io> Cc: Riku Voipio <riku.voipio@linaro.org> Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <20170217085800.28873-2-snaipe@diacritic.io> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-