1. 02 4月, 2018 1 次提交
  2. 01 4月, 2018 2 次提交
    • M
      linux-user: fix mq_getsetattr implementation · a23ea409
      Max Filippov 提交于
      mq_getsetattr implementation does not set errno correctly in case of
      error. Also in the presence of both 2nd and 3rd arguments it calls both
      mq_getattr and mq_setattr, whereas only the latter call would suffice.
      
      Don't call mq_getattr in the presence of the 2nd argument. Don't copy
      output back to user in case of error. Use get_errno to set errno value.
      
      This fixes test rt/tst-mqueue2 from the glibc testsuite.
      
      Cc: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      a23ea409
    • M
      linux-user: call cpu_copy under clone_lock · 73a988d9
      Max Filippov 提交于
      cpu_copy adds newly created CPU object to container/machine/unattached,
      but does it w/o proper locking. As a result when multiple threads create
      threads rapidly QEMU may abort with the following message:
      
        GLib-CRITICAL **: g_hash_table_iter_next: assertion
        'ri->version == ri->hash_table->version' failed
      
        ERROR:qemu/qom/object.c:1663:object_get_canonical_path_component:
        code should not be reached
      
      E.g. this issue is observed when running glibc test nptl/tst-eintr1.
      Move cpu_copy invocation under clone_lock to fix that.
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      73a988d9
  3. 17 3月, 2018 1 次提交
    • M
      target/xtensa: add linux-user support · ba7651fb
      Max Filippov 提交于
      Import list of syscalls from the kernel source. Conditionalize code/data
      that is only used with softmmu. Implement exception handlers. Implement
      signal hander (only the core registers for now, no coprocessors or TIE).
      
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      ba7651fb
  4. 14 3月, 2018 2 次提交
    • M
      linux-user: fix assertion in shmdt · 21b869a3
      Max Filippov 提交于
      shmdt fails to call mmap_lock/mmap_unlock around page_set_flags,
      resulting in the following assertion:
        page_set_flags: Assertion `have_mmap_lock()' failed.
      
      Wrap shmdt internals into mmap_lock/mmap_unlock.
      
      Cc: qemu-stable@nongnu.org
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      21b869a3
    • M
      linux-user: fix mmap/munmap/mprotect/mremap/shmat · e530acd7
      Max Filippov 提交于
      In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger
      than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when
      mmap, munmap, mprotect, mremap or shmat is called for an address outside
      the guest address space. mmap and mprotect should return ENOMEM in such
      case.
      
      Change definition of GUEST_ADDR_MAX to always be the last valid guest
      address. Account for this change in open_self_maps.
      Add macro guest_addr_valid that verifies if the guest address is valid.
      Add function guest_range_valid that verifies if address range is within
      guest address space and does not wrap around. Use that macro in
      mmap/munmap/mprotect/mremap/shmat for error checking.
      
      Cc: qemu-stable@nongnu.org
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      e530acd7
  5. 10 3月, 2018 4 次提交
  6. 07 3月, 2018 1 次提交
  7. 19 2月, 2018 2 次提交
  8. 09 2月, 2018 1 次提交
  9. 06 2月, 2018 1 次提交
  10. 23 1月, 2018 6 次提交
  11. 08 11月, 2017 5 次提交
  12. 25 10月, 2017 1 次提交
    • E
      tcg: enable multiple TCG contexts in softmmu · 3468b59e
      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>
      3468b59e
  13. 17 10月, 2017 2 次提交
  14. 16 10月, 2017 2 次提交
  15. 08 8月, 2017 1 次提交
  16. 31 7月, 2017 4 次提交
  17. 14 7月, 2017 1 次提交
  18. 29 5月, 2017 3 次提交