1. 26 6月, 2015 1 次提交
  2. 19 6月, 2015 3 次提交
  3. 15 6月, 2015 1 次提交
  4. 05 6月, 2015 5 次提交
  5. 03 6月, 2015 2 次提交
  6. 28 4月, 2015 3 次提交
  7. 16 4月, 2015 1 次提交
    • P
      qemu: monitor: Refactor and fix monitor checking · c4410852
      Peter Krempa 提交于
      Among all the monitor APIs some where checking if mon is NULL and some
      were not. Since it's possible to have mon equal to NULL in case a second
      call is attempted once entered the monitor. This requires that every
      single API checks for the monitor.
      
      This patch adds a macro that helps checking the state of the monitor and
      either refactors existing checking code to use the macro or adds it in
      case it was missing.
      c4410852
  8. 15 4月, 2015 6 次提交
  9. 14 4月, 2015 3 次提交
  10. 09 4月, 2015 1 次提交
  11. 26 3月, 2015 1 次提交
  12. 23 3月, 2015 2 次提交
  13. 19 3月, 2015 1 次提交
    • E
      qemu: track 'cancelling' migration state · e2660cb8
      Eric Blake 提交于
      In qemu 2.3, the migration status will include 'cancelling' in the
      window between when an asynchronous cancel has been requested and
      when the migration is actually halted.  Previously, qemu hid this
      state and reported 'active'.  Libvirt manages the sequence okay
      even when the string is unrecognized (that is, it will report an
      unknown state:
      
      Migration: [ 69 %]^Cerror: internal error: unexpected migration status in cancelling.
      
      but the migration is still cancelled), but recognizing the string
      makes for a smoother user experience.
      
      * src/qemu/qemu_monitor.h
      (QEMU_MONITOR_MIGRATION_STATUS_CANCELLING): Add enum.
      * src/qemu/qemu_monitor.c (qemuMonitorMigrationStatus): Map it.
      * src/qemu/qemu_migration.c (qemuMigrationUpdateJobStatus): Adjust
      clients.
      * src/qemu/qemu_monitor_json.c
      (qemuMonitorJSONGetMigrationStatusReply): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e2660cb8
  14. 18 3月, 2015 1 次提交
    • E
      qemu: read backing chain names from qemu · f9ea3d60
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1199182 documents that
      after a series of disk snapshots into existing destination images,
      followed by active commits of the top image, it is possible for
      qemu 2.2 and earlier to end up tracking a different name for the
      image than what it would have had when opening the chain afresh.
      That is, when starting with the chain 'a <- b <- c', the name
      associated with 'b' is how it was spelled in the metadata of 'c',
      but when starting with 'a', taking two snapshots into 'a <- b <- c',
      then committing 'c' back into 'b', the name associated with 'b' is
      now the name used when taking the first snapshot.
      
      Sadly, older qemu doesn't know how to treat different spellings of
      the same filename as identical files (it uses strcmp() instead of
      checking for the same inode), which means libvirt's attempt to
      commit an image using solely the names learned from qcow2 metadata
      fails with a cryptic:
      
      error: internal error: unable to execute QEMU command 'block-commit': Top image file /tmp/images/c/../b/b not found
      
      even though the file exists.  Trying to teach libvirt the rules on
      which name qemu will expect is not worth the effort (besides, we'd
      have to remember it across libvirtd restarts, and track whether a
      file was opened via metadata or via snapshot creation for a given
      qemu process); it is easier to just always directly ask qemu what
      string it expects to see in the first place.
      
      As a safety valve, we validate that any name returned by qemu
      still maps to the same local file as we have tracked it, so that
      a compromised qemu cannot accidentally cause us to act on an
      incorrect file.
      
      * src/qemu/qemu_monitor.h (qemuMonitorDiskNameLookup): New
      prototype.
      * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDiskNameLookup):
      Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorDiskNameLookup): New function.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskNameLookup)
      (qemuMonitorJSONDiskNameLookupOne): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit)
      (qemuDomainBlockJobImpl): Use it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f9ea3d60
  15. 17 3月, 2015 1 次提交
  16. 11 3月, 2015 5 次提交
    • P
      qemu: monitor: Kill qemuMonitorGetBlockStats(Info,ParamsNumber) · d3534a43
      Peter Krempa 提交于
      The functions and their QMP and HMP implementations are no longer needed
      since everything is now done via the *AllStats functions.
      d3534a43
    • P
      qemu: monitor: Count block stats fields in qemuMonitorGetAllBlockStatsInfo · bdc05128
      Peter Krempa 提交于
      Our virDomainBlockStatsFlags API uses the old approach where, when it's
      called without the typed parameter array, returns the count of parameters
      supported by qemu.
      
      The supported parameter count is obtained via separate monitor calls
      which is a waste since we can calculate it when gathering the data.
      
      This patch adds code to the qemuMonitorGetAllBlockStatsInfo workers that
      allows to track the count of supported fields reported by qemu and will
      allow to remove the old duplicate code.
      bdc05128
    • P
      qemu: monitor: Implement HMP version for listing all block device stats · f6563bc3
      Peter Krempa 提交于
      Add a different version of parser for "info blockstats" that basically
      parses the same information as the existing copy of the function.
      
      This will allow us to remove the single device version
      qemuMonitorGetBlockStatsInfo in the future.
      
      The new implementation uses few new helpers so it should be more
      understandable and provides a test case to verify that it works.
      f6563bc3
    • P
      qemu: blockstats: Switch to caller allocated hash table · 4f6b6788
      Peter Krempa 提交于
      Allocate the hash table in the monitor wrapper function instead of the
      worker itself so that the text monitor impl that will be added in the
      next patch doesn't have to duplicate it.
      4f6b6788
    • P
      qemu: monitor: Drop parsing of 'errs' from block info · 32288fc9
      Peter Krempa 提交于
      The error count statistic is not supported by qemu, so there's no need
      to pass the variables around if the result is ignored anyways.
      32288fc9
  17. 24 2月, 2015 1 次提交
  18. 14 1月, 2015 2 次提交
    • P
      qemu_process: detect updated video ram size values from QEMU · ce745914
      Pavel Hrdina 提交于
      QEMU internally updates the size of video memory if the domain XML had
      provided too low memory size or there are some dependencies for a QXL
      devices 'vgamem' and 'ram' size. We need to know about the changes and
      store them into the status XML to not break migration or managedsave
      through different libvirt versions.
      
      The values would be loaded only if the "vgamem_mb" property exists for
      the device.  The presence of the "vgamem_mb" also tells that the
      "ram_size" and "vram_size" exists for QXL devices.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      ce745914
    • P
      qemu_monitor: introduce new function to get QOM path · cc41c648
      Pavel Hrdina 提交于
      The search is done recursively only through QOM object that has a type
      prefixed with "child<" as this indicate that the QOM is a parent for
      other QOM objects.
      
      The usage is that you give known device name with starting path where to
      search.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cc41c648