1. 12 6月, 2016 10 次提交
  2. 10 6月, 2016 6 次提交
  3. 09 6月, 2016 9 次提交
    • P
      target-i386: Move user-mode exception actions out of user-exec.c · 0c33682d
      Peter Maydell 提交于
      The exception_action() function in user-exec.c is just a call to
      cpu_loop_exit() for every target CPU except i386.  Since this
      function is only called if the target's handle_mmu_fault() hook has
      indicated an MMU fault, and that hook is only called from the
      handle_cpu_signal() code path, we can simply move the x86-specific
      setup into that hook, which allows us to remove the TARGET_I386
      ifdef from user-exec.c.
      
      Of the actions that were done by the call to raise_interrupt_err():
       * cpu_svm_check_intercept_param() is a no-op in user mode
       * check_exception() is a no-op since double faults are impossible
         for user-mode
       * assignments to cs->exception_index and env->error_code are no-ops
       * assigning to env->exception_next_eip is unnecessary because it
         is not used unless env->exception_is_int is true
       * cpu_loop_exit_restore() is equivalent to cpu_loop_exit() since
         pc is 0
      which leaves just setting env_>exception_is_int as the action that
      needs to be added to x86_cpu_handle_mmu_fault().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NRiku Voipio <riku.voipio@linaro.org>
      Message-id: 1463494687-25947-7-git-send-email-peter.maydell@linaro.org
      0c33682d
    • P
      target-i386: Add comment about do_interrupt_user() next_eip argument · 33271823
      Peter Maydell 提交于
      Add a comment to do_interrupt_user() along the same lines as the
      existing one for do_interrupt_all() noting that the next_eip
      argument is not used unless is_int is true or intno is EXCP_SYSCALL.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NRiku Voipio <riku.voipio@linaro.org>
      Message-id: 1463494687-25947-6-git-send-email-peter.maydell@linaro.org
      33271823
    • P
      user-exec: Don't reextract sigmask from usercontext pointer · a5852dc5
      Peter Maydell 提交于
      Extracting the old signal mask from the usercontext pointer passed to
      a signal handler is a pain because it is OS and CPU dependent.
      Since we've already done it once and passed it to handle_cpu_signal(),
      there's no need to do it again in cpu_exit_tb_from_sighandler().
      This then means we don't need to pass a usercontext pointer in to
      handle_cpu_signal() at all.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NRiku Voipio <riku.voipio@linaro.org>
      Message-id: 1463494687-25947-5-git-send-email-peter.maydell@linaro.org
      a5852dc5
    • P
      cpu-exec: Rename cpu_resume_from_signal() to cpu_loop_exit_noexc() · 6886b980
      Peter Maydell 提交于
      The function cpu_resume_from_signal() is now always called with a
      NULL puc argument, and is rather misnamed since it is never called
      from a signal handler. It is essentially forcing an exit to the
      top level cpu loop but without raising any exception, so rename
      it to cpu_loop_exit_noexc() and drop the useless unused argument.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NRiku Voipio <riku.voipio@linaro.org>
      Message-id: 1463494687-25947-4-git-send-email-peter.maydell@linaro.org
      6886b980
    • P
      user-exec: Push resume-from-signal code out to handle_cpu_signal() · f213e72f
      Peter Maydell 提交于
      Since the only caller of page_unprotect() which might cause it to
      need to call cpu_resume_from_signal() is handle_cpu_signal() in
      the user-mode code, push the longjump handling out to that function.
      
      Since this is the only caller of cpu_resume_from_signal() which
      passes a non-NULL puc argument, split the non-NULL handling into
      a new cpu_exit_tb_from_sighandler() function. This allows us
      to merge the softmmu and usermode implementations of the
      cpu_resume_from_signal() function, which are now identical.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NRiku Voipio <riku.voipio@linaro.org>
      Message-id: 1463494687-25947-3-git-send-email-peter.maydell@linaro.org
      f213e72f
    • P
      translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page() · 75809229
      Peter Maydell 提交于
      The user-mode-only function tb_invalidate_phys_page() is only
      called from two places:
       * page_unprotect(), which passes in a non-zero pc, a puc pointer
         and the value 'true' for the locked argument
       * page_set_flags(), which passes in a zero pc, a NULL puc pointer
         and a 'false' locked argument
      
      If the pc is non-zero then we may call cpu_resume_from_signal(),
      which does a longjmp out of the calling code (and out of the
      signal handler); this is to cover the case of a target CPU with
      "precise self-modifying code" (currently only x86) executing
      a store instruction which modifies code in the same TB as the
      store itself. Rather than doing the longjump directly here,
      return a flag to the caller which indicates whether the current
      TB was modified, and move the longjump to page_unprotect.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: NEduardo Habkost <ehabkost@redhat.com>
      Acked-by: NRiku Voipio <riku.voipio@linaro.org>
      Message-id: 1463494687-25947-2-git-send-email-peter.maydell@linaro.org
      75809229
    • X
      hw/arm: virt uart fix · 9bbbf649
      xiaoqiang zhao 提交于
      commit f0d1d2c1
      ("hw/char: QOM'ify pl011 model") break qemu-system-arm virt machine
      if option '-machine secure=on' is provided.
      
      The function create_uart is called twice. So make CharDriverState pointer
      a parameter to create_uart instead of hardcoded.
      Signed-off-by: Nxiaoqiang zhao <zxq_yx_007@163.com>
      Tested-by: NJerome Forissier <jerome.forissier@linaro.org>
      Message-id: 1465353045-26323-1-git-send-email-zxq_yx_007@163.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9bbbf649
    • P
      Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160608' into staging · b66e10e4
      Peter Maydell 提交于
      linux-user pull request for June 2016
      
      # gpg: Signature made Wed 08 Jun 2016 14:27:14 BST
      # gpg:                using RSA key 0xB44890DEDE3C9BC0
      # gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>"
      # gpg:                 aka "Riku Voipio <riku.voipio@linaro.org>"
      
      * remotes/riku/tags/pull-linux-user-20160608: (44 commits)
        linux-user: In fork_end(), remove correct CPUs from CPU list
        linux-user: Special-case ERESTARTSYS in target_strerror()
        linux-user: Make target_strerror() return 'const char *'
        linux-user: Correct signedness of target_flock l_start and l_len fields
        linux-user: Use safe_syscall wrapper for ioctl
        linux-user: Use safe_syscall wrapper for accept and accept4 syscalls
        linux-user: Use safe_syscall wrapper for semop
        linux-user: Use safe_syscall wrapper for epoll_wait syscalls
        linux-user: Use safe_syscall wrapper for poll and ppoll syscalls
        linux-user: Use safe_syscall wrapper for sleep syscalls
        linux-user: Use safe_syscall wrapper for rt_sigtimedwait syscall
        linux-user: Use safe_syscall wrapper for flock
        linux-user: Use safe_syscall wrapper for mq_timedsend and mq_timedreceive
        linux-user: Use safe_syscall wrapper for msgsnd and msgrcv
        linux-user: Use safe_syscall wrapper for send* and recv* syscalls
        linux-user: Use safe_syscall wrapper for connect syscall
        linux-user: Use safe_syscall wrapper for readv and writev syscalls
        linux-user: Fix error conversion in 64-bit fadvise syscall
        linux-user: Fix NR_fadvise64 and NR_fadvise64_64 for 32-bit guests
        linux-user: Fix handling of arm_fadvise64_64 syscall
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      
      Conflicts:
      	configure
      	scripts/qemu-binfmt-conf.sh
      b66e10e4
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 6f50f25c
      Peter Maydell 提交于
      Block layer patches
      
      # gpg: Signature made Wed 08 Jun 2016 09:31:38 BST
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      
      * remotes/kevin/tags/for-upstream: (31 commits)
        qemu-img bench: Add --flush-interval
        qemu-img bench: Implement -S (step size)
        qemu-img bench: Make start offset configurable
        qemu-img bench: Sequential writes
        qemu-img bench
        block: Don't emulate natively supported pwritev flags
        blockdev: clean up error handling in do_open_tray
        block: Fix bdrv_all_delete_snapshot() error handling
        qcow2: avoid extra flushes in qcow2
        raw-posix: Fetch max sectors for host block device
        block: assert that bs->request_alignment is a power of 2
        migration/block: Convert saving to BlockBackend
        migration/block: Convert load to BlockBackend
        block: Kill bdrv_co_write_zeroes()
        vmdk: Convert to bdrv_co_pwrite_zeroes()
        raw_bsd: Convert to bdrv_co_pwrite_zeroes()
        raw-posix: Convert to bdrv_co_pwrite_zeroes()
        qed: Convert to bdrv_co_pwrite_zeroes()
        gluster: Convert to bdrv_co_pwrite_zeroes()
        blkreplay: Convert to bdrv_co_pwrite_zeroes()
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6f50f25c
  4. 08 6月, 2016 15 次提交