]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: nodedev: filter by AP Matrix capability
authorShalini Chellathurai Saroja <shalini@linux.ibm.com>
Thu, 3 Dec 2020 17:59:40 +0000 (18:59 +0100)
committerErik Skultety <eskultet@redhat.com>
Wed, 9 Dec 2020 13:03:05 +0000 (14:03 +0100)
Add support to filter by 'ap_matrix' capability.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.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 e8c5be793ae3aa5befbcf4dcf28f13d3edff007b..f76b398140c8d96c9dfebedb7bc261a885c5ee59 100644 (file)
               <dd>AP Queue identifier.</dd>
             </dl>
           </dd>
+          <dt><code>ap_matrix</code></dt>
+          <dd>Describes an AP Matrix device on a S390 architecture providing
+              cryptographic host resources usable for virtualization.</dd>
         </dl>
       </dd>
     </dl>
index 7658b53b2aa20c19320875a707706236ee0390d8..aa3a0095fe3d62410513c3b28d58718bd6a3aa60 100644 (file)
@@ -5043,7 +5043,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', 'css', 'ap_card', 'ap_queue'.
+'mdev_types', 'ccw', 'css', 'ap_card', 'ap_queue', 'ap_matrix'.
 If *--tree* is used, the output is formatted in a tree representing parents of each
 node.  *cap* and *--tree* are mutually exclusive.
 
index d5091aa28475fae44d2333bf0498869fe4dd1dfc..eab8abf6ab93cc6fb14cc559d3f9fc383bb1fabc 100644 (file)
@@ -85,6 +85,7 @@ typedef enum {
     VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA          = 1 << 17, /* vDPA device */
     VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD       = 1 << 18, /* s390 AP Card device */
     VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE      = 1 << 19, /* s390 AP Queue */
+    VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX     = 1 << 20, /* s390 AP Matrix */
 } virConnectListAllNodeDeviceFlags;
 
 int                     virConnectListAllNodeDevices (virConnectPtr conn,
index b863653b34ad486c464778894e906ba6e671dd0b..b8397128116d816e777d58738e66c44ae30ce2bb 100644 (file)
@@ -412,7 +412,8 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps);
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV       | \
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_VDPA          | \
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD       | \
-                 VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE)
+                 VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE      | \
+                 VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX)
 
 int
 virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host);
index 8fbef5f528772b9c91d6181964535678a2b411b0..25d12776a5660c3838345943b7d6655436c8d308 100644 (file)
@@ -874,7 +874,8 @@ virNodeDeviceObjMatch(virNodeDeviceObjPtr obj,
               MATCH(CSS_DEV)       ||
               MATCH(VDPA)          ||
               MATCH(AP_CARD)       ||
-              MATCH(AP_QUEUE)))
+              MATCH(AP_QUEUE)      ||
+              MATCH(AP_MATRIX)))
             return false;
     }
 
index 762413ebfdada92e03a86d74b8fec252e533a3fc..eb8c735a8c45b7af3b8eeed61f9ed9a72e8d3f76 100644 (file)
@@ -104,6 +104,7 @@ virNodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags)
  *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV
  *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD
  *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE
+ *   VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX
  *
  * 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 f69030d2da0aab6fa8b4f0d569a391ae448f9bf2..69422e20f5709f29389d08cc919bcf1a3671cb1b 100644 (file)
@@ -474,6 +474,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
             flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE;
             break;
         case VIR_NODE_DEV_CAP_AP_MATRIX:
+            flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX;
+            break;
         case VIR_NODE_DEV_CAP_LAST:
             break;
         }