1. 02 7月, 2013 1 次提交
  2. 01 7月, 2013 2 次提交
  3. 26 6月, 2013 4 次提交
    • L
      qemu: fix infinite loop in OOM error path · a47b9e87
      Laine Stump 提交于
      A loop in qemuPrepareHostdevPCIDevices() intended to cycle through all
      the objects on the list pcidevs was doing "while (listcount > 0)", but
      nothing in the body of the loop was reducing the size of the list - it
      was instead removing items from a *different* list. It has now been
      safely changed to a for() loop.
      a47b9e87
    • L
      pci: fix dangling pointer in qemuDomainReAttachHostdevDevices · b2a2d00f
      Laine Stump 提交于
      (This isn't as bad as it sounds - it's only a problem in case of an
      OOM error.)
      
      qemuGetActivePciHostDeviceList() had been creating a list that
      contained pointers to objects that were also on the activePciHostdevs
      list. In case of an OOM error, this newly created list would be
      virObjectUnref'ed, which would cause everything on the list to be
      freed. But all of those objects would still be on the
      activePciHostdevs list, which could have very bad consequences if that
      list was ever again accessed.
      
      The solution used here is to populate the new list with *copies* of
      the objects from the original list. It turns out that on return from
      qemuGetActivePciHostDeviceList(), the caller would almost immediately
      go through all the device objects and "steal" them (i.e. remove the
      pointer from the list but not delete it) all from either one list or
      the other; we now instead just *delete* (remove from the list and
      free) each device from one list or the other, so in the end we have
      the same state.
      b2a2d00f
    • L
      pci: rename virPCIDeviceGetVFIOGroupDev to virPCIDeviceGetIOMMUGroupDev · 1d829e13
      Laine Stump 提交于
      I realized after the fact that it's probably better in the long run to
      give this function a name that matches the name of the link used in
      sysfs to hold the group (iommu_group).
      
      I'm changing it now because I'm about to add several more functions
      that deal with iommu groups.
      1d829e13
    • L
      pci: eliminate unused driver arg from virPCIDeviceDetach · ee1d1f3b
      Laine Stump 提交于
      The driver arg to virPCIDeviceDetach is no longer used (the name of the stub driver is now set in the virPCIDevice object, and virPCIDeviceDetach retrieves it from there). Remove it.
      ee1d1f3b
  4. 25 6月, 2013 9 次提交
  5. 24 6月, 2013 2 次提交
  6. 21 6月, 2013 6 次提交
    • J
      qemu: add hv_vapic and hv_spinlocks support · 19f75d5e
      Ján Tomko 提交于
      XML:
      <features>
        <hyperv>
          <vapic state='on'/>
          <spinlocks state='on' retries='4096'/>
        </hyperv>
      </features>
      
      results in the following QEMU command line:
      qemu -cpu <cpu_model>,hv_vapic,hv_spinlocks=0x1000
      
      https://bugzilla.redhat.com/show_bug.cgi?id=784836
      19f75d5e
    • J
      conf: add vapic and spinlocks to hyperv features · 800b51d7
      Ján Tomko 提交于
      Add new CPU features for HyperV:
      vapic for virtual APIC support
      spinlocks for setting spinlock support
      
      <features>
        <hyperv>
          <vapic state='on'/>
          <spinlocks state='on' retries='4096'/>
        </hyperv>
      </features>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=784836
      800b51d7
    • J
      qemu: Make probing for commands declarative · adb7b0b5
      Jiri Denemark 提交于
      adb7b0b5
    • J
      qemu: Make probing for events declarative · 61a28414
      Jiri Denemark 提交于
      61a28414
    • J
      build: Fix build with -Werror · 24d0e67a
      Jim Fehlig 提交于
      Commit 752596b5 broke the build with -Werror
      
      qemu/qemu_hotplug.c: In function 'qemuDomainChangeGraphics':
      qemu/qemu_hotplug.c:1980:39: error: declaration of 'listen' shadows a
        global declaration [-Werror=shadow]
      
      Fix with s/listen/newlisten/
      24d0e67a
    • M
      qemuDomainChangeGraphics: Check listen address change by listen type · 752596b5
      Michal Privoznik 提交于
      Currently, we have a bug when updating a graphics device. A graphics device can
      have a listen address set. This address is either defined by user (in which case
      it's type is VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS) or it can be inherited
      from a network (in which case it's type is
      VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK). However, in both cases we have a
      listen address to process (e.g. during migration, as I've tried to fix in
      7f15ebc7).
      Later, when a user tries to update the graphics device (e.g. set a password),
      we check if listen addresses match the original as qemu doesn't know how to
      change listen address yet. Hence, users are required to not change the listen
      address. The implementation then just dumps listen addresses and compare them.
      Previously, while dumping the listen addresses, NULL was returned for NETWORK.
      After my patch, this is no longer true, and we get a listen address for olddev
      even if it is a type of NETWORK. So we have a real string on one side, the NULL
      from user's XML on the other side and hence we think user wants to change the
      listen address and we refuse it.
      
      Therefore, we must take the type of listen address into account as well.
      752596b5
  7. 20 6月, 2013 1 次提交
    • J
      qemu: Resolve issue with GetScheduler APIs for non running domain · b2375453
      John Ferlan 提交于
      As a consequence of the cgroup layout changes from commit '632f78ca', the
      qemuDomainGetSchedulerParameters[Flags]()' and qemuGetSchedulerType() APIs
      failed to return data for a non running domain.  This can be seen through
      a 'virsh schedinfo <domain>' command which returns:
      
      Scheduler      : Unknown
      error: Requested operation is not valid: cgroup CPU controller is not mounted
      
      Prior to that change a non running domain would return:
      
      Scheduler      : posix
      cpu_shares     : 0
      vcpu_period    : 0
      vcpu_quota     : 0
      emulator_period: 0
      emulator_quota : 0
      
      This patch will restore the capability to return configuration only data
      for a non running domain regardless of whether cgroups are available.
      b2375453
  8. 18 6月, 2013 5 次提交
    • P
      migration: Don't propagate VIR_MIGRATE_ABORT_ON_ERROR · 5379bb0f
      Peter Krempa 提交于
      This flag is meant for errors happening on the source of the migration
      and isn't used on the destination. To allow better migration
      compatibility, don't propagate it to the destination.
      5379bb0f
    • P
      migration: Make erroring out on I/O error controllable by flag · cf6d56ac
      Peter Krempa 提交于
      Paolo Bonzini pointed out that it's actually possible to migrate a qemu
      instance that was paused due to I/O error and it will be able to work on
      the destination if the storage is accessible.
      
      This patch introduces flag VIR_MIGRATE_ABORT_ON_ERROR that cancels the
      migration in case an I/O error happens while it's being performed and
      allows migration without this flag. This flag can be possibly used for
      other error reasons that may be introduced in the future.
      cf6d56ac
    • J
      ddf8ad82
    • M
      qemu_migration: Move waiting for SPICE migration · 9da7b11b
      Michal Privoznik 提交于
      Currently, we wait for SPICE to migrate in the very same loop where we
      wait for qemu to migrate. This has a disadvantage of slowing seamless
      migration down. One one hand, we should not kill the domain until all
      SPICE data has been migrated.  On the other hand, there is no need to
      wait in the very same loop and hence slowing down 'cont' on the
      destination. For instance, if users are watching a movie, they can
      experience the movie to be stopped for a couple of seconds, as
      processors are not running nor on src nor on dst as libvirt waits for
      SPICE to migrate. We should move the waiting phase to migration CONFIRM
      phase.
      9da7b11b
    • G
      qemu: set QEMU_CAPS_DEVICE_VIDEO_PRIMARY cap flag in QMP detection · 0ad9025e
      Guannan Ren 提交于
      When qemu >= 1.20, it is safe to use -device for primary video
      device as described in 4c993d8a.
      So, we are missing the cap flag in QMP capabilities detection, this
      flag can be initialized safely in virQEMUCapsInitQMPBasic.
      0ad9025e
  9. 13 6月, 2013 1 次提交
  10. 11 6月, 2013 4 次提交
    • P
      qemu: Forbid migration of machines with I/O errors · 5f719f21
      Peter Krempa 提交于
      Such machine can't be successuflly migrated unles the I/O error has
      recovered and might lead to data corruption. Forbid this kind of
      migration.
      5f719f21
    • P
      qemu: Cancel migration if guest encoutners I/O error while migrating · caa467db
      Peter Krempa 提交于
      During a live migration the guest may receive a disk access I/O error.
      In this state the guest is unable to continue running on a remote host
      after migration as some state may be present in the kernel and not
      migrated.
      
      With this patch, the migration is canceled in such case so it can either
      continue on the source if the I/O issues are recovered or has to be
      destroyed anyways.
      caa467db
    • M
      qemu_migrate: Dispose listen address if set from config · 6546017c
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=971485
      
      As of d7f9d827 we copy the listen
      address from the qemu.conf config file in case none has been provided
      via XML. But later, when migrating, we should not include such listen
      address in the migratable XML as it is something autogenerated, not
      requested by user. Moreover, the binding to the listen address will
      likely fail, unless the address is '0.0.0.0' or its IPv6 equivalent.
      This patch introduces a new boolean attribute to virDomainGraphicsListenDef
      to distinguish autofilled listen addresses. However, we must keep the
      attribute over libvirtd restarts, so it must be kept within status XML.
      6546017c
    • J
      qemu: Fix memory leak in Prepare phase · 9313a6a7
      Jiri Denemark 提交于
      Avoid leaking virDomainDef if Prepare phase fails before it gets to
      qemuMigrationPrepareAny.
      9313a6a7
  11. 10 6月, 2013 1 次提交
    • P
      Fix commit 29c1e913 · c2093b2a
      Peter Krempa 提交于
      This patch fixes changes done in commit 29c1e913
      that was pushed without implementing review feedback.
      
      The flag introduced by the patch is changed to VIR_DOMAIN_VCPU_GUEST and
      documentation makes the difference between regular hotplug and this new
      functionality more explicit.
      
      The virsh options that enable the use of the new flag are changed to
      "--guest" and the documentation is fixed too.
      c2093b2a
  12. 07 6月, 2013 4 次提交