Skip to content
Snippets Groups Projects
  1. Jul 20, 2015
  2. Jul 16, 2015
    • Peter Maydell's avatar
      b4329bf4
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · b92304ee
      Peter Maydell authored
      
      * MIPS-KVM fixes.
      * Coverity fixes.
      * Nettle function prototype fixes.
      * Memory API refcount fix.
      
      # gpg: Signature made Thu Jul 16 19:01:27 2015 BST using RSA key ID 78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.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: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream:
        crypto: avoid undefined behavior in nettle calls
        crypto: fix build with nettle >= 3.0.0
        memory: fix refcount leak in memory_region_present
        RDMA: Fix error exits
        arm/xlnx-zynqmp: fix memory leak
        ppc/spapr_drc: fix memory leak
        mips/kvm: Sign extend registers written to KVM
        mips/kvm: Fix Big endian 32-bit register access
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      b92304ee
    • Radim Krčmář's avatar
      crypto: avoid undefined behavior in nettle calls · d3462e37
      Radim Krčmář authored
      
      Calling a function pointer that was cast from an incompatible function
      results in undefined behavior.  'void *' isn't compatible with 'struct
      XXX *', so we can't cast to nettle_cipher_func, but have to provide a
      wrapper.  (Conversion from 'void *' to 'struct XXX *' might require
      computation, which won't be done if we drop argument's true type, and
      pointers can have different sizes so passing arguments on stack would
      bug.)
      
      Having two different prototypes based on nettle version doesn't make
      this solution any nicer.
      
      Reported-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      Message-Id: <1437062641-12684-3-git-send-email-rkrcmar@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d3462e37
    • Radim Krčmář's avatar
      crypto: fix build with nettle >= 3.0.0 · becaeb72
      Radim Krčmář authored
      
      In nettle 3, cbc_encrypt() accepts 'nettle_cipher_func' instead of
      'nettle_crypt_func' and these two differ in 'const' qualifier of the
      first argument.  The build fails with:
      
        In file included from crypto/cipher.c:71:0:
        ./crypto/cipher-nettle.c: In function ‘qcrypto_cipher_encrypt’:
        ./crypto/cipher-nettle.c:154:38: error: passing argument 2 of
        ‘nettle_cbc_encrypt’ from incompatible pointer type
                 cbc_encrypt(ctx->ctx_encrypt, ctx->alg_encrypt,
                                                     ^
        In file included from ./crypto/cipher-nettle.c:24:0,
                         from crypto/cipher.c:71:
        /usr/include/nettle/cbc.h:48:1: note: expected
        ‘void (*)(const void *, size_t, uint8_t *, const uint8_t *)
        but argument is of type
        ‘void (*)(      void *, size_t, uint8_t *, const uint8_t *)
      
      To allow both versions, we switch to the new definition and #if typedef
      it for old versions.
      
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      Message-Id: <1436548682-9315-2-git-send-email-rkrcmar@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      becaeb72
    • Paolo Bonzini's avatar
      memory: fix refcount leak in memory_region_present · c6742b14
      Paolo Bonzini authored
      
      memory_region_present() leaks a reference to a MemoryRegion in the
      case "mr == container".  While fixing it, avoid reference counting
      altogether for memory_region_present(), by using RCU only.
      
      The return value could in principle be already invalid immediately
      after memory_region_present returns, but presumably the caller knows
      that and it's using memory_region_present to probe for devices that
      are unpluggable, or something like that.  The RCU critical section
      is needed anyway, because it protects as->current_map.
      
      Reported-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c6742b14
    • Dr. David Alan Gilbert's avatar
      RDMA: Fix error exits · 24b41d66
      Dr. David Alan Gilbert authored
      
      The error checks I added used 'break' after the error, but I'm
      in a switch inside the while loop, so they need to be 'goto out'.
      
      Spotted by coverity; entries 1311368 and 1311369
      
      Fixes: afcddefd
      
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <1436555332-19076-1-git-send-email-dgilbert@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      24b41d66
    • Gonglei (Arei)'s avatar
      arm/xlnx-zynqmp: fix memory leak · 5348c62c
      Gonglei (Arei) authored
      
      fix CID 1311372.
      
      Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
      Message-Id: <1436489490-236-4-git-send-email-arei.gonglei@huawei.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      5348c62c
    • Gonglei (Arei)'s avatar
      ppc/spapr_drc: fix memory leak · 586d2142
      Gonglei (Arei) authored
      
      fix CID 1311373.
      
      Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
      Message-Id: <1436489490-236-3-git-send-email-arei.gonglei@huawei.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      586d2142
    • James Hogan's avatar
      mips/kvm: Sign extend registers written to KVM · 02dae26a
      James Hogan authored
      
      In case we're running on a 64-bit host, be sure to sign extend the
      general purpose registers and hi/lo/pc before writing them to KVM, so as
      to take advantage of MIPS32/MIPS64 compatibility.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: kvm@vger.kernel.org
      Cc: qemu-stable@nongnu.org
      Message-Id: <1429871214-23514-3-git-send-email-james.hogan@imgtec.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      02dae26a
    • James Hogan's avatar
      mips/kvm: Fix Big endian 32-bit register access · f8b3e48b
      James Hogan authored
      
      Fix access to 32-bit registers on big endian targets. The pointer passed
      to the kernel must be for the actual 32-bit value, not a temporary
      64-bit value, otherwise on big endian systems the kernel will only
      interpret the upper half.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: kvm@vger.kernel.org
      Cc: qemu-stable@nongnu.org
      Message-Id: <1429871214-23514-2-git-send-email-james.hogan@imgtec.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      f8b3e48b
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150716-1' into staging · 67ff64e0
      Peter Maydell authored
      
      qxl: allow to specify head limit to qxl driver
      
      # gpg: Signature made Thu Jul 16 16:31:40 2015 BST using RSA key ID D3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      
      * remotes/spice/tags/pull-spice-20150716-1:
        qxl: allow to specify head limit to qxl driver
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      67ff64e0
    • Frediano Ziglio's avatar
      qxl: allow to specify head limit to qxl driver · 567161fd
      Frediano Ziglio authored
      
      This patch allow to limit number of heads using qxl driver. By default
      qxl driver is not limited on any kind on head use so can decide to use
      as much heads.
      
      libvirt has this as a video card parameter (actually set to 1 but not
      used). This parameter will allow to limit setting a use can do (which
      could be confusing).
      
      Signed-off-by: default avatarFrediano Ziglio <fziglio@redhat.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      567161fd
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150716' into staging · 2d5ee9e7
      Peter Maydell authored
      
      MIPS patches 2015-07-16
      
      Changes:
      * bug fixes
      
      # gpg: Signature made Thu Jul 16 09:04:56 2015 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-20150716:
        target-mips: fix page fault address for LWL/LWR/LDL/LDR
        linux-user: Fix MIPS N64 trap and break instruction bug
        target-mips: fix resource leak reported by Coverity
        target-mips: fix logically dead code reported by Coverity
        target-mips: correct DERET instruction
        target-mips: fix ASID synchronisation for MIPS MT
        disas/mips: fix disassembling R6 instructions
        target-mips: fix to clear MSACSR.Cause
        target-mips: fix MIPS64R6-generic configuration
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      2d5ee9e7
  3. Jul 15, 2015
Loading