1. 19 10月, 2017 5 次提交
  2. 17 8月, 2017 3 次提交
  3. 28 7月, 2017 1 次提交
  4. 25 7月, 2017 1 次提交
    • J
      nodedev: Remove driver locks around object list mgmt code · 4cb719b2
      John Ferlan 提交于
      Since virnodedeviceobj now has a self-lockable hash table, there's no
      need to lock the table from the driver for processing. Thus remove the
      locks from the driver for NodeDeviceObjList mgmt.
      
      This includes the test driver as well.
      4cb719b2
  5. 17 7月, 2017 5 次提交
    • 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: 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: Use consistent names for driver variables · aa6e856b
      John Ferlan 提交于
      A virNodeDeviceObjPtr is an @obj
      
      A virNodeDeviceObjListPtr is a @devs
      
      A virNodeDevicePtr is a @device
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      aa6e856b
    • 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
  6. 03 6月, 2017 2 次提交
  7. 31 5月, 2017 1 次提交
  8. 29 5月, 2017 1 次提交
  9. 26 5月, 2017 2 次提交
    • B
      node_device: introduce new capability FC_RPORT · bb2adfe9
      Bjoern Walk 提交于
      Similar to scsi_host and fc_host, there is a relation between a
      scsi_target and its transport specific fc_remote_port. Let's expose this
      relation and relevant information behind it.
      
      An example for a virsh nodedev-dumpxml:
      
          virsh # nodedev-dumpxml scsi_target0_0_0
          <device>
            <name>scsi_target0_0_0</name>
            <path>/sys/devices/[...]/host0/rport-0:0-0/target0:0:0</path>
            <parent>scsi_host0</parent>
            <capability type='scsi_target'>
              <target>target0:0:0</target>
              <capability type='fc_remote_port'>
                <rport>rport-0:0-0</rport>
                <wwpn>0x9d73bc45f0e21a86</wwpn>
              </capability>
            </capability>
          </device>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      bb2adfe9
    • B
      node_device: detect CCW devices · b0ffd938
      Bjoern Walk 提交于
      Make CCW devices available to the node_device driver. The devices are
      already seen by udev so let's implement necessary code for detecting
      them properly.
      
      Topologically, CCW devices are similar to PCI devices, e.g.:
      
          +- ccw_0_0_1a2b
              |
              +- scsi_host0
                  |
                  +- scsi_target0_0_0
                      |
                      +- scsi_0_0_0_0
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      b0ffd938
  10. 18 5月, 2017 4 次提交
    • E
      nodedev: mdev: Fix build caused by symbol shadowing · de4b46e1
      Erik Skultety 提交于
      GCC 4.6 complains about a local declaration shadowing a global symbol.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      de4b46e1
    • E
      nodedev: Introduce mdev capability for mediated devices · 88ef73e1
      Erik Skultety 提交于
      Start discovering the mediated devices on the host system and format the
      attributes for the mediated device into the XML. Compared to the parent
      device which reports generic information about the abstract mediated
      devices types, a child device only reports the type name it has been
      instantiated from and the IOMMU group number, since that's device
      specific compared to the rest of the info that can be gathered about
      mediated devices at the moment.
      This patch introduces both the formatting and parsing routines, updates
      nodedev.rng schema, adding a testcase as well.
      
      The resulting mdev child device XML:
      <device>
        <name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
        <path>/sys/devices/.../4b20d080-1b54-4048-85b3-a6a62d165c01</path>
        <parent>pci_0000_06_00_0</parent>
        <driver>
          <name>vfio_mdev</name>
        </driver>
        <capability type='mdev'>
          <type id='vendor_supplied_type_id'/>
          <iommuGroup number='NUM'/>
        <capability/>
      <device/>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      88ef73e1
    • 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
    • E
      nodedev: Introduce new mdev_types and mdev nodedev capabilities · 4385df97
      Erik Skultety 提交于
      The reason for introducing two capabilities, one for the device itself
      (cap 'mdev') and one for the parent device listing the available types
      ('mdev_types'), is that we should be able to do
      'virsh nodedev-list --cap' not only for existing mdev devices but also
      for devices that support creation of mdev devices, since one day libvirt
      might be actually able to create the mdev devices in an automated way
      (just like we do for NPIV/vHBA).
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      4385df97
  11. 24 4月, 2017 2 次提交
  12. 04 3月, 2017 3 次提交
  13. 20 2月, 2017 1 次提交
  14. 17 2月, 2017 2 次提交
  15. 12 10月, 2016 1 次提交
  16. 29 8月, 2016 1 次提交
    • R
      tests: fix segfault in objecteventtest · 61148074
      Roman Bogorodskiy 提交于
      Test 12 from objecteventtest (createXML add event) segaults on FreeBSD
      with bus error.
      
      At some point it calls testNodeDeviceDestroy() from the test driver. And
      it fails when it tries to unlock the device in the "out:" label of this
      function.
      
      Unlocking fails because the previous step was a call to
      virNodeDeviceObjRemove from conf/node_device_conf.c. This function
      removes the given device from the device list and cleans up the object,
      including destroying of its mutex. However, it does not nullify the pointer
      that was given to it.
      
      As a result, we end up in testNodeDeviceDestroy() here:
      
       out:
          if (obj)
              virNodeDeviceObjUnlock(obj);
      
      And instead of skipping this, we try to do Unlock and fail because of
      malformed mutex.
      
      Change virNodeDeviceObjRemove to use double pointer and set pointer to
      NULL.
      61148074
  17. 15 8月, 2016 1 次提交
    • J
      Introduce node device update event as top level event · 43a6b37b
      Jovanka Gulicoska 提交于
      This event is emitted when a nodedev XML definition is updated,
      like when cdrom media is changed in a cdrom block device.
      
      Also includes node device update event implementation for udev
      backend, virsh nodedev-event support, and event-test support
      43a6b37b
  18. 02 8月, 2016 1 次提交
  19. 07 6月, 2016 3 次提交