]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: nodedev: ability to filter CSS capabilities
authorBoris Fiuczynski <fiuczy@linux.ibm.com>
Mon, 14 Sep 2020 19:11:45 +0000 (21:11 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 15 Sep 2020 07:06:24 +0000 (09:06 +0200)
Allow to filter for CSS devices.

Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
docs/formatnode.html.in
docs/manpages/virsh.rst
include/libvirt/libvirt-nodedev.h
src/conf/node_device_conf.h
src/conf/virnodedeviceobj.c
src/libvirt-nodedev.c
tools/virsh-nodedev.c

index 8a51c4da80f9691f86b915a4150c8896ff0f19a2..4c7de50a0ba19823f5321f0ca124698551d6d441 100644 (file)
               <dd>The device number.</dd>
             </dl>
           </dd>
+          <dt><code>css</code></dt>
+          <dd>Describes a Channel SubSystem (CSS) device commonly found on
+          the S390 architecture. Sub-elements include:
+            <dl>
+              <dt><code>cssid</code></dt>
+              <dd>The channel subsystem identifier.</dd>
+              <dt><code>ssid</code></dt>
+              <dd>The subchannel-set identifier.</dd>
+              <dt><code>devno</code></dt>
+              <dd>The device number.</dd>
+            </dl>
+          </dd>
         </dl>
       </dd>
     </dl>
index dde572ac79ccfadba93bb56f55e9209eae12dfb4..9fd5efed0f469fa513f20208a97c47288d333913 100644 (file)
@@ -4964,7 +4964,7 @@ List all of the devices available on the node that are known by libvirt.
 separated by comma, e.g. --cap pci,scsi. Valid capability types include
 'system', 'pci', 'usb_device', 'usb', 'net', 'scsi_host', 'scsi_target',
 'scsi', 'storage', 'fc_host', 'vports', 'scsi_generic', 'drm', 'mdev',
-'mdev_types', 'ccw'.
+'mdev_types', 'ccw', 'css'.
 If *--tree* is used, the output is formatted in a tree representing parents of each
 node.  *cap* and *--tree* are mutually exclusive.
 
index a2ad61ac6dc1b266922a63373fe21d58d5f2129a..dd2ffd5782f610201532df0ffa17e4bda08e4612 100644 (file)
@@ -81,6 +81,7 @@ typedef enum {
     VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES    = 1 << 13, /* Capable of mediated devices */
     VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV          = 1 << 14, /* Mediated device */
     VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV       = 1 << 15, /* CCW device */
+    VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV       = 1 << 16, /* CSS device */
 } virConnectListAllNodeDeviceFlags;
 
 int                     virConnectListAllNodeDevices (virConnectPtr conn,
index 47669d4294d853646e17614b46c2de12f32eab58..5484bc340f06c19007a9956371be8b9e3da6ea90 100644 (file)
@@ -368,7 +368,8 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps);
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM           | \
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES    | \
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV          | \
-                 VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV)
+                 VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV       | \
+                 VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV)
 
 int
 virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host);
index e234432b6f633ba235dd63b7ecd259e1c4644969..8aefd15e942bc32fa0ab74f0489721eca333ab6a 100644 (file)
@@ -861,7 +861,8 @@ virNodeDeviceObjMatch(virNodeDeviceObjPtr obj,
               MATCH(DRM)           ||
               MATCH(MDEV_TYPES)    ||
               MATCH(MDEV)          ||
-              MATCH(CCW_DEV)))
+              MATCH(CCW_DEV)       ||
+              MATCH(CSS_DEV)))
             return false;
     }
 
index ca6c2bb057d59b108aeccbe1f99d43fd4218c296..28765b9c3015999e5382dfe353f99b1af9cee210 100644 (file)
@@ -101,6 +101,7 @@ virNodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags)
  *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES
  *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV
  *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV
+ *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV
  *
  * Returns the number of node devices found or -1 and sets @devices to NULL in
  * case of error.  On success, the array stored into @devices is guaranteed to
index d497fa979788a6e22164ae2b84a9b422ad4572dd..2edd403a648b3ba18b59183437fe43e4bceb0790 100644 (file)
@@ -462,6 +462,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
             flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV;
             break;
         case VIR_NODE_DEV_CAP_CSS_DEV:
+            flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV;
+            break;
         case VIR_NODE_DEV_CAP_LAST:
             break;
         }