1. 21 5月, 2015 1 次提交
  2. 20 5月, 2015 2 次提交
  3. 19 5月, 2015 1 次提交
  4. 18 5月, 2015 1 次提交
    • L
      conf: make virNodeDevCapData an official type · ffc40b63
      Laine Stump 提交于
      For some reason a union (_virNodeDevCapData) that had only been
      declared inside the toplevel struct virNodeDevCapsDef was being used
      as an argument to functions all over the place. Since it was only a
      union, the "type" attribute wasn't necessarily sent with it. While
      this works, it just seems wrong.
      
      This patch creates a toplevel typedef for virNodeDevCapData and
      virNodeDevCapDataPtr, making it a struct that has the type attribute
      as a member, along with an anonymous union of everything that used to
      be in union _virNodeDevCapData. This way we only have to change the
      following:
      
        s/union _virNodeDevCapData */virNodeDevCapDataPtr /
      
      and
      
        s/caps->type/caps->data.type/
      
      This will make me feel less guilty when adding functions that need a
      pointer to one of these.
      ffc40b63
  5. 15 5月, 2015 2 次提交
  6. 14 5月, 2015 1 次提交
  7. 13 5月, 2015 1 次提交
  8. 12 5月, 2015 1 次提交
    • L
      qemu: fix double free when RNG cold-plug fails · 5f6fe84d
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1220809
      
      When cold-plugging an RNG device but something fails in
      qemuDomainAssignAddresses, we will double free the RNG device.
      Once a device is plugged into the domain, we should set the
      device pointer to NULL to fix this issue.
      
      ...
      5  0x00007fb7d180ac8a in virFree at util/viralloc.c:582
      6  0x00007fb7d1895cdd in virDomainRNGDefFree at conf/domain_conf.c:19786
      7  0x00007fb7d1895d99 in virDomainDeviceDefFree at conf/domain_conf.c:2022
      8  0x00007fb7b92b8baf in qemuDomainAttachDeviceFlags at qemu/qemu_driver.c:8785
      9  0x00007fb7d190c5d7 in virDomainAttachDeviceFlags at libvirt-domain.c:8488
      10 0x00007fb7d23af9d2 in remoteDispatchDomainAttachDeviceFlags at remote_dispatch.h:2842
      ...
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      5f6fe84d
  9. 11 5月, 2015 3 次提交
  10. 07 5月, 2015 2 次提交
    • M
      processSerialChangedEvent: Close agent monitor early · 2af51483
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=890648
      
      So, imagine you've issued an API that involves guest agent. For
      instance, you want to query guest's IP addresses. So the API acquires
      QUERY_JOB, locks the guest agent and issues the agent command.
      However, for some reason, guest agent replies to initial ping
      correctly, but then crashes tragically while executing real command
      (in this case guest-network-get-interfaces). Since initial ping went
      well, libvirt thinks guest agent is accessible and awaits reply to the
      real command. But it will never come. What will is a monitor event.
      Our handler (processSerialChangedEvent) will try to acquire
      MODIFY_JOB, which will fail obviously because the other thread that's
      executing the API already holds a job. So the event handler exits
      early, and the QUERY_JOB is never released nor ended.
      
      The way how to solve this is to put flag somewhere in the monitor
      internals. The flag is called @running and agent commands are issued
      iff the flag is set. The flag itself is set when we connect to the
      agent socket. And unset whenever we see DISCONNECT event from the
      agent. Moreover, we must wake up all the threads waiting for the
      agent. This is done by signalizing the condition they're waiting on.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2af51483
    • M
      qemuDomainShutdownFlags: check for domain activeness prior to guest presence · 21e8fc36
      Michal Privoznik 提交于
      Running shutdown with mode agent on a shutoff domain gives cryptic
      error message:
      
          virsh # shutdown --mode agent gentoo
          error: Failed to shutdown domain gentoo
          error: Guest agent is not responding: QEMU guest agent is not connected
      
      After this patch, the error is more clear:
      
          virsh # shutdown --mode agent gentoo
          error: Failed to shutdown domain gentoo
          error: Requested operation is not valid: domain is not running
      Reported-by: NMartin Kletzander <mkletzan@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      21e8fc36
  11. 06 5月, 2015 1 次提交
    • J
      qemu: Resolve Coverity FORWARD_NULL · b8e60f00
      John Ferlan 提交于
      Coverity points out that qemuMonitorGetAllBlockStatsInfo could return a
      -1 and thus not fill in 'stats' (leaving it NULL). Then the call to
      qemuMonitorBlockStatsUpdateCapacity will dereference it.
      b8e60f00
  12. 04 5月, 2015 3 次提交
  13. 30 4月, 2015 1 次提交
    • P
      qemu: blockjob: Call qemuDomainSupportsBlockJobs only on online VMs · f06d7daa
      Peter Krempa 提交于
      Since the qemu capabilities are not initialized for offline VMs the
      caller might get suboptimal error message:
      
      $ virsh blockjob VM PATH --bandwidth 1
      error: unsupported configuration: block jobs not supported with this QEMU binary
      
      Move the checks after we make sure that the VM is alive.
      f06d7daa
  14. 29 4月, 2015 4 次提交
  15. 28 4月, 2015 6 次提交
    • J
      qemu: Remove need for qemuMonitorIOThreadInfoFree · b515339f
      John Ferlan 提交于
      Replace with just VIR_FREE.
      b515339f
    • J
      qemu: Remove need for qemuDomainParseIOThreadAlias · 4c2ca566
      John Ferlan 提交于
      Rather than have a separate routine to parse the alias of an iothread
      returned from qemu in order to get the iothread_id value, parse the alias
      when returning and just return the iothread_id in qemuMonitorIOThreadInfoPtr
      
      This set of patches removes the function, changes the "char *name" to
      "unsigned int" and handles all the fallout.
      4c2ca566
    • J
      qemu: Resolve Coverity DEADCODE · d8082d2d
      John Ferlan 提交于
      Coverity notes that the switch() used to check 'connected' values has
      two DEADCODE paths (_DEFAULT & _LAST).  Since 'connected' is a boolean
      it can only be one or the other (CONNECTED or DISCONNECTED), so it just
      seems pointless to use a switch to get "all" values.  Convert to if-else
      d8082d2d
    • J
      qemu: Add support to Add/Delete IOThreads · a27ed6e7
      John Ferlan 提交于
      Add qemuDomainAddIOThread and qemuDomainDelIOThread in order to add or
      remove an IOThread to/from the host either for live or config optoins
      
      The implementation for the 'live' option will use the iothreadpids list
      in order to make decision, while the 'config' option will use the
      iothreadids list.  Additionally, for deletion each may have to adjust
      the iothreadpin list.
      
      IOThreads are implemented by qmp objects, the code makes use of the existing
      qemuMonitorAddObject or qemuMonitorDelObject APIs.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      a27ed6e7
    • J
      Move iothreadspin information into iothreadids · b266486f
      John Ferlan 提交于
      Remove the iothreadspin array from cputune and replace with a cpumask
      to be stored in the iothreadids list.
      
      Adjust the test output because our printing goes in order of the iothreadids
      list now.
      b266486f
    • 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
  16. 27 4月, 2015 1 次提交
  17. 26 4月, 2015 3 次提交
  18. 24 4月, 2015 5 次提交
  19. 23 4月, 2015 1 次提交