1. 25 8月, 2015 1 次提交
    • A
      tcg/optimize: fix constant signedness · 29f3ff8d
      Aurelien Jarno 提交于
      By convention, on a 64-bit host TCG internally stores 32-bit constants
      as sign-extended. This is not the case in the optimizer when a 32-bit
      constant is folded.
      
      This doesn't seem to have more consequences than suboptimal code
      generation. For instance the x86 backend assumes sign-extended constants,
      and in some rare cases uses a 32-bit unsigned immediate 0xffffffff
      instead of a 8-bit signed immediate 0xff for the constant -1. This is
      with a ppc guest:
      
      before
      ------
      
       ---- 0x9f29cc
       movi_i32 tmp1,$0xffffffff
       movi_i32 tmp2,$0x0
       add2_i32 tmp0,CA,CA,tmp2,r6,tmp2
       add2_i32 tmp0,CA,tmp0,CA,tmp1,tmp2
       mov_i32 r10,tmp0
      
      0x7fd8c7dfe90c:  xor    %ebp,%ebp
      0x7fd8c7dfe90e:  mov    %ebp,%r11d
      0x7fd8c7dfe911:  mov    0x18(%r14),%r9d
      0x7fd8c7dfe915:  add    %r9d,%r10d
      0x7fd8c7dfe918:  adc    %ebp,%r11d
      0x7fd8c7dfe91b:  add    $0xffffffff,%r10d
      0x7fd8c7dfe922:  adc    %ebp,%r11d
      0x7fd8c7dfe925:  mov    %r11d,0x134(%r14)
      0x7fd8c7dfe92c:  mov    %r10d,0x28(%r14)
      
      after
      -----
      
       ---- 0x9f29cc
       movi_i32 tmp1,$0xffffffffffffffff
       movi_i32 tmp2,$0x0
       add2_i32 tmp0,CA,CA,tmp2,r6,tmp2
       add2_i32 tmp0,CA,tmp0,CA,tmp1,tmp2
       mov_i32 r10,tmp0
      
      0x7f37010d490c:  xor    %ebp,%ebp
      0x7f37010d490e:  mov    %ebp,%r11d
      0x7f37010d4911:  mov    0x18(%r14),%r9d
      0x7f37010d4915:  add    %r9d,%r10d
      0x7f37010d4918:  adc    %ebp,%r11d
      0x7f37010d491b:  add    $0xffffffffffffffff,%r10d
      0x7f37010d491f:  adc    %ebp,%r11d
      0x7f37010d4922:  mov    %r11d,0x134(%r14)
      0x7f37010d4929:  mov    %r10d,0x28(%r14)
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Message-Id: <1436544211-2769-2-git-send-email-aurelien@aurel32.net>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      29f3ff8d
  2. 20 8月, 2015 1 次提交
    • P
      configure: Don't permit SDL or GTK on OSX · a30878e7
      Peter Maydell 提交于
      The cocoa GUI frontend assumes it is the only GUI (it redefines
      main() so it always gets control before the rest of QEMU), so
      it does not play well with other UIs like SDL or GTK. (Mostly
      people building QEMU on OSX don't have the necessary dependencies
      available for configure to build those other front ends, so
      mostly this problem goes unnoticed.)
      
      Make configure automatically disable the SDL and GTK front ends
      if the cocoa front end is enabled. (We were sort of attempting
      to do this for SDL before, but not in a way that worked very well.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NJohn Arbuckle <programmingkidx@gmail.com>
      Message-id: 1439565052-3457-1-git-send-email-peter.maydell@linaro.org
      a30878e7
  3. 19 8月, 2015 14 次提交
  4. 15 8月, 2015 12 次提交
  5. 14 8月, 2015 5 次提交
    • P
      Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging · 074a9925
      Peter Maydell 提交于
      # gpg: Signature made Fri 14 Aug 2015 14:54:27 BST using RSA key ID C0DE3057
      # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
      # gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
      # gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057
      
      * remotes/cody/tags/block-pull-request:
        mirror: Fix coroutine reentrance
        block/mirror: limit qiov to IOV_MAX elements
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      074a9925
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 8e0adf64
      Peter Maydell 提交于
      # gpg: Signature made Fri 14 Aug 2015 15:41:14 BST using RSA key ID 81AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      
      * remotes/stefanha/tags/block-pull-request:
        throttle: add throttle_max_is_missing_limit() test
        throttle: refuse bps_max/iops_max without bps/iops
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8e0adf64
    • K
      mirror: Fix coroutine reentrance · e424aff5
      Kevin Wolf 提交于
      This fixes a regression introduced by commit dcfb3beb ("mirror: Do zero
      write on target if sectors not allocated"), which was reported to cause
      aborts with the message "Co-routine re-entered recursively".
      
      The cause for this bug is the following code in mirror_iteration_done():
      
          if (s->common.busy) {
              qemu_coroutine_enter(s->common.co, NULL);
          }
      
      This has always been ugly because - unlike most places that reenter - it
      doesn't have a specific yield that it pairs with, but is more
      uncontrolled.  What we really mean here is "reenter the coroutine if
      it's in one of the four explicit yields in mirror.c".
      
      This used to be equivalent with s->common.busy because neither
      mirror_run() nor mirror_iteration() call any function that could yield.
      However since commit dcfb3beb this doesn't hold true any more:
      bdrv_get_block_status_above() can yield.
      
      So what happens is that bdrv_get_block_status_above() wants to take a
      lock that is already held, so it adds itself to the queue of waiting
      coroutines and yields. Instead of being woken up by the unlock function,
      however, it gets woken up by mirror_iteration_done(), which is obviously
      wrong.
      
      In most cases the code actually happens to cope fairly well with such
      cases, but in this specific case, the unlock must already have scheduled
      the coroutine for wakeup when mirror_iteration_done() reentered it. And
      then the coroutine happened to process the scheduled restarts and tried
      to reenter itself recursively.
      
      This patch fixes the problem by pairing the reenter in
      mirror_iteration_done() with specific yields instead of abusing
      s->common.busy.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-id: 1439455310-11263-1-git-send-email-kwolf@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      e424aff5
    • J
      Merge branch 'block-next' into HEAD · d90dedfc
      Jeff Cody 提交于
      d90dedfc
    • P
      Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150813' into staging · be1f13ac
      Peter Maydell 提交于
      MIPS patches 2015-08-13
      
      Changes:
      * mips32r5-generic CPU updated and renamed to P5600
      * improvements in LWL/LDL, logging and fulong2e
      
      # gpg: Signature made Thu 13 Aug 2015 17:10:59 BST using RSA key ID 0B29DA6B
      # gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.com>"
      # 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: 8DD3 2F98 5495 9D66 35D4  4FC0 5211 8E3C 0B29 DA6B
      
      * remotes/lalrae/tags/mips-20150813:
        target-mips: Use CPU_LOG_INT for logging related to interrupts
        hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accesses
        target-mips: simplify LWL/LDL mask generation
        target-mips: update mips32r5-generic into P5600
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      be1f13ac
  6. 13 8月, 2015 7 次提交