1. 22 6月, 2015 2 次提交
  2. 18 6月, 2015 1 次提交
    • J
      qemu: Report all supported machine types in capabilities · beca509e
      Jiri Denemark 提交于
      Some machine types are only reported as canonical names for other
      machine types, which make it a bit harder to find what machine types are
      supported by a specific QEMU binary. Ideally, one would just use
      /capabilities/guest/arch[@name='...']/machine/text() XPath to get a list
      of all supported machine types, but it doesn't work right now.
      
      For example, we report
      
          <machine canonical='pc-i440fx-2.3' maxCpus='255'>pc</machine>
      
      in guest capabilities, but the corresponding
      
          <machine maxCpus='255'>pc-i440fx-2.3</machine>
      
      is missing.
      
      This is a result of QMP probing. With "-machine ?" parsing QEMU sends
      us two lines:
      
      pc                   Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.3)
      pc-i440fx-2.3        Standard PC (i440FX + PIIX, 1996) (default)
      
      while query-machines QMP command reports both in the same entry:
      
      {"name": "pc-i440fx-2.3", "is-default": true, "cpu-max": 255, "alias": "pc"}
      
      Let's make sure we always report separate <machine/> for both the
      canonical name and its alias and using the canonical name as the default
      machine type (i.e., inserting it before its alias) in case is-default is
      true.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1229666Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      beca509e
  3. 15 6月, 2015 1 次提交
  4. 12 6月, 2015 1 次提交
  5. 11 6月, 2015 1 次提交
  6. 09 6月, 2015 3 次提交
  7. 26 5月, 2015 2 次提交
    • J
      qemu: Add libvirt version check to refresh capabilities algorithm · a14eff38
      John Ferlan 提交于
      Rather than an algorithm based solely on libvirtd ctime to refresh the
      capabilities add the element of the libvirt build version into the equation.
      Since that version wouldn't be there prior to this code being run - don't
      fail on reading the capabilities if not found. In this case, the cache
      will always be rebuilt when a new libvirt version is installed.
      a14eff38
    • J
      qemu: Force capabilities cache refresh if libvirtd date is different · 0b4211f9
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1195882
      
      Original commit id 'cbde3589' indicates that the cache file would be
      discarded if either the QEMU binary or libvirtd 'ctime' changes; however,
      the code only discarded if the QEMU binary time didn't match or if the
      new libvirtd ctime was later than what created the cache file.
      
      Since many factors come into play with 'ctime' adjustments (including
      perhaps turning back the hands of time), change the logic to also force
      a refresh if the ctime of libvirt is different than what's in the cache.
      0b4211f9
  8. 21 5月, 2015 1 次提交
  9. 18 5月, 2015 1 次提交
  10. 06 5月, 2015 1 次提交
    • J
      qemu: Resolve Coverity FORWARD_NULL · 3e4ce359
      John Ferlan 提交于
      Coverity complains over the [n]values pairing in virQEMUCapsFreeStringList
      and rather than make a bunch if "if values" checks prior to calling, by
      just adding the values check inside the free function we avoid the chance
      that somehow nvalues is > 0, while values == NULL
      3e4ce359
  11. 04 5月, 2015 2 次提交
  12. 24 4月, 2015 1 次提交
  13. 21 4月, 2015 4 次提交
  14. 13 4月, 2015 1 次提交
  15. 23 3月, 2015 1 次提交
  16. 13 3月, 2015 1 次提交
    • J
      Introduce virBitmapIsBitSet · 22fd3ac3
      Ján Tomko 提交于
      A helper that never returns an error and treats bits out of bitmap range
      as false.
      
      Use it everywhere we use ignore_value on virBitmapGetBit, or loop over
      the bitmap size.
      22fd3ac3
  17. 11 3月, 2015 1 次提交
    • M
      virQEMUCapsInitQMP: Don't dispose locked @vm · 954427c3
      Michal Privoznik 提交于
      When creating qemu capabilities, a dummy virDomainObj is created just
      because our monitor code expects that. However, the object is created
      locked already. Then, under cleanup label, we simply unref the object
      which results in whole domain object to be disposed. The object lock
      is destroyed subsequently, but hey - it's still locked:
      
      ==24845== Thread #14's call to pthread_mutex_destroy failed
      ==24845==    with error code 16 (EBUSY: Device or resource busy)
      ==24845==    at 0x4C3024E: pthread_mutex_destroy (in /usr/lib64/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==24845==    by 0x531F72E: virMutexDestroy (virthread.c:83)
      ==24845==    by 0x5302977: virObjectLockableDispose (virobject.c:237)
      ==24845==    by 0x5302A89: virObjectUnref (virobject.c:265)
      ==24845==    by 0x1DD37866: virQEMUCapsInitQMP (qemu_capabilities.c:3397)
      ==24845==    by 0x1DD37CC6: virQEMUCapsNewForBinary (qemu_capabilities.c:3481)
      ==24845==    by 0x1DD381E2: virQEMUCapsCacheLookup (qemu_capabilities.c:3609)
      ==24845==    by 0x1DD30F8A: virQEMUCapsInitGuest (qemu_capabilities.c:744)
      ==24845==    by 0x1DD31889: virQEMUCapsInit (qemu_capabilities.c:1020)
      ==24845==    by 0x1DD7DD36: virQEMUDriverCreateCapabilities (qemu_conf.c:888)
      ==24845==    by 0x1DDC57C0: qemuStateInitialize (qemu_driver.c:803)
      ==24845==    by 0x53DC743: virStateInitialize (libvirt.c:777)
      ==24845==
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      954427c3
  18. 21 2月, 2015 1 次提交
  19. 20 2月, 2015 2 次提交
  20. 17 2月, 2015 1 次提交
  21. 06 2月, 2015 1 次提交
  22. 05 12月, 2014 1 次提交
    • D
      Report original error when QMP probing fails with new QEMU · 25bf888a
      Daniel P. Berrange 提交于
      If probing capabilities via QMP fails, we now have a check
      that prevents us falling back to -help parsing. Unfortunately
      the error message
      
        "Failed to probe capabilities for /usr/bin/qemu-kvm:
         unsupported configuration: QEMU 2.1.2 is too new for help parsing"
      
      is proving rather unhelpful to the user. We need to be telling
      them why QMP failed (the root cause), rather than they can't
      use -help (the side effect).
      
      To do this we should capture stderr during QMP probing, and
      if -help parsing then sees a new QEMU version, we know that
      QMP should have worked, and so we can show the messages from
      stderr. The message thus becomes
      
        "Failed to probe capabilities for /usr/bin/qemu-kvm:
         internal error: QEMU / QMP failed: Could not access
         KVM kernel module: No such file or directory
         failed to initialize KVM: No such file or directory"
      25bf888a
  23. 25 11月, 2014 1 次提交
  24. 20 11月, 2014 1 次提交
  25. 15 11月, 2014 1 次提交
  26. 14 11月, 2014 1 次提交
  27. 10 11月, 2014 1 次提交
  28. 07 11月, 2014 1 次提交
  29. 03 11月, 2014 1 次提交
  30. 30 10月, 2014 1 次提交
    • E
      qemu: better error message when block job can't succeed · 00331bfb
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1140981 reports that
      the qemu-kvm shipped as part of RHEL 7.0 intentionally[1] cripples
      block jobs by removing the 'block-stream' QMP command, while still
      leaving 'block-job-cancel' as an unusable no-op.  Meanwhile, we
      already had existing code that checked whether block jobs were
      completely missing (such as qemu 0.15), old style (cancel is
      synchronous, and all commands spelled with '_'), or new style
      (cancel is asynchronous, and all commands spelled with '-'), and
      used that three-way probe to give decent error messages.  At the
      time that code was added, all existing qemu versions fell in one
      of three buckets, and the code was using the presence of
      'block-job-cancel' as the witness of which of the three buckets.
      But now that RHEL qemu has shipped with intentionally crippled
      'block-stream', we have a fourth bucket, which results in ugly
      error messages when trying 'virsh blockpull':
      
       error: Requested operation is not valid: Command 'block-stream' is not found
      
      In reality, the fourth bucket should be treated the same as the
      first bucket (no block job support); we can do that by realizing
      that no existing build of qemu has working block-stream while
      lacking block-job-cancel, so it is easiest to change our witness
      to the command that starts a job rather than ends one.  We still
      act correctly regarding command spelling and whether cancel is
      asynchronous.  And on crippled RHEL builds, we now get the desired:
      
       error: unsupported configuration: block jobs not supported with this qemu binary
      
      [1] The intentional cripple is limited to qemu-kvm of RHEL; when using
      qemu-kvm-rhev of RHEV, block job functionality is supported.  Don't ask
      me to explain the "why" behind it all - I'm just dealing with fallout
      from someone else's decision.
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_BLOCKJOB_SYNC): Tweak comment.
      * src/qemu/qemu_capabilities.c (virQEMUCapsCommands): Look for stream
      rather than cancel when determining the flavor of block jobs supported.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      00331bfb
  31. 04 10月, 2014 1 次提交