1. 16 4月, 2013 3 次提交
  2. 15 4月, 2013 4 次提交
    • O
      Use unsigned int instead of unsigned · b1ea781e
      Osier Yang 提交于
      Though they are the same thing, mixed use of them is uncomfortable.
      "unsigned" is used a lot in old codes, this just tries to change the
      ones in utils.
      b1ea781e
    • D
      Do more complete initialization of libgcrypt · e16e2a8b
      Daniel P. Berrange 提交于
      If libvirt makes any gcry_control() calls, then this
      prevents gnutls for doing any initialization. As such
      we must take care to do full initialization of libcrypt
      on a par with what gnutls would have done. In particular
      we must disable "sec mem" for cases where the user does
      not have mlock() permission. We also skip our init of
      libgcrypt if something else (ie the app using libvirt)
      has beaten us to it.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=951630Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      e16e2a8b
    • P
      qemu: Report also domain name in error message when domain object wasn't found · 63b68f3c
      Peter Krempa 提交于
      Report the errors as:
      Domain not found: no domain with matching uuid '41414141-4141-4141-4141-414141414141' (crashtest)
      instead of:
      Domain not found: no domain with matching uuid '41414141-4141-4141-4141-414141414141'
      63b68f3c
    • P
      qemu: Refactor lookup of domain object · 54a99ba8
      Peter Krempa 提交于
      Use the helper to lookup the domain object in the remaining places.
      
      This patch also fixes error reporting when the domain was not found in several
      functions that were printing the raw UUID buffer instead of the formatted
      string. The offending functions were:
      
      qemuDomainGetInterfaceParameters
      qemuDomainSetInterfaceParameters
      qemuGetSchedulerParametersFlags
      qemuSetSchedulerParametersFlags
      qemuDomainGetNumaParameters
      qemuDomainSetNumaParameters
      qemuDomainGetMemoryParameters
      qemuDomainSetMemoryParameters
      qemuDomainGetBlkioParameters
      qemuDomainSetBlkioParameters
      qemuDomainGetCPUStats
      54a99ba8
  3. 13 4月, 2013 14 次提交
  4. 12 4月, 2013 3 次提交
    • P
      conf: Allow for non-contiguous device boot orders · 039a3283
      Peter Krempa 提交于
      This patch adds the ability to configure non-contiguous boot orders on boot
      devices. This allows unplugging devices that have boot order specified without
      breaking migration.
      
      The new code now uses a slightly less memory efficient approach to store the
      boot order fields in a hashtable instead of a bitmap.
      039a3283
    • L
      Add USB option capability · a6e37aed
      Li Zhang 提交于
      To avoid the collision for creating USB controllers in machine->init()
      and -device xx command line, it needs to set usb=off to avoid one USB
      controller created in machine->init(). So that libvirt can use -device
      or -usb to create USB controller sucessfully.
      So QEMU_CAPS_MACHINE_USB_OPT capability is added, and it is for QEMU
      v1.3.0 onwards which supports USB option.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      a6e37aed
    • J
      qemu: Do not report unsafe migration for local files · 88624b5d
      Jiri Denemark 提交于
      When migrating a domain with disk images stored locally (and using
      storage migration), we should not complain about unsafe migration no
      matter what cache policy is used for that disk.
      88624b5d
  5. 11 4月, 2013 15 次提交
  6. 10 4月, 2013 1 次提交
    • P
      conf: Fix race between looking up a domain object and freeing it · b7c98329
      Peter Krempa 提交于
      This patch fixes crash of the daemon that happens due to the following race
      condition:
      
      Let's have two threads in the libvirtd daemon's qemu driver:
      A - thread executing undefine on the same domain
      B - thread executing a API call to get information about a domain
      
      Assume following serialization of operations done by the threads:
      1) A has the lock on the domain object and is executing some code prior to
         virDomainObjListRemove()
      2) B takes the lock on the domain object list, looks up the domain object
      pointer and blocks in the attempt to lock the domain object as A is holding the
      lock
      3) A reaches virDomainObjListRemove() and unlocks the lock on the domain object
      4) A blocks on the attempt to get the domain list lock
      5) B is able to lock the domain object now and unlocks the domain list
      6) A is now able to lock the domain list, and sheds the last reference on the
      domain object, this triggers the freeing function.
      6) B starts executing the code on the pointer that is being freed
      7) The libvirtd daemon crashes while attempting to access invalid pointer in
      thread B.
      
      This patch fixes the race by acquiring a reference on the domain object before
      unlocking it in virDomainObjListRemove() and re-locks the object prior to
      removing and freeing it. This ensures that no thread holds a lock on the domain
      object at the time it is removed from the list, and that doing a list lookup
      will never find a domain that is about to vanish.
      
      This is a minimal fix of the problem, but a better solution will be to switch to
      full reference counting for domain objects.
      b7c98329