1. 26 6月, 2016 4 次提交
    • P
      configure: Don't override ARCH=unknown if enabling TCI · 997f6ed3
      Peter Maydell 提交于
      At the moment if configure finds an unknown CPU it will set
      ARCH to 'unknown', and then later either bail out or set it
      to 'tci' (depending on whether the user passed configure the
      --enable-tcg-interpreter switch). This is unnecessarily
      confusing, because we could be using TCI in two cases:
       * a known host architecture (in which case ARCH is set to
         the actual host architecture, like 'i386')
       * an unknown host architecture (in which case ARCH is
         set to 'tci')
      so nothing can rely on ARCH=tci to mean "using TCI".
      Remove the line setting ARCH, so we leave it as "unknown",
      which is what the actual situation is.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      997f6ed3
    • P
      linux-user: Don't use sigfillset() on uc->uc_sigmask · 1d48fdd9
      Peter Maydell 提交于
      The kernel and libc have different ideas about what a sigset_t
      is -- for the kernel it is only _NSIG / 8 bytes in size (usually
      8 bytes), but for libc it is much larger, 128 bytes. In most
      situations the difference doesn't matter, because if you pass a
      pointer to a libc sigset_t to the kernel it just acts on the first
      8 bytes of it, but for the ucontext_t* argument to a signal handler
      it trips us up. The kernel allocates this ucontext_t on the stack
      according to its idea of the sigset_t type, but the type of the
      ucontext_t defined by the libc headers uses the libc type, and
      so do the manipulator functions like sigfillset(). This means that
       (1) sizeof(uc->uc_sigmask) is much larger than the actual
           space used on the stack
       (2) sigfillset(&uc->uc_sigmask) will write garbage 0xff bytes
           off the end of the structure, which can trash data that
           was on the stack before the signal handler was invoked,
           and may result in a crash after the handler returns
      
      To avoid this, we use a memset() of the correct size to fill
      the signal mask rather than using the libc function.
      
      This fixes a problem where we would crash at least some of the
      time on an i386 host when a signal was taken.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      1d48fdd9
    • P
      linux-user: Use safe_syscall wrapper for fcntl · 435da5e7
      Peter Maydell 提交于
      Use the safe_syscall wrapper for fcntl. This is straightforward now
      that we always use 'struct fcntl64' on the host, as we don't need
      to select whether to call the host's fcntl64 or fcntl syscall
      (a detail that the libc previously hid for us).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      435da5e7
    • P
      linux-user: Use __get_user() and __put_user() to handle structs in do_fcntl() · 213d3e9e
      Peter Maydell 提交于
      Use the __get_user() and __put_user() to handle reading and writing the
      guest structures in do_ioctl(). This has two benefits:
       * avoids possible errors due to misaligned guest pointers
       * correctly sign extends signed fields (like l_start in struct flock)
         which might be different sizes between guest and host
      
      To do this we abstract out into copy_from/to_user functions. We
      also standardize on always using host flock64 and the F_GETLK64
      etc flock commands, as this means we always have 64 bit offsets
      whether the host is 64-bit or 32-bit and we don't need to support
      conversion to both host struct flock and struct flock64.
      
      In passing we fix errors in converting l_type from the host to
      the target (where we were doing a byteswap of the host value
      before trying to do the convert-bitmasks operation rather than
      otherwise, and inexplicably shifting left by 1); these were
      accidentally left over when the original simple "just shift by 1"
      arm<->x86 conversion of commit 43f238d7 was changed to the more
      general scheme of using target_to_host_bitmask() functions in 2ba7f730.
      
      [RV: fixed ifdef guard for eabi functions]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      213d3e9e
  2. 24 6月, 2016 1 次提交
    • P
      linux-user: Avoid possible misalignment in host_to_target_siginfo() · 55d72a7e
      Peter Maydell 提交于
      host_to_target_siginfo() is implemented by a combination of
      host_to_target_siginfo_noswap() followed by tswap_siginfo().
      The first of these two functions assumes that the target_siginfo_t
      it is writing to is correctly aligned, but the pointer passed
      into host_to_target_siginfo() is directly from the guest and
      might be misaligned. Use a local variable to avoid this problem.
      (tswap_siginfo() does now correctly handle a misaligned destination.)
      
      We have to add a memset() to host_to_target_siginfo_noswap()
      to avoid some false positive "may be used uninitialized" warnings
      from gcc about subfields of the _sifields union if it chooses to
      inline both tswap_siginfo() and host_to_target_siginfo_noswap()
      into host_to_target_siginfo().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NPeter Maydell <riku.voipio@linaro.org>
      55d72a7e
  3. 23 6月, 2016 14 次提交
  4. 22 6月, 2016 14 次提交
  5. 21 6月, 2016 7 次提交
    • P
      Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-20160621-1' into staging · 6f1d2d1c
      Peter Maydell 提交于
      This pull request contains:
      
        - disable sparse testing
        - add trusty build target
        - add libnfs-dev for NFS block driver
      
      These are the same patches posted last week for any last minute review.
      
      # gpg: Signature made Tue 21 Jun 2016 10:06:34 BST
      # gpg:                using RSA key 0xFBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * remotes/stsquad/tags/pull-travis-20160621-1:
        .travis.yml: disable Sparse testing
        .travis.yml: add trusty GCE target
        .travis.yml: add libnfs-dev for NFS block driver
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6f1d2d1c
    • G
    • P
      Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging · 728cc990
      Peter Maydell 提交于
      qemu-sparc update
      
      # gpg: Signature made Mon 20 Jun 2016 21:55:23 BST
      # gpg:                using RSA key 0x5BC2C56FAE0F321F
      # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
      # Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F
      
      * remotes/mcayland/tags/qemu-sparc-signed:
        MAINTAINERS: remove Blue Swirl as SPARC maintainer
        MAINTAINERS: add Artyom Tarasenko as SPARC maintainer
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      728cc990
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging · b0ad00b8
      Peter Maydell 提交于
      # gpg: Signature made Mon 20 Jun 2016 21:29:27 BST
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/tracing-pull-request: (42 commits)
        trace: split out trace events for linux-user/ directory
        trace: split out trace events for qom/ directory
        trace: split out trace events for target-ppc/ directory
        trace: split out trace events for target-s390x/ directory
        trace: split out trace events for target-sparc/ directory
        trace: split out trace events for net/ directory
        trace: split out trace events for audio/ directory
        trace: split out trace events for ui/ directory
        trace: split out trace events for hw/alpha/ directory
        trace: split out trace events for hw/arm/ directory
        trace: split out trace events for hw/acpi/ directory
        trace: split out trace events for hw/vfio/ directory
        trace: split out trace events for hw/s390x/ directory
        trace: split out trace events for hw/pci/ directory
        trace: split out trace events for hw/ppc/ directory
        trace: split out trace events for hw/9pfs/ directory
        trace: split out trace events for hw/i386/ directory
        trace: split out trace events for hw/isa/ directory
        trace: split out trace events for hw/sd/ directory
        trace: split out trace events for hw/sparc/ directory
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b0ad00b8
    • M
      MAINTAINERS: remove Blue Swirl as SPARC maintainer · 3a978051
      Mark Cave-Ayland 提交于
      Blue is no longer active in the QEMU project, so remove him from the list of
      SPARC maintainers.
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      CC: Blue Swirl <blauwirbel@gmail.com>
      3a978051
    • M
      MAINTAINERS: add Artyom Tarasenko as SPARC maintainer · 2c742bf7
      Mark Cave-Ayland 提交于
      Artyom has been working on QEMU's SPARC emulation for several years, providing
      initial support for Solaris under qemu-system-sparc and more recently bugfixes
      for qemu-system-sparc64 and TCG patch reviews. As work progresses on improving
      emulation for sun4u machines and beyond, Artyom has agreed to take on
      co-maintainership of SPARC with a focus on 64-bit architecture.
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: NArtyom Tarasenko <atar4qemu@gmail.com>
      2c742bf7
    • P
      Merge remote-tracking branch 'remotes/mwalle/tags/lm32-queue/20160620' into staging · 7e13ea57
      Peter Maydell 提交于
      lm32/milkymist: some qomifying
      
      # gpg: Signature made Mon 20 Jun 2016 17:27:53 BST
      # gpg:                using RSA key 0xB458ABB0D8D378E3
      # gpg: Good signature from "Michael Walle <michael@walle.cc>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 2190 3E48 4537 A7C2 90CE  3EB2 B458 ABB0 D8D3 78E3
      
      * remotes/mwalle/tags/lm32-queue/20160620:
        milkymist: update specification URLs
        hw/intc: QOM'ify lm32_pic.c
        hw/display: QOM'ify milkymist-vgafb.c
        hw/display: QOM'ify milkymist-tmu2.c
        hw/timer: QOM'ify milkymist_sysctl
        hw/timer: QOM'ify lm32_timer
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7e13ea57