1. 21 7月, 2017 2 次提交
  2. 20 7月, 2017 2 次提交
  3. 17 7月, 2017 6 次提交
    • J
      nodedev: Convert virNodeDeviceObj to use virObjectLockable · dae23ec3
      John Ferlan 提交于
      Now that we have a bit more control, let's convert our object into
      a lockable object and let that magic handle the create and lock/unlock.
      
      This also involves creating a virNodeDeviceEndAPI in order to handle
      the object cleanup for API's that use the Add or Find API's in order
      to get a locked/reffed object. The EndAPI will unlock and unref the
      object returning NULL to indicate to the caller to not use the obj.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      dae23ec3
    • J
      nodedev: Introduce virNodeDeviceObjListFindSCSIHostByWWNs · 1c7bc64e
      John Ferlan 提交于
      In an overall effort to privatize access to virNodeDeviceObj and
      virNodeDeviceObjList into the virnodedeviceobj module, move the
      object list parsing from node_device_driver and replace with a
      call to a virnodedeviceobj helper. This follows other similar
      APIs/helpers which peruse the object list looking for some specific
      data in order to get/return an @device (virNodeDevice) object to
      the caller.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      1c7bc64e
    • J
      nodedev: Introduce virNodeDeviceGetSCSIHostCaps · 12fa16eb
      John Ferlan 提交于
      We're about to move the call to nodeDeviceSysfsGetSCSIHostCaps from
      node_device_driver into virnodedeviceobj, so move the guts of the code
      from the driver specific node_device_linux_sysfs into its own API
      since virnodedeviceobj cannot callback into the driver.
      
      Nothing in the code deals with sysfs anyway, as that's hidden by the
      various virSCSIHost* and virVHBA* utility function calls.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      12fa16eb
    • J
      nodedev: Alter node device obj list function names · 881a486a
      John Ferlan 提交于
      Ensure that any function that walks the node device object list is prefixed
      by virNodeDeviceObjList.
      
      Also, modify the @filter param name for virNodeDeviceObjListExport to
      be @aclfilter.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      881a486a
    • J
      nodedev: Introduce virNodeDeviceObjListNew · 9c5d98fd
      John Ferlan 提交于
      In preparation to make things private, make the ->devs be pointers to a
      virNodeDeviceObjList and then manage everything inside virnodedeviceobj
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      9c5d98fd
    • J
      nodedev: Alter virNodeDeviceObjRemove · 87e50c9c
      John Ferlan 提交于
      Rather than passing the object to be removed by reference, pass by value
      and then let the caller decide whether or not the object should be free'd
      and how to handle the logic afterwards. This includes free'ing the object
      and/or setting the local variable to NULL to prevent subsequent unexpected
      usage (via something like virNodeDeviceObjRemove in testNodeDeviceDestroy).
      
      For now this function will just handle the remove of the object from the
      list for which it was placed during virNodeDeviceObjAssignDef.
      
      This essentially reverts logic from commit id '61148074' that free'd the
      device entry on list, set *dev = NULL and returned. Thus fixing a bug in
      node_device_hal.c/dev_refresh() which would never call dev_create(udi)
      since @dev would have been set to NULL.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      87e50c9c
  4. 16 7月, 2017 1 次提交
  5. 15 7月, 2017 4 次提交
  6. 14 7月, 2017 2 次提交
  7. 11 7月, 2017 3 次提交
  8. 27 6月, 2017 1 次提交
  9. 20 6月, 2017 1 次提交
  10. 12 6月, 2017 1 次提交
  11. 07 6月, 2017 4 次提交
  12. 05 6月, 2017 1 次提交
  13. 03 6月, 2017 4 次提交
  14. 26 5月, 2017 1 次提交
  15. 18 5月, 2017 3 次提交
    • E
      nodedev: Introduce the mdev capability to a PCI parent device · 500cbc06
      Erik Skultety 提交于
      The parent device needs to report the generic stuff about the supported
      mediated devices types, like device API, available instances, type name,
      etc. Therefore this patch introduces a new nested capability element of
      type 'mdev_types' with the resulting XML of the following format:
      
      <device>
        ...
        <capability type='pci'>
          ...
          <capability type='mdev_types'>
            <type id='vendor_supplied_id'>
              <name>optional_vendor_supplied_codename</name>
              <deviceAPI>vfio-pci</deviceAPI>
              <availableInstances>NUM</availableInstances>
            </type>
              ...
            <type>
              ...
            </type>
          </capability>
        </capability>
        ...
      </device>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      500cbc06
    • M
      Introduce virStreamInData · 84b50792
      Michal Privoznik 提交于
      This is just an internal API, that calls corresponding function
      in stream driver. This function will set @data = 1 if the
      underlying file is in data section, or @data = 0 if it is in a
      hole. At any rate, @length is set to number of bytes remaining in
      the section the file currently is.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      84b50792
    • M
      util: Introduce virFileInData · b928d140
      Michal Privoznik 提交于
      This function takes a FD and determines whether the current
      position is in data section or in a hole. In addition to that,
      it also determines how much bytes are there remaining till the
      current section ends.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b928d140
  16. 12 5月, 2017 2 次提交
  17. 10 5月, 2017 1 次提交
    • D
      Don't inline virStringTrimOptionalNewline · 1a77b97c
      Daniel P. Berrange 提交于
      GCC complains that inlining virStringTrimOptionalNewline is not
      likely on some platforms:
      
        cc1: warnings being treated as errors
        ../../src/util/virfile.c: In function 'virFileReadValueBitmap':
        ../../src/util/virstring.h:292: error: inlining failed in call to 'virStringTrimOptionalNewline': call is unlikely and code size would grow [-Winline]
        ../../src/util/virfile.c:3987: error: called from here [-Winline]
      
      Inlining this function is not going to be a measurable performance
      benefit either, since the time required to execute it is going to
      be dominated by running of strlen() over the string, not by the
      function call overhead.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1a77b97c
  18. 09 5月, 2017 1 次提交
    • M
      Add host cache information in capabilities · 4ad6a73b
      Martin Kletzander 提交于
      We're only adding only info about L3 caches, we can add more
      later (just by changing one line), but for now that's more than enough
      without overwhelming anyone.
      
      XML snippet of how this should look like (also seen as part of the commit):
      
        <cache>
          <bank id='0' level='3' type='both' size='8192' unit='KiB' cpus='0-7'/>
        </cache>
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      4ad6a73b