1. 13 4月, 2013 3 次提交
  2. 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
  3. 11 4月, 2013 15 次提交
  4. 10 4月, 2013 2 次提交
    • 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
    • L
      Fix crash in virNetDevGetVirtualFunctions · 9579b6bc
      Laine Stump 提交于
      Commit 9a3ff01d (which was ACKed at
      the end of January, but for some reason didn't get pushed until during
      the 1.0.4 freeze) fixed the logic in virPCIGetVirtualFunctions().
      Unfortunately, a typo in the fix (replacing VIR_REALLOC_N with
      VIR_ALLOC_N during code movement) caused not only a memory leak, but
      also resulted in most of the elements of the result array being
      replaced with NULL. virNetDevGetVirtualFunctions() assumed (and I think
      rightly so) that virPCIGetVirtualFunctions() wouldn't return any NULL
      elements in the array, so it ended up segfaulting.
      
      This was found when attempting to use a virtual network with an
      auto-created pool of SRIOV VFs, e.g.:
      
          <forward mode='hostdev' managed='yes'>
            <pf dev='eth4'/>
          </forward>
      
      (the pool of PCI addresses is discovered by calling
      virNetDevGetVirtualFunctions() on the PF dev).
      9579b6bc
  5. 09 4月, 2013 10 次提交
  6. 08 4月, 2013 7 次提交