1. 31 10月, 2016 1 次提交
  2. 28 10月, 2016 3 次提交
  3. 25 10月, 2016 1 次提交
  4. 24 10月, 2016 4 次提交
  5. 08 10月, 2016 1 次提交
  6. 07 10月, 2016 4 次提交
  7. 04 10月, 2016 2 次提交
    • M
      util: Introduce qemu_get_pid_name · 7dc9ae43
      Michal Privoznik 提交于
      This is a small helper that tries to fetch binary name for given
      PID.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Message-Id: <4d75d475c1884f8e94ee8b1e57273ddf3ed68bf7.1474987617.git.mprivozn@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7dc9ae43
    • A
      util/qht: atomically set b->hashes · a8906439
      Alex Bennée 提交于
      ThreadSanitizer detects a possible race between reading/writing the
      hashes. The ordering semantics are already documented for QHT however
      for true C11 compliance we should use relaxed atomic primitives for
      accesses that are done across threads. On x86 this slightly changes to
      the code to not do a load/compare in a single instruction leading to a
      slight performance degradation.
      
      Running 'taskset -c 0 tests/qht-bench -n 1 -d 10' (i.e. all lookups) 10
      times, we get:
      
      before the patch:
       $ ./mean.pl 34.04 34.24 34.38 34.25 34.18 34.51 34.46 34.44 34.29 34.08
       34.287 +- 0.160072900059109
      after:
       $ ./mean.pl 33.94 34.00 33.52 33.46 33.55 33.71 34.27 34.06 34.28 34.58
       33.937 +- 0.374731014640279
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NEmilio G. Cota <cota@braap.org>
      Message-Id: <20160930213106.20186-10-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a8906439
  8. 29 9月, 2016 9 次提交
  9. 23 9月, 2016 4 次提交
    • F
      uuid: Tighten uuid parse · 0d6ae947
      Fam Zheng 提交于
      sscanf is relatively loose (tolerate) on some invalid formats that we
      should fail instead of generating a wrong uuid structure, like with
      whitespaces and short strings.
      
      Add and use a helper function to first check the format.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-11-git-send-email-famz@redhat.com>
      0d6ae947
    • F
      vl: Switch qemu_uuid to QemuUUID · 9c5ce8db
      Fam Zheng 提交于
      Update all qemu_uuid users as well, especially get rid of the duplicated
      low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API.
      
      Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to
      QemuUUID is done here too to keep everything in sync and avoid code
      churn.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
      9c5ce8db
    • F
      uuid: Make null_uuid static · 3630be75
      Fam Zheng 提交于
      So that it doesn't have to be zeroed at each call.
      Suggested-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-3-git-send-email-famz@redhat.com>
      3630be75
    • F
      util: Add UUID API · cea25275
      Fam Zheng 提交于
      A number of different places across the code base use CONFIG_UUID. Some
      of them are soft dependency, some are not built if libuuid is not
      available, some come with dummy fallback, some throws runtime error.
      
      It is hard to maintain, and hard to reason for users.
      
      Since UUID is a simple standard with only a small number of operations,
      it is cleaner to have a central support in libqemuutil. This patch adds
      qemu_uuid_* functions that all uuid users in the code base can
      rely on. Except for qemu_uuid_generate which is new code, all other
      functions are just copy from existing fallbacks from other files.
      
      Note that qemu_uuid_parse is moved without updating the function
      signature to use QemuUUID, to keep this patch simple.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
      cea25275
  10. 21 9月, 2016 1 次提交
    • M
      blockdev: Add dynamic module loading for block drivers · 88d88798
      Marc Mari 提交于
      Extend the current module interface to allow for block drivers to be
      loaded dynamically on request. The only block drivers that can be
      converted into modules are the drivers that don't perform any init
      operation except for registering themselves.
      
      In addition, only the protocol drivers are being modularized, as they
      are the only ones which see significant performance benefits. The format
      drivers do not generally link to external libraries, so modularizing
      them is of no benefit from a performance perspective.
      
      All the necessary module information is located in a new structure found
      in module_block.h
      
      This spoils the purpose of 5505e8b7 (block/dmg: make it modular).
      
      Before this patch, if module build is enabled, block-dmg.so is linked to
      libbz2, whereas the main binary is not. In downstream, theoretically, it
      means only the qemu-block-extra package depends on libbz2, while the
      main QEMU package needn't to. With this patch, we (temporarily) change
      the case so that the main QEMU depends on libbz2 again.
      Signed-off-by: NMarc Marí <markmb@redhat.com>
      Signed-off-by: NColin Lord <clord@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1471008424-16465-4-git-send-email-clord@redhat.com
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      [mreitz: Do a signed comparison against the length of
       block_driver_modules[], so it will not cause a compile error when
       empty]
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      88d88798
  11. 15 9月, 2016 1 次提交
    • D
      log: fix parsing of multiple trace:PATTERN log args · 89d0a64f
      Daniel P. Berrange 提交于
      If giving QEMU a log arg which asks to enable multiple
      different trace event patterns such as
      
        $QEMU -d trace:qio*,trace:qcrypto*
      
      the parser will then invoke
      
        trace_enable_events("qio*,trace:qcrypto*")
        trace_enable_events("qcrypto*")
      
      as when finding a 'trace:' prefix, it is not clever
      enough to strip anything after the next comma. As
      a result only the last 'trace:' match ever works.
      
      Rather than trying to be more clever with parsing the
      command line arg in place, simplify the code by
      using g_strsplit to break it into individual strings
      on ','. These resulting pieces can be directly used
      without worrying about trailing data from the next
      option.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1473186343-16704-1-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      89d0a64f
  12. 14 9月, 2016 9 次提交