1. 10 11月, 2015 1 次提交
  2. 22 9月, 2015 1 次提交
    • P
      qemu: Make memory alignment helper more universal · 3fb08198
      Peter Krempa 提交于
      Extract the size determination into a separate function and reuse it
      across the memory device alignment functions. Since later we will need
      to decide the alignment size according to architecture let's pass def to
      the functions.
      3fb08198
  3. 18 9月, 2015 2 次提交
  4. 04 9月, 2015 1 次提交
    • J
      qemu: Introduce qemuDomainMachineIsS390CCW · d334c917
      John Ferlan 提交于
      Rather than have different usages of STR function in order to determine
      whether the domain is s390-ccw or s390-ccw-virtio, make a single API
      which will check the machine.os prefix. Then use the function.
      d334c917
  5. 10 7月, 2015 1 次提交
  6. 08 7月, 2015 1 次提交
  7. 19 6月, 2015 3 次提交
  8. 04 6月, 2015 1 次提交
  9. 15 5月, 2015 3 次提交
  10. 04 5月, 2015 1 次提交
  11. 28 4月, 2015 1 次提交
    • J
      qemu: Use domain iothreadids to IOThread's 'thread_id' · 8d4614a5
      John Ferlan 提交于
      Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
      'thread_id' as returned from the live qemu monitor data.
      
      Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
      the new iothreadids 'thread_id' element.
      
      Rather than use the default numbering scheme of 1..number of iothreads
      defined for the domain, use the iothreadid's list for the iothread_id
      
      Since iothreadids list keeps track of the iothread_id's, these are
      now used in place of the many places where a for loop would "know"
      that the ID was "+ 1" from the array element.
      
      The new tests ensure usage of the <iothreadid> values for an exact number
      of iothreads and the usage of a smaller number of <iothreadid> values than
      iothreads that exist (and usage of the default numbering scheme).
      8d4614a5
  12. 27 4月, 2015 1 次提交
  13. 26 4月, 2015 1 次提交
    • P
      qemu: agent: Differentiate errors when the agent channel was hotplugged · e1c04108
      Peter Krempa 提交于
      When the guest agent channel gets hotplugged to a VM, libvirt would
      still report that "QEMU guest agent is not configured" rather than
      stating that the connection was not established yet.
      
      Currently the code won't be able to connect to the agent after hotplug
      but that will change in a later patch.
      
      As the qemuFindAgentConfig() helper is quite helpful in this case move
      it to a more usable place and export it.
      e1c04108
  14. 24 4月, 2015 2 次提交
  15. 21 4月, 2015 1 次提交
    • C
      domain: conf: Drop expectedVirtTypes · 835cf84b
      Cole Robinson 提交于
      This needs to specified in way too many places for a simple validation
      check. The ostype/arch/virttype validation checks later in
      DomainDefParseXML should catch most of the cases that this was covering.
      835cf84b
  16. 09 4月, 2015 2 次提交
  17. 02 4月, 2015 2 次提交
  18. 25 3月, 2015 2 次提交
  19. 23 3月, 2015 2 次提交
    • P
      qemu: add support for memory devices · 8b54bffb
      Peter Krempa 提交于
      Add support to start qemu instance with 'pc-dimm' device. Thanks to the
      refactors we are able to reuse the existing function to determine the
      parameters.
      8b54bffb
    • P
      qemu: memdev: Add infrastructure to load memory device information · 5cdfaa31
      Peter Krempa 提交于
      When using 'dimm' memory devices with qemu, some of the information
      like the slot number and base address need to be reloaded from qemu
      after process start so that it reflects the actual state. The state then
      allows to use memory devices across migrations.
      5cdfaa31
  20. 16 3月, 2015 3 次提交
    • P
      qemu: command: Add helper to align memory sizes · 57b215ab
      Peter Krempa 提交于
      The memory sizes in qemu are aligned up to 1 MiB boundaries. There are
      two places where this was done once for the total size and then for
      individual NUMA cell sizes.
      
      Add a function that will align the sizes in one place so that it's clear
      where the sizes are aligned.
      57b215ab
    • P
      qemu: Disallow concurrent block jobs on a single disk · 51f9f03a
      Peter Krempa 提交于
      While qemu may be prepared to do this libvirt is not. Forbid the block
      ops until we fix our code.
      51f9f03a
    • P
      qemu: event: Don't fiddle with disk backing trees without a job · 1a92c719
      Peter Krempa 提交于
      Surprisingly we did not grab a VM job when a block job finished and we'd
      happily rewrite the backing chain data. This made it possible to crash
      libvirt when queueing two backing chains tightly and other badness.
      
      To fix it, add yet another handler to the helper thread that handles
      monitor events that require a job.
      1a92c719
  21. 02 3月, 2015 1 次提交
  22. 19 1月, 2015 1 次提交
  23. 15 1月, 2015 1 次提交
    • J
      Check for domain liveness in qemuDomainObjExitMonitor · dc2fd51f
      Ján Tomko 提交于
      The domain might disappear during the time in monitor when
      the virDomainObjPtr is unlocked, so the caller needs to check
      if it's still alive.
      
      Since most of the callers are going to need it, put the
      check inside qemuDomainObjExitMonitor and return -1 if
      the domain died in the meantime.
      dc2fd51f
  24. 21 12月, 2014 1 次提交
    • M
      qemu: completely rework reference counting · 540c339a
      Martin Kletzander 提交于
      There is one problem that causes various errors in the daemon.  When
      domain is waiting for a job, it is unlocked while waiting on the
      condition.  However, if that domain is for example transient and being
      removed in another API (e.g. cancelling incoming migration), it get's
      unref'd.  If the first call, that was waiting, fails to get the job, it
      unref's the domain object, and because it was the last reference, it
      causes clearing of the whole domain object.  However, when finishing the
      call, the domain must be unlocked, but there is no way for the API to
      know whether it was cleaned or not (unless there is some ugly temporary
      variable, but let's scratch that).
      
      The root cause is that our APIs don't ref the objects they are using and
      all use the implicit reference that the object has when it is in the
      domain list.  That reference can be removed when the API is waiting for
      a job.  And because each domain doesn't do its ref'ing, it results in
      the ugly checking of the return value of virObjectUnref() that we have
      everywhere.
      
      This patch changes qemuDomObjFromDomain() to ref the domain (using
      virDomainObjListFindByUUIDRef()) and adds qemuDomObjEndAPI() which
      should be the only function in which the return value of
      virObjectUnref() is checked.  This makes all reference counting
      deterministic and makes the code a bit clearer.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      540c339a
  25. 17 12月, 2014 1 次提交
    • E
      getstats: perform recursion in monitor collection · b1802714
      Eric Blake 提交于
      When requested in a later patch, the QMP command results are now
      examined recursively.  As qemu_driver will eventually have to
      read items out of the hash table as stored by this patch, the
      computation of backing alias string is done in a shared location.
      
      * src/qemu/qemu_domain.h (qemuDomainStorageAlias): New prototype.
      * src/qemu/qemu_domain.c (qemuDomainStorageAlias): Implement it.
      * src/qemu/qemu_monitor_json.c
      (qemuMonitorJSONGetOneBlockStatsInfo)
      (qemuMonitorJSONBlockStatsUpdateCapacityOne): Perform recursion.
      (qemuMonitorJSONGetAllBlockStatsInfo)
      (qemuMonitorJSONBlockStatsUpdateCapacity): Update callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b1802714
  26. 16 12月, 2014 1 次提交
  27. 04 12月, 2014 1 次提交
    • P
      qemu: process: Refactor reconnecting to qemu processes · 3ecebf07
      Peter Krempa 提交于
      Move entering the job into the thread to simplify the program flow. Also
      as the code holds a separate reference to the domain object some
      conditions can be simplified.
      
      After this patch qemuDomainObjTransferJob is no longer needed so this
      patch removes it.
      3ecebf07
  28. 28 11月, 2014 1 次提交
    • M
      qemu: Don't track quiesced state of FSs · 6085d917
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1160084
      
      As of b6d4dad1 (1.2.5) we are trying to keep the status of FSFreeze
      in the guest. Even though I've tried to fixed couple of corner cases
      (6ea54769), it occurred to me just recently, that the approach is
      broken by design. Firstly, there are many other ways to talk to
      qemu-ga (even through libvirt) that filesystems can be thawed (e.g.
      qemu-agent-command) without libvirt noticing. Moreover, there are
      plenty of ways to thaw filesystems without even qemu-ga noticing (yes,
      qemu-ga keeps internal track of FSFreeze status). So, instead of
      keeping the track ourselves, or asking qemu-ga for stale state, it's
      the best to let qemu-ga deal with that (and possibly let guest kernel
      propagate an error).
      
      Moreover, there's one bug with the following approach, if fsfreeze
      command failed, we've executed fsthaw subsequently. So issuing
      domfsfreeze in virsh gave the following result:
      
      virsh # domfsfreeze gentoo
      Froze 1 filesystem(s)
      
      virsh # domfsfreeze gentoo
      error: Unable to freeze filesystems
      error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance
      
      virsh # domfsfreeze gentoo
      Froze 1 filesystem(s)
      
      virsh # domfsfreeze gentoo
      error: Unable to freeze filesystems
      error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6085d917