1. 26 2月, 2013 1 次提交
  2. 23 2月, 2013 2 次提交
  3. 21 2月, 2013 9 次提交
    • J
      qemu: Turn closeCallbacks into virObjectLockable · 3898ba7f
      Jiri Denemark 提交于
      To avoid having to hold the qemu driver lock while iterating through
      close callbacks and calling them. This fixes a real deadlock when a
      domain which is being migrated from another host gets autodestoyed as a
      result of broken connection to the other host.
      3898ba7f
    • G
      qemu: fix an off-by-one error in qemuDomainGetPercpuStats · 09183163
      Guannan Ren 提交于
      The max value of number of cpus to compute(id) should not
      be equal or greater than max cpu number.
      The bug ocurrs when id value is equal to max cpu number which
      leads to the off-by-one error in the following for loop.
      
       # virsh  cpu-stats guest --start 1
       error: Failed to virDomainGetCPUStats()
      
       error: internal error cpuacct parse error
      09183163
    • J
      Remove a couple of misplaced VIR_FREE · 2bff35d5
      John Ferlan 提交于
      2bff35d5
    • M
      qemu: Run lzop with '--ignore-warn' · 0eeedf52
      Michal Privoznik 提交于
      Currently, if lzop decompression binary produces a warning, it
      doesn't exit with zero status but 2 instead. Terrifying, but
      true. However, warnings may be ignored using '--ignore-warn'
      command line argument.  Moreover, in which case, the exit status
      will be zero.
      0eeedf52
    • O
      qemu: Remove the shared disk entry if the operation is ejecting or updating · d0172d2b
      Osier Yang 提交于
      For both AttachDevice and UpdateDevice APIs, if the disk device
      is 'cdrom' or 'floppy', the operations could be ejecting, updating,
      and inserting. For either ejecting or updating, the shared disk
      entry of the original disk src has to be removed, because it's
      not useful anymore.
      
      And since the original disk def will be changed, new disk def passed
      as argument will be free'ed in qemuDomainChangeEjectableMedia, so
      we need to copy the orignal disk def before
      qemuDomainChangeEjectableMedia, to use it for qemuRemoveSharedDisk.
      d0172d2b
    • O
      qemu: Move the shared disk adding and sgio setting prior to attaching · 0db7ff59
      Osier Yang 提交于
      The disk def could be free'ed by qemuDomainChangeEjectableMedia,
      which can thus cause crash if we reference the disk pointer. On
      the other hand, we have to remove the added shared disk entry from
      the table on error codepath.
      0db7ff59
    • O
      qemu: Record names of domain which uses the shared disk in hash table · a4504ac1
      Osier Yang 提交于
      The hash entry is changed from "ref" to {ref, @domains}. With this, the
      caller can simply call qemuRemoveSharedDisk, without afraid of removing
      the entry belongs to other domains. qemuProcessStart will obviously
      benifit from it on error codepath (which calls qemuProcessStop to do
      the cleanup).
      a4504ac1
    • O
      qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk · 371df778
      Osier Yang 提交于
      Based on moving various checking into qemuAddSharedDisk, this
      avoids the caller using it in wrong ways. Also this adds two
      new checking for qemuCheckSharedDisk (disk device not 'lun'
      and kernel doesn't support unpriv_sgio simply returns 0).
      371df778
    • O
      qemu: Add checking in helpers for sgio setting · dab878a8
      Osier Yang 提交于
      This moves the various checking into the helpers, to avoid the
      callers missing the checking.
      dab878a8
  4. 19 2月, 2013 1 次提交
  5. 13 2月, 2013 1 次提交
    • D
      Remove qemuDriverLock from almost everywhere · a9e97e0c
      Daniel P. Berrange 提交于
      With the majority of fields in the virQEMUDriverPtr struct
      now immutable or self-locking, there is no need for practically
      any methods to be using the QEMU driver lock. Only a handful
      of helper APIs in qemu_conf.c now need it
      a9e97e0c
  6. 11 2月, 2013 2 次提交
  7. 08 2月, 2013 4 次提交
  8. 06 2月, 2013 7 次提交
    • D
      Initialize qemuImageBinary path at startup · 0f5e3f13
      Daniel P. Berrange 提交于
      0f5e3f13
    • D
      Protect USB/PCI device list access in QEMU with dedicated locks · 011cf7ad
      Daniel P. Berrange 提交于
      Currently the activePciHostdevs, inactivePciHostdevsd and
      activeUsbHostdevs lists are all implicitly protected by the
      QEMU driver lock. Now that the lists all inherit from the
      virObjectLockable, we can make the locking explicit, removing
      the dependency on the QEMU driver lock for correctness.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      011cf7ad
    • D
      Convert virPCIDeviceList and virUSBDeviceList into virObjectLockable · 0f9ef558
      Daniel P. Berrange 提交于
      To allow modifications to the lists to be synchronized, convert
      virPCIDeviceList and virUSBDeviceList into virObjectLockable
      classes. The locking, however, will not be self-contained. The
      users of these classes will have to call virObjectLock/Unlock
      in the critical regions.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0f9ef558
    • D
      Rename all USB device functions to have a standard name prefix · 77c3015f
      Daniel P. Berrange 提交于
      Rename all the usbDeviceXXX and usbXXXDevice APIs to have a
      fixed virUSBDevice name prefix
      77c3015f
    • D
      Rename all PCI device functions to have a standard name prefix · 20253560
      Daniel P. Berrange 提交于
      Rename all the pciDeviceXXX and pciXXXDevice APIs to have a
      fixed virPCIDevice name prefix
      20253560
    • D
      Remove pointless 'qemuVersion' field from virQEMUDriverPtr · b46f7f4a
      Daniel P. Berrange 提交于
      The QEMU driver struct has a 'qemuVersion' field that was previously
      used to cache the version lookup from capabilities. With the recent
      QEMU capabilities rewrite the caching happens at a lower level so
      this field is pointless. Removing it avoids worries about locking
      when updating it.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b46f7f4a
    • D
      Merge virDomainObjListIsDuplicate into virDomainObjListAdd · eea87129
      Daniel P. Berrange 提交于
      The duplicate VM checking should be done atomically with
      virDomainObjListAdd, so shoud not be a separate function.
      Instead just use flags to indicate what kind of checks are
      required.
      
      This pair, used in virDomainCreateXML:
      
         if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0)
           goto cleanup;
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def, false)))
           goto cleanup;
      
      Changes to
      
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def,
                                         VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                         NULL)))
           goto cleanup;
      
      This pair, used in virDomainRestoreFlags:
      
         if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0)
           goto cleanup;
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def, true)))
           goto cleanup;
      
      Changes to
      
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def,
                                         VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                         VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                         NULL)))
           goto cleanup;
      
      This pair, used in virDomainDefineXML:
      
         if (virDomainObjListIsDuplicate(privconn->domains, def, 0) < 0)
           goto cleanup;
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def, false)))
           goto cleanup;
      
      Changes to
      
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def,
                                         0, NULL)))
           goto cleanup;
      eea87129
  9. 05 2月, 2013 4 次提交
    • D
      Turn virDomainObjList into an opaque virObject · 37abd471
      Daniel P. Berrange 提交于
      As a step towards making virDomainObjList thread-safe turn it
      into an opaque virObject, preventing any direct access to its
      internals.
      
      As part of this a new method virDomainObjListForEach is
      introduced to replace all existing usage of virHashForEach
      37abd471
    • D
      Rename all domain list APIs to have virDomainObjList prefix · 4f6ed6c3
      Daniel P. Berrange 提交于
      The APIs names for accessing the domain list object are
      very inconsistent. Rename them all to have a standard
      virDomainObjList prefix.
      4f6ed6c3
    • D
      Introduce a virQEMUDriverConfigPtr object · b090aa7d
      Daniel P. Berrange 提交于
      Currently the virQEMUDriverPtr struct contains an wide variety
      of data with varying access needs. Move all the static config
      data into a dedicated virQEMUDriverConfigPtr object. The only
      locking requirement is to hold the driver lock, while obtaining
      an instance of virQEMUDriverConfigPtr. Once a reference is held
      on the config object, it can be used completely lockless since
      it is immutable.
      
      NB, not all APIs correctly hold the driver lock while getting
      a reference to the config object in this patch. This is safe
      for now since the config is never updated on the fly. Later
      patches will address this fully.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b090aa7d
    • M
      qemu: Catch stderr of image decompression binary · cc6c425f
      Michal Privoznik 提交于
      If a decompression binary prints something to stderr, currently
      it is discarded. However, it can contain useful data from
      debugging POV, so we should catch it.
      cc6c425f
  10. 29 1月, 2013 1 次提交
  11. 25 1月, 2013 4 次提交
  12. 24 1月, 2013 2 次提交
  13. 22 1月, 2013 1 次提交
  14. 21 1月, 2013 1 次提交