1. 23 3月, 2016 4 次提交
    • A
      hostdev: Save netdev configuration of actual device · c3e2f6e3
      Andrea Bolognani 提交于
      We would be just fine looking up the information in pcidevs most
      of the time; however, some corner cases would not be handled
      properly, so look up the actual device instead.
      c3e2f6e3
    • A
      hostdev: Streamline device ownership tracking · 81128609
      Andrea Bolognani 提交于
      After this patch, ownership of virPCIDevice instances is very easy
      to keep track of: for each host PCI device, the only instance that
      actually matters is the one inside one of the bookkeeping list.
      
      Whenever some operation needs to be performed on a PCI device, the
      actual device is looked up first; when this is not the case, a
      comment explains the reason.
      81128609
    • A
      hostdev: Stop early if unmanaged devices have not been detached · 6da6bf2f
      Andrea Bolognani 提交于
      Unmanaged devices, as the name suggests, are not detached
      automatically from the host by libvirt before being attached to a
      guest: it's the user's responsability to detach them manually
      beforehand. If that preliminary step has not been performed, the
      attach operation can't complete successfully.
      
      Instead of relying on the lower layers to error out with cryptic
      messages such as
      
        error: Failed to attach device from /tmp/hostdev.xml
        error: Path '/dev/vfio/12' is not accessible: No such file or directory
      
      prevent the situation altogether and provide the user with a more
      useful error message.
      6da6bf2f
    • A
      hostdev: Detect untracked inactive devices · df490e7c
      Andrea Bolognani 提交于
      Unmanaged devices are attached to guests in two steps: first,
      the device is detached from the host and marked as inactive;
      subsequently, it is marked as active and attached to the guest.
      
      If the daemon is restarted between these two operations, we lose
      track of the inactive device.
      
      Steps 5 and 6 of virHostdevPreparePCIDevices() already subtly
      take care of this situation, but some planned changes will make
      it so that's no longer the case. Plus, explicit is always better
      than implicit.
      df490e7c
  2. 22 3月, 2016 17 次提交
  3. 21 3月, 2016 19 次提交