1. 15 5月, 2015 3 次提交
  2. 04 5月, 2015 1 次提交
  3. 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
  4. 27 4月, 2015 1 次提交
  5. 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
  6. 24 4月, 2015 2 次提交
  7. 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
  8. 09 4月, 2015 2 次提交
  9. 02 4月, 2015 2 次提交
  10. 25 3月, 2015 2 次提交
  11. 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
  12. 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
  13. 02 3月, 2015 1 次提交
  14. 19 1月, 2015 1 次提交
  15. 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
  16. 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
  17. 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
  18. 16 12月, 2014 1 次提交
  19. 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
  20. 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
  21. 21 11月, 2014 1 次提交
    • P
      qemu: Add handling for VSERPORT_CHANGE event · 15bbaaf0
      Peter Krempa 提交于
      New qemu added a new event that is emitted when a virtio serial channel
      is opened in the guest OS. This allows us to update the state of the
      port in the output-only XML element.
      
      This patch implements the monitor callbacks and necessary handlers to
      update the state in the definition.
      15bbaaf0
  22. 07 10月, 2014 1 次提交
    • L
      qemu: setup infrastructure to handle NIC_RX_FILTER_CHANGED event · b6bdda45
      Laine Stump 提交于
      NIC_RX_FILTER_CHANGED is sent by qemu any time a NIC driver in the
      guest modified the NIC's RX Filter (for example, if the MAC address of
      the NIC is changed by the guest).
      
      This patch doesn't do anything useful with that event; it just sets up
      all the plumbing to get news of the event into a worker thread with
      all proper locking/reference counting, and provide an easy place to
      add in desired functionality.
      
      See src/qemu/EVENTHANDLERS.txt for information/instructions on adding
      a libvirt-internal handler for a qemu event (using
      NIC_RX_FILTER_CHANGED as an example).
      b6bdda45
  23. 24 9月, 2014 2 次提交
  24. 19 9月, 2014 1 次提交
  25. 16 9月, 2014 1 次提交
  26. 10 9月, 2014 3 次提交
    • J
      qemu: Recompute downtime and total time when migration completes · eaee338a
      Jiri Denemark 提交于
      Total time of a migration and total downtime transfered from a source to
      a destination host do not count with the transfer time to the
      destination host and with the time elapsed before guest CPUs are
      resumed. Thus, source libvirtd remembers when migration started and when
      guest CPUs were paused. Both timestamps are transferred to destination
      libvirtd which uses them to compute total migration time and total
      downtime. Obviously, this requires the time to be synchronized between
      the two hosts. The reported times are useless otherwise but they would
      be equally useless if we didn't do this recomputation so don't lose
      anything by doing it.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      eaee338a
    • J
      Add support for fetching statistics of completed jobs · 3a868816
      Jiri Denemark 提交于
      virDomainGetJobStats gains new VIR_DOMAIN_JOB_STATS_COMPLETED flag that
      can be used to fetch statistics of a completed job rather than a
      currently running job.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      3a868816
    • J
      Refactor job statistics · 6fcddfcd
      Jiri Denemark 提交于
      Job statistics data were tracked in several structures and variables.
      Let's make a new qemuDomainJobInfo structure which can be used as a
      single source of statistics data as a preparation for storing data about
      completed a job.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      6fcddfcd
  27. 08 9月, 2014 1 次提交
  28. 14 8月, 2014 1 次提交