1. 15 9月, 2015 3 次提交
    • C
      target-tilegx: Add TILE-Gx building files · 444e06b1
      Chen Gang 提交于
      Add related configuration and make files for tilegx.
      The target can now build, though not run anything.
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <BLU436-SMTP1588E5A03AD5E94B07E988B9660@phx.gbl>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      444e06b1
    • D
      ui: convert VNC server to use QCryptoTLSSession · 3e305e4a
      Daniel P. Berrange 提交于
      Switch VNC server over to using the QCryptoTLSSession object
      for the TLS session. This removes the direct use of gnutls
      from the VNC server code. It also removes most knowledge
      about TLS certificate handling from the VNC server code.
      This has the nice effect that all the CONFIG_VNC_TLS
      conditionals go away and the user gets an actual error
      message when requesting TLS instead of it being silently
      ignored.
      
      With this change, the existing configuration options for
      enabling TLS with -vnc are deprecated.
      
      Old syntax for anon-DH credentials:
      
        -vnc hostname:0,tls
      
      New syntax:
      
        -object tls-creds-anon,id=tls0,endpoint=server \
        -vnc hostname:0,tls-creds=tls0
      
      Old syntax for x509 credentials, no client certs:
      
        -vnc hostname:0,tls,x509=/path/to/certs
      
      New syntax:
      
        -object tls-creds-x509,id=tls0,dir=/path/to/certs,endpoint=server,verify-peer=no \
        -vnc hostname:0,tls-creds=tls0
      
      Old syntax for x509 credentials, requiring client certs:
      
        -vnc hostname:0,tls,x509verify=/path/to/certs
      
      New syntax:
      
        -object tls-creds-x509,id=tls0,dir=/path/to/certs,endpoint=server,verify-peer=yes \
        -vnc hostname:0,tls-creds=tls0
      
      This aligns VNC with the way TLS credentials are to be
      configured in the future for chardev, nbd and migration
      backends. It also has the benefit that the same TLS
      credentials can be shared across multiple VNC server
      instances, if desired.
      
      If someone uses the deprecated syntax, it will internally
      result in the creation of a 'tls-creds' object with an ID
      based on the VNC server ID. This allows backwards compat
      with the CLI syntax, while still deleting all the original
      TLS code from the VNC server.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3e305e4a
    • D
      crypto: add sanity checking of TLS x509 credentials · 9a2fd434
      Daniel P. Berrange 提交于
      If the administrator incorrectly sets up their x509 certificates,
      the errors seen at runtime during connection attempts are very
      obscure and difficult to diagnose. This has been a particular
      problem for people using openssl to generate their certificates
      instead of the gnutls certtool, because the openssl tools don't
      turn on the various x509 extensions that gnutls expects to be
      present by default.
      
      This change thus adds support in the TLS credentials object to
      sanity check the certificates when QEMU first loads them. This
      gives the administrator immediate feedback for the majority of
      common configuration mistakes, reducing the pain involved in
      setting up TLS. The code is derived from equivalent code that
      has been part of libvirt's TLS support and has been seen to be
      valuable in assisting admins.
      
      It is possible to disable the sanity checking, however, via
      the new 'sanity-check' property on the tls-creds object type,
      with a value of 'no'.
      
      Unit tests are included in this change to verify the correctness
      of the sanity checking code in all the key scenarios it is
      intended to cope with. As part of the test suite, the pkix_asn1_tab.c
      from gnutls is imported. This file is intentionally copied from the
      (long since obsolete) gnutls 1.6.3 source tree, since that version
      was still under GPLv2+, rather than the GPLv3+ of gnutls >= 2.0.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9a2fd434
  2. 10 9月, 2015 2 次提交
  3. 09 9月, 2015 2 次提交
    • A
      configure: Add support for jemalloc · 7b01cb97
      Alexandre Derumier 提交于
      This adds "--enable-jemalloc" and "--disable-jemalloc" to allow linking
      to jemalloc memory allocator.
      
      We have already tcmalloc support,
      but it seem to not working well with a lot of iothreads/disks.
      
      The main problem is that tcmalloc use a shared thread cache of 16MB
      by default.
      With more threads, this cache is shared, and some bad garbage collections
      can occur if the cache is too low.
      
      It's possible to tcmalloc cache increase it with a env var:
      TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=256MB
      
      With default 16MB, performances are  really bad with more than 2 disks.
      Increasing to 256MB, it's helping but still have problem with 16 disks/iothreads.
      
      Jemalloc don't have performance problem with default configuration.
      
      Here the benchmark results in iops of 1 qemu vm randread 4K iodepth=32,
      with rbd block backend (librbd is doing a lot of memory allocation),
      1 iothread by disk
      
      glibc malloc
      ------------
      
      1 disk      29052
      2 disks     55878
      4 disks     127899
      8 disks     240566
      15 disks    269976
      
      jemalloc
      --------
      
      1 disk      41278
      2 disks     75781
      4 disks     195351
      8 disks     294241
      15 disks    298199
      
      tcmalloc 2.2.1 default 16M cache
      --------------------------------
      
      1 disk   37911
      2 disks  67698
      4 disks  41076
      8 disks  43312
      15 disks 37569
      
      tcmalloc : 256M cache
      ---------------------------
      
      1 disk     33914
      2 disks    58839
      4 disks    148205
      8 disks    213298
      15 disks   218383
      Signed-off-by: NAlexandre Derumier <aderumier@odiso.com>
      Message-Id: <1434711418-20429-1-git-send-email-aderumier@odiso.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7b01cb97
    • P
      configure: factor out adding disas configure · c765fcac
      Peter Crosthwaite 提交于
      Every arch adds its disas configury to both its own config as well
      config_disas_all. Make a small function do to both at once.
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Message-Id: <1440844439-19391-1-git-send-email-crosthwaite.peter@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c765fcac
  4. 07 9月, 2015 1 次提交
  5. 02 9月, 2015 5 次提交
  6. 25 8月, 2015 1 次提交
  7. 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
  8. 15 8月, 2015 1 次提交
  9. 03 8月, 2015 1 次提交
  10. 27 7月, 2015 1 次提交
  11. 17 7月, 2015 1 次提交
    • R
      crypto: fix build with nettle >= 3.0.0 · becaeb72
      Radim Krčmář 提交于
      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: NRadim Krčmář <rkrcmar@redhat.com>
      Message-Id: <1436548682-9315-2-git-send-email-rkrcmar@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      becaeb72
  12. 08 7月, 2015 7 次提交
  13. 07 7月, 2015 1 次提交
    • D
      crypto: introduce new module for computing hash digests · ddbb0d09
      Daniel P. Berrange 提交于
      Introduce a new crypto/ directory that will (eventually) contain
      all the cryptographic related code. This initially defines a
      wrapper for initializing gnutls and for computing hashes with
      gnutls. The former ensures that gnutls is guaranteed to be
      initialized exactly once in QEMU regardless of CLI args. The
      block quorum code currently fails to initialize gnutls so it
      only works by luck, if VNC server TLS is not requested. The
      hash APIs avoids the need to litter the rest of the code with
      preprocessor checks and simplifies callers by allocating the
      correct amount of memory for the requested hash.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1435770638-25715-2-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ddbb0d09
  14. 02 7月, 2015 2 次提交
    • P
      block/iscsi: restore compatiblity with libiscsi 1.9.0 · 9049736e
      Peter Lieven 提交于
      RHEL7 and others are stuck with libiscsi 1.9.0 since there
      unfortunately was an ABI breakage after that release.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1435313881-19366-1-git-send-email-pl@kamp.de
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9049736e
    • P
      block/iscsi: add support for request timeouts · 5dd7a535
      Peter Lieven 提交于
      libiscsi starting with 1.15 will properly support timeout of iscsi
      commands. The default will remain no timeout, but this can
      be changed via cmdline parameters, e.g.:
      
      qemu -iscsi timeout=30 -drive file=iscsi://...
      
      If a timeout occurs a reconnect is scheduled and the timed out command
      will be requeued for processing after a successful reconnect.
      
      The required API call iscsi_set_timeout is present since libiscsi
      1.10 which was released in October 2013. However, due to some bugs
      in the libiscsi code the use is not recommended before version 1.15.
      
      Please note that this patch bumps the libiscsi requirement to 1.10
      to have all function and macros defined. The patch fixes also a
      off-by-one error in the NOP timeout calculation which was fixed
      while touching these code parts.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Message-id: 1434455107-19328-1-git-send-email-pl@kamp.de
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5dd7a535
  15. 24 6月, 2015 3 次提交
  16. 17 6月, 2015 1 次提交
  17. 15 6月, 2015 4 次提交
  18. 04 6月, 2015 1 次提交
    • T
      configure: Check for libfdt version 1.4.0 · 31ce0adb
      Thomas Huth 提交于
      Some recent patches require a function from libfdt version 1.4.0,
      so we should check for this version during the configure step
      already. Unfortunately, there does not seem to be a proper #define
      for the version number in the libfdt headers. So alternatively,
      we check for the availability of the required function
      fdt_get_property_by_offset() instead instead.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      31ce0adb
  19. 03 6月, 2015 1 次提交
  20. 29 5月, 2015 1 次提交