1. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  2. 10 9月, 2009 1 次提交
  3. 18 8月, 2009 3 次提交
    • M
      Maintain a list of active PCI hostdevs and use it in pciResetDevice() · e8ad3393
      Mark McLoughlin 提交于
      As we start/shutdown guests, or hotplug/hot-unplug devices, we can add
      or delete devices as appropriate from a list of active devices.
      
      Then, in pciReset(), we can use this to determine whether its safe to
      reset a device as a side effect of resetting another device.
      
      * src/qemu_conf.h: add activePciHostdevs to qemud_driver
      
      * src/qemu_driver.c: maintain the activePciHostdevs list, and pass it
        to pciResetDevice()
      
      * src/pci.[ch]: pass the activeDevs list to pciResetDevice() and use
        it to determine whether a Secondary Bus Reset is safe
      e8ad3393
    • M
      Simplify PCI hostdev prepare/re-attach using a pciDeviceList type · 78675b22
      Mark McLoughlin 提交于
      The qemuPrepareHostDevices() and qemuDomainReAttachHostDevices()
      functions are clutter with a bunch of calls to pciGetDevice() and
      pciFreeDevice() obscuring the basic logic.
      
      Add a pciDeviceList type and add a qemuGetPciHostDeviceList() function
      to build a list from a domain definition. Use this in prepare/re-attach
      fto simplify things and eliminate the multiple pciGetDevice calls.
      
      This is especially useful because in the next patch we need to iterate
      the hostdevs list a third time and we also need a list type for keeping
      track of active devices.
      
      * src/pci.[ch]: add pciDeviceList type and also a per-device 'managed'
        property
      
      * src/libvirt_private.syms: export the new functions
      
      * src/qemu_driver.c: add qemuGetPciHostDeviceList() and re-write
        qemuPrepareHostDevices() and qemuDomainReAttachHostDevices() to use it
      78675b22
    • M
      Revert changes to allow pciResetDevice() reset multiple devices · 4954e079
      Mark McLoughlin 提交于
      It turns out that the previous attempt at this doesn't work well
      in the case of hotplug. We need qemuCheckPciHostDevice() to
      disallow the reset affecting devices already attach to the guest,
      but we still need to avoid double locking the virDomainObjPtr.
      
      This is all getting messy, I've a better idea.
      
      This reverts commit 63188082 and
      c106c8a1.
      
      * src/qemu_driver.c, src/pci.[ch], src/xen_unified.c,
        src/libvirt_private.syms: revert a bunch of stuff.
      4954e079
  4. 14 8月, 2009 4 次提交
    • M
      Check active domain hostdevs before allowing PCI reset · c106c8a1
      Mark McLoughlin 提交于
      If a PCI device reset causes other devices to be reset, allow it so long
      as those other devices are note assigned to another active domain.
      
      Note, we need to take the driver lock qemudNodeDeviceReset() because the
      check function will iterate over the domain list.
      
      * src/qemu_conf.c: add qemuCheckPciHostDevice() to iterate over active
        domains checking whether the affected device is assigned
      
      * src/pci.[ch]: add pciDeviceEquals() helper
      c106c8a1
    • M
      Allow pciResetDevice() to reset multiple devices · 63188082
      Mark McLoughlin 提交于
      When using a Secondary Bus Reset, all devices on the bus are reset.
      
      Extend the pciResetDevice() API so that a 'check' callback can be
      supplied which will verify that it is safe to reset the other devices
      on the bus.
      
      The virDomainObjPtr parameter is needed so that when the check function
      iterates over the domain list, it can avoid double locking.
      
      * src/pci.[ch]: add a 'check' callback to pciResetDevice(), re-work
        pciIterDevices() to pass the check function to the iter functions,
        use the check function in the bus iterator, return the first unsafe
        device from pciBusCheckOtherDevices() and include its details in
        the bus reset error message.
      
      * src/qemu_driver.c, src/xen_uninified.c: just pass NULL as the
        check function for now
      63188082
    • M
      Improve PCI host device reset error message · ebea3418
      Mark McLoughlin 提交于
      Currently, if we are unable to reset a PCI device we return a fairly
      generic 'No PCI reset capability available' error message.
      
      Fix that by returning an error from the individual reset messages and
      using that error to construct the higher level error mesage.
      
      * src/pci.c: set errors in pciTryPowerManagementReset() and
        pciTrySecondaryBusReset() on failure; use those error messages
        in pciResetDevice(), or explain that no reset support is available
      ebea3418
    • M
      Allow PM reset on multi-function PCI devices · 64a6682b
      Mark McLoughlin 提交于
      It turns out that a PCI Power Management reset only affects individual
      functions, and not the whole device.
      
      The PCI Power Management spec talks about resetting the 'device' rather
      than the 'function', but Intel's Dexuan Cui informs me that it is
      actually a per-function reset.
      
      Also, Yu Zhao has added pci_pm_reset() to the kernel, and it doesn't
      reject multi-function devices, so it must be true! :-)
      
      (A side issue is that we could defer the PM reset to the kernel if we
      could detect that the kernel has PM reset support, but barring version
      number checks we don't have a way to detect that support)
      
      * src/pci.c: remove the pciDeviceContainsOtherFunctions() check from
        pciTryPowerManagementReset() and prefer PM reset over bus reset
        where both are available
      
      Cc: Cui, Dexuan <dexuan.cui@intel.com>
      Cc: Yu Zhao <yu.zhao@intel.com>
      64a6682b
  5. 31 7月, 2009 1 次提交
    • M
      Fix PCIe FLR detection · a49cf8a5
      Mark McLoughlin 提交于
      PCIe DevCap register is actually 32 bits, not 16 bits. Since FLR is
      bit 28, we clearly are failing to detect FLR support.
      
      Known to fix device reset with some SR-IOV devices.
      
      * src/pci.c: fix pciDetectFunctionLevelReset()
      a49cf8a5
  6. 16 7月, 2009 1 次提交
  7. 20 5月, 2009 1 次提交
  8. 03 4月, 2009 1 次提交
  9. 04 3月, 2009 1 次提交
  10. 03 3月, 2009 3 次提交