From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278036; cv=none; d=zohomail.com; s=zohoarc; b=PqKs4MDpGwMX7jnpgKzeRSGACBgvwYBjfrnXpN9YyFctq+nZ39TrVcikiQYh/YVL63Q3wETsIGG6ZETXEvpDQMA7pqeR8wrmmnzHG6EKsEeFbkfSh2Yk1IHKfi5k3YKw5BLXPzEGycpOBHe3+B/ZOLUh+2ohmN9NTw1ffaS3jes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278036; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=k8/+pi1H+tIyw/gGqcAVOIee/mwAQS0q9jYecY02/dA=; b=aWlKBYu9HXoy9GSwmSbVKeXv872MpzdvBAcsFICDempcq3t1A7LXaVIiwoF3vPnPzTW+r0fGJHtX5Nklp0PwPfdF8VsNt0Wl50D0tr7TOi9pftd6bKc7AUDQOC4VAFEMwKY1KjJ43tzDW68TR1NUntYaHHOpQ+6QltymHf0xWps= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1603278036519491.0222931887806; Wed, 21 Oct 2020 04:00:36 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-289-b46UM3B5NPWZXFI7Zm3Ypw-1; Wed, 21 Oct 2020 07:00:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94F2D80572D; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E88B27BCE; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EF348180B657; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0IU1025162 for ; Wed, 21 Oct 2020 07:00:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 63973FDCF1; Wed, 21 Oct 2020 11:00:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 582F8F6CA2 for ; Wed, 21 Oct 2020 11:00:16 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 013E9805B0E for ; Wed, 21 Oct 2020 11:00:16 +0000 (UTC) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-82p8fd-vP0mtrU-B6CR3eg-1; Wed, 21 Oct 2020 07:00:12 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAXXHP093570 for ; Wed, 21 Oct 2020 07:00:11 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 34akb28hxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:11 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAvk4T014763 for ; Wed, 21 Oct 2020 11:00:10 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma06ams.nl.ibm.com with ESMTP id 347qvhc7sf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:09 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB06t830343636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:06 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0D3BA4059; Wed, 21 Oct 2020 11:00:06 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E250A4057; Wed, 21 Oct 2020 11:00:06 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:06 +0000 (GMT) X-MC-Unique: b46UM3B5NPWZXFI7Zm3Ypw-1 X-MC-Unique: 82p8fd-vP0mtrU-B6CR3eg-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 1/7] nodedev: Detect AP Card device Date: Wed, 21 Oct 2020 12:59:56 +0200 Message-Id: <20201021110002.303518-2-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_03:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 suspectscore=9 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 clxscore=1011 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210078 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Farhan Ali , Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Farhan Ali Introduce support for the Adjunct Processor (AP) Crypto Card device. Udev already detects the device, so add support for libvirt nodedev driver. Signed-off-by: Farhan Ali Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- docs/formatnode.html.in | 7 +++++ docs/schemas/nodedev.rng | 34 ++++++++++++++++++---- src/conf/node_device_conf.c | 42 +++++++++++++++++++++++++++ src/conf/node_device_conf.h | 8 +++++ src/conf/virnodedeviceobj.c | 1 + src/node_device/node_device_udev.c | 30 +++++++++++++++++++ tests/nodedevschemadata/ap_card07.xml | 8 +++++ tests/nodedevxml2xmltest.c | 1 + tools/virsh-nodedev.c | 1 + 9 files changed, 126 insertions(+), 6 deletions(-) create mode 100644 tests/nodedevschemadata/ap_card07.xml diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in index 59442746..300ddf21 100644 --- a/docs/formatnode.html.in +++ b/docs/formatnode.html.in @@ -432,6 +432,13 @@
The device number.
+
ap_card
+
Describes the AP Card device on a S390 host. Sub-elements in= clude: +
+
ap-adapter
+
AP Card identifier.
+
+
diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index 166e278c..06ccb9c8 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -86,6 +86,7 @@ + @@ -675,12 +676,21 @@ =20 - - - - - - + + + ap_card + + + + + + + + + + + + =20 @@ -696,4 +706,16 @@ =20 + + + + (0x)?[0-9a-fA-F]{1,2} + + + 0 + 255 + + + + diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 4adfdef5..88c00b5b 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -66,6 +66,7 @@ VIR_ENUM_IMPL(virNodeDevCap, "mdev", "ccw", "css", + "ap_card", ); =20 VIR_ENUM_IMPL(virNodeDevNetCap, @@ -611,6 +612,10 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def) virBufferAsprintf(&buf, "0x%04x\n", data->ccw_dev.devno); break; + case VIR_NODE_DEV_CAP_AP_CARD: + virBufferAsprintf(&buf, "0x%02x\n", + data->ap_card.ap_adapter); + break; case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_FC_HOST: case VIR_NODE_DEV_CAP_VPORTS: @@ -803,6 +808,37 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt, } =20 =20 +static int +virNodeDevCapAPCardParseXML(xmlXPathContextPtr ctxt, + virNodeDeviceDefPtr def, + xmlNodePtr node, + virNodeDevCapAPCardPtr ap_card) +{ + xmlNodePtr orig; + int ret =3D 0; + g_autofree char *adapter =3D NULL; + + orig =3D ctxt->node; + ctxt->node =3D node; + + if (!(adapter =3D virXPathString("string(./ap-adapter[1])", ctxt))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("missing ap-adapter value for '%s'"), def->name); + return -1; + } + + if (virStrToLong_uip(adapter, NULL, 0, &ap_card->ap_adapter) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid ap-adapter value '%s' for '%s'"), + adapter, def->name); + ret =3D -1; + } + + ctxt->node =3D orig; + return ret; +} + + static int virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, virNodeDeviceDefPtr def, @@ -1898,6 +1934,10 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, case VIR_NODE_DEV_CAP_CSS_DEV: ret =3D virNodeDevCapCCWParseXML(ctxt, def, node, &caps->data.ccw_= dev); break; + case VIR_NODE_DEV_CAP_AP_CARD: + ret =3D virNodeDevCapAPCardParseXML(ctxt, def, node, + &caps->data.ap_card); + break; case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_FC_HOST: case VIR_NODE_DEV_CAP_VPORTS: @@ -2219,6 +2259,7 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps) case VIR_NODE_DEV_CAP_VPORTS: case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_CSS_DEV: + case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_LAST: /* This case is here to shutup the compiler */ break; @@ -2273,6 +2314,7 @@ virNodeDeviceUpdateCaps(virNodeDeviceDefPtr def) case VIR_NODE_DEV_CAP_MDEV: case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_CSS_DEV: + case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_LAST: break; } diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index 5484bc34..aa2dac43 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -65,6 +65,7 @@ typedef enum { VIR_NODE_DEV_CAP_MDEV, /* Mediated device */ VIR_NODE_DEV_CAP_CCW_DEV, /* s390 CCW device */ VIR_NODE_DEV_CAP_CSS_DEV, /* s390 channel subsystem device */ + VIR_NODE_DEV_CAP_AP_CARD, /* s390 AP Card device */ =20 VIR_NODE_DEV_CAP_LAST } virNodeDevCapType; @@ -275,6 +276,12 @@ struct _virNodeDevCapCCW { unsigned int devno; }; =20 +typedef struct _virNodeDevCapAPCard virNodeDevCapAPCard; +typedef virNodeDevCapAPCard *virNodeDevCapAPCardPtr; +struct _virNodeDevCapAPCard { + unsigned int ap_adapter; +}; + typedef struct _virNodeDevCapData virNodeDevCapData; typedef virNodeDevCapData *virNodeDevCapDataPtr; struct _virNodeDevCapData { @@ -293,6 +300,7 @@ struct _virNodeDevCapData { virNodeDevCapDRM drm; virNodeDevCapMdev mdev; virNodeDevCapCCW ccw_dev; + virNodeDevCapAPCard ap_card; }; }; =20 diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 9af80b80..8d3e5a43 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -711,6 +711,7 @@ virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, case VIR_NODE_DEV_CAP_MDEV: case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_CSS_DEV: + case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_LAST: break; } diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 29a7eaa0..c513b4cc 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1142,6 +1142,32 @@ udevProcessCSS(struct udev_device *device, return 0; } =20 + +static int +udevProcessAPCard(struct udev_device *device, + virNodeDeviceDefPtr def) +{ + char *c; + virNodeDevCapDataPtr data =3D &def->caps->data; + + /* The sysfs path would be in the format /sys/bus/ap/devices/cardXX, + where XX is the ap adapter id */ + if ((c =3D strrchr(def->sysfs_path, '/')) =3D=3D NULL || + virStrToLong_ui(c + 1 + strlen("card"), NULL, 16, + &data->ap_card.ap_adapter) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to parse the AP Card from sysfs path: '%s= '"), + def->sysfs_path); + return -1; + } + + if (udevGenerateDeviceName(device, def, NULL) !=3D 0) + return -1; + + return 0; +} + + static int udevGetDeviceNodes(struct udev_device *device, virNodeDeviceDefPtr def) @@ -1196,6 +1222,8 @@ udevGetDeviceType(struct udev_device *device, *type =3D VIR_NODE_DEV_CAP_NET; else if (STREQ(devtype, "drm_minor")) *type =3D VIR_NODE_DEV_CAP_DRM; + else if (STREQ(devtype, "ap_card")) + *type =3D VIR_NODE_DEV_CAP_AP_CARD; } else { /* PCI devices don't set the DEVTYPE property. */ if (udevHasDeviceProperty(device, "PCI_CLASS")) @@ -1267,6 +1295,8 @@ udevGetDeviceDetails(struct udev_device *device, return udevProcessCCW(device, def); case VIR_NODE_DEV_CAP_CSS_DEV: return udevProcessCSS(device, def); + case VIR_NODE_DEV_CAP_AP_CARD: + return udevProcessAPCard(device, def); case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_SYSTEM: case VIR_NODE_DEV_CAP_FC_HOST: diff --git a/tests/nodedevschemadata/ap_card07.xml b/tests/nodedevschemadat= a/ap_card07.xml new file mode 100644 index 00000000..14a845fd --- /dev/null +++ b/tests/nodedevschemadata/ap_card07.xml @@ -0,0 +1,8 @@ + + ap_card07 + /sys/devices/ap/card07 + computer + + 0x07 + + diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c index 3cb23b1d..7990f6cd 100644 --- a/tests/nodedevxml2xmltest.c +++ b/tests/nodedevxml2xmltest.c @@ -124,6 +124,7 @@ mymain(void) DO_TEST("mdev_3627463d_b7f0_4fea_b468_f1da537d301b"); DO_TEST("ccw_0_0_ffff"); DO_TEST("css_0_0_ffff"); + DO_TEST("ap_card07"); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 483e36bd..98268916 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -464,6 +464,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G= _GNUC_UNUSED) case VIR_NODE_DEV_CAP_CSS_DEV: flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV; break; + case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_LAST: break; } --=20 2.26.2 From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278126; cv=none; d=zohomail.com; s=zohoarc; b=XIjc65OTCoqagh5Sy5CU7Cq13/ncvolkrJUKY7E4dx08sBhFhd7CpJwk1GdGHq2A/d7TPQFWxeACxpu6w0K6E65atCthnUoman3P1XKTnvCpA0328KR+YfqkdgJ1VsdSMhuyrO0jOaCOjheDMm3MlY5nCtBg+nK7LGBa5hi3zRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278126; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UfE8xDvZj3jre2bEBAF+xBCJbxdG8i5rPO0jILZNwaY=; b=mtgcaF38qASOtec+WT035yQEp+koA/JXgAIwDs6MnYRYyWLKURUT4ThZuUp49JOTaOxiIaotZ+fLxp0c61KKcl2ubi0M1LrHh36NjRZnRIl6D7p3KU0ze1aNPoZ1OCfMB9jdKtd8CD8fmIyXim3vyUus6yvwQbqPAUx8G7Ig6iw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1603278126095442.0887363719065; Wed, 21 Oct 2020 04:02:06 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-483-coUjUYGkPPGGZIq_UI4B-w-1; Wed, 21 Oct 2020 07:00:47 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D38BA18829D9; Wed, 21 Oct 2020 11:00:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF8606EF44; Wed, 21 Oct 2020 11:00:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6FBA518005A2; Wed, 21 Oct 2020 11:00:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0JFV025168 for ; Wed, 21 Oct 2020 07:00:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2EA382049CB7; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 290232017E93 for ; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0919F8582A8 for ; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-413-eoDFIo5xNsOTomdOVAm5NA-1; Wed, 21 Oct 2020 07:00:16 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAYtOV116276 for ; Wed, 21 Oct 2020 07:00:15 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 34ak42h2pb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:15 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAussR026413 for ; Wed, 21 Oct 2020 11:00:11 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 348d5qucf2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:11 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB08pw20644146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:09 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C203BA4076; Wed, 21 Oct 2020 11:00:07 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E252A405F; Wed, 21 Oct 2020 11:00:07 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:07 +0000 (GMT) X-MC-Unique: coUjUYGkPPGGZIq_UI4B-w-1 X-MC-Unique: eoDFIo5xNsOTomdOVAm5NA-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 2/7] nodedev: Detect AP Queues Date: Wed, 21 Oct 2020 12:59:57 +0200 Message-Id: <20201021110002.303518-3-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_05:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 mlxscore=0 suspectscore=9 phishscore=0 priorityscore=1501 spamscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210082 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Farhan Ali , Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Farhan Ali Each AP Card device can support upto 256 AP Queues. AP Queues are also detected by udev, so add support for libvirt nodedev driver. Signed-off-by: Farhan Ali Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- docs/formatnode.html.in | 11 +++++ docs/schemas/nodedev.rng | 25 +++++++++++ src/conf/node_device_conf.c | 59 ++++++++++++++++++++++++++ src/conf/node_device_conf.h | 9 ++++ src/conf/virnodedeviceobj.c | 1 + src/node_device/node_device_udev.c | 27 ++++++++++++ tests/nodedevschemadata/ap_07_0038.xml | 9 ++++ tests/nodedevxml2xmltest.c | 1 + tools/virsh-nodedev.c | 1 + 9 files changed, 143 insertions(+) create mode 100644 tests/nodedevschemadata/ap_07_0038.xml diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in index 300ddf21..16f68f38 100644 --- a/docs/formatnode.html.in +++ b/docs/formatnode.html.in @@ -439,6 +439,17 @@
AP Card identifier.
+
ap_queue
+
Describes the AP Queue on a S390 host. An AP Queue is + identified by it's ap-adapter and ap-domain id. Sub-elements= include: +
+
ap-adapter
+
The ap-adapter of an AP Queue identifies AP Card to which + this queue belongs.
+
ap-domain
+
AP Queue identifier.
+
+
diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index 06ccb9c8..5f812c8f 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -87,6 +87,7 @@ + @@ -685,6 +686,18 @@ =20 + + + ap_queue + + + + + + + + + @@ -718,4 +731,16 @@ =20 + + + + (0x)?[0-9a-fA-F]{1,4} + + + 0 + 255 + + + + diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 88c00b5b..d27b0c71 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -67,6 +67,7 @@ VIR_ENUM_IMPL(virNodeDevCap, "ccw", "css", "ap_card", + "ap_queue", ); =20 VIR_ENUM_IMPL(virNodeDevNetCap, @@ -616,6 +617,12 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def) virBufferAsprintf(&buf, "0x%02x\n", data->ap_card.ap_adapter); break; + case VIR_NODE_DEV_CAP_AP_QUEUE: + virBufferAsprintf(&buf, "0x%02x\n", + data->ap_queue.ap_adapter); + virBufferAsprintf(&buf, "0x%04x\n", + data->ap_queue.ap_domain); + break; case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_FC_HOST: case VIR_NODE_DEV_CAP_VPORTS: @@ -839,6 +846,52 @@ virNodeDevCapAPCardParseXML(xmlXPathContextPtr ctxt, } =20 =20 +static int +virNodeDevCapAPQueueParseXML(xmlXPathContextPtr ctxt, + virNodeDeviceDefPtr def, + xmlNodePtr node, + virNodeDevCapAPQueuePtr ap_queue) +{ + xmlNodePtr orig; + int ret =3D -1; + g_autofree char *adapter =3D NULL, *dom =3D NULL; + + orig =3D ctxt->node; + ctxt->node =3D node; + + if (!(adapter =3D virXPathString("string(./ap-adapter[1])", ctxt))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("missing ap-adapter value for '%s'"), def->name); + return -1; + } + + if (virStrToLong_uip(adapter, NULL, 0, &ap_queue->ap_adapter) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid ap-adapter value '%s' for '%s'"), + adapter, def->name); + goto out; + } + + if (!(dom =3D virXPathString("string(./ap-domain[1])", ctxt))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("missing ap-domain value for '%s'"), def->name); + goto out; + } + + if (virStrToLong_uip(dom, NULL, 0, &ap_queue->ap_domain) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid ap-domain value '%s' for '%s'"), + dom, def->name); + goto out; + } + + ret =3D 0; + out: + ctxt->node =3D orig; + return ret; +} + + static int virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, virNodeDeviceDefPtr def, @@ -1938,6 +1991,10 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, ret =3D virNodeDevCapAPCardParseXML(ctxt, def, node, &caps->data.ap_card); break; + case VIR_NODE_DEV_CAP_AP_QUEUE: + ret =3D virNodeDevCapAPQueueParseXML(ctxt, def, node, + &caps->data.ap_queue); + break; case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_FC_HOST: case VIR_NODE_DEV_CAP_VPORTS: @@ -2260,6 +2317,7 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps) case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_CSS_DEV: case VIR_NODE_DEV_CAP_AP_CARD: + case VIR_NODE_DEV_CAP_AP_QUEUE: case VIR_NODE_DEV_CAP_LAST: /* This case is here to shutup the compiler */ break; @@ -2315,6 +2373,7 @@ virNodeDeviceUpdateCaps(virNodeDeviceDefPtr def) case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_CSS_DEV: case VIR_NODE_DEV_CAP_AP_CARD: + case VIR_NODE_DEV_CAP_AP_QUEUE: case VIR_NODE_DEV_CAP_LAST: break; } diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index aa2dac43..c8100c8b 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -66,6 +66,7 @@ typedef enum { VIR_NODE_DEV_CAP_CCW_DEV, /* s390 CCW device */ VIR_NODE_DEV_CAP_CSS_DEV, /* s390 channel subsystem device */ VIR_NODE_DEV_CAP_AP_CARD, /* s390 AP Card device */ + VIR_NODE_DEV_CAP_AP_QUEUE, /* s390 AP Queue */ =20 VIR_NODE_DEV_CAP_LAST } virNodeDevCapType; @@ -282,6 +283,13 @@ struct _virNodeDevCapAPCard { unsigned int ap_adapter; }; =20 +typedef struct _virNodeDevCapAPQueue virNodeDevCapAPQueue; +typedef virNodeDevCapAPQueue *virNodeDevCapAPQueuePtr; +struct _virNodeDevCapAPQueue { + unsigned int ap_adapter; + unsigned int ap_domain; +}; + typedef struct _virNodeDevCapData virNodeDevCapData; typedef virNodeDevCapData *virNodeDevCapDataPtr; struct _virNodeDevCapData { @@ -301,6 +309,7 @@ struct _virNodeDevCapData { virNodeDevCapMdev mdev; virNodeDevCapCCW ccw_dev; virNodeDevCapAPCard ap_card; + virNodeDevCapAPQueue ap_queue; }; }; =20 diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 8d3e5a43..0fd44f6f 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -712,6 +712,7 @@ virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_CSS_DEV: case VIR_NODE_DEV_CAP_AP_CARD: + case VIR_NODE_DEV_CAP_AP_QUEUE: case VIR_NODE_DEV_CAP_LAST: break; } diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index c513b4cc..16a73db2 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1168,6 +1168,29 @@ udevProcessAPCard(struct udev_device *device, } =20 =20 +static int +udevProcessAPQueue(struct udev_device *device, + virNodeDeviceDefPtr def) +{ + char *c; + virNodeDevCapDataPtr data =3D &def->caps->data; + + if ((c =3D strrchr(def->sysfs_path, '/')) =3D=3D NULL || + virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_adapter) < 0 || + virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_domain) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to parse the AP Queue from sysfs path: '%= s'"), + def->sysfs_path); + return -1; + } + + if (udevGenerateDeviceName(device, def, NULL) !=3D 0) + return -1; + + return 0; +} + + static int udevGetDeviceNodes(struct udev_device *device, virNodeDeviceDefPtr def) @@ -1224,6 +1247,8 @@ udevGetDeviceType(struct udev_device *device, *type =3D VIR_NODE_DEV_CAP_DRM; else if (STREQ(devtype, "ap_card")) *type =3D VIR_NODE_DEV_CAP_AP_CARD; + else if (STREQ(devtype, "ap_queue")) + *type =3D VIR_NODE_DEV_CAP_AP_QUEUE; } else { /* PCI devices don't set the DEVTYPE property. */ if (udevHasDeviceProperty(device, "PCI_CLASS")) @@ -1297,6 +1322,8 @@ udevGetDeviceDetails(struct udev_device *device, return udevProcessCSS(device, def); case VIR_NODE_DEV_CAP_AP_CARD: return udevProcessAPCard(device, def); + case VIR_NODE_DEV_CAP_AP_QUEUE: + return udevProcessAPQueue(device, def); case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_SYSTEM: case VIR_NODE_DEV_CAP_FC_HOST: diff --git a/tests/nodedevschemadata/ap_07_0038.xml b/tests/nodedevschemada= ta/ap_07_0038.xml new file mode 100644 index 00000000..553c68f2 --- /dev/null +++ b/tests/nodedevschemadata/ap_07_0038.xml @@ -0,0 +1,9 @@ + + ap_07_0038 + /sys/devices/ap/card07/07.0038 + ap_card07 + + 0x07 + 0x0038 + + diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c index 7990f6cd..d6ab25bf 100644 --- a/tests/nodedevxml2xmltest.c +++ b/tests/nodedevxml2xmltest.c @@ -125,6 +125,7 @@ mymain(void) DO_TEST("ccw_0_0_ffff"); DO_TEST("css_0_0_ffff"); DO_TEST("ap_card07"); + DO_TEST("ap_07_0038"); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 98268916..f79e0b78 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -465,6 +465,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G= _GNUC_UNUSED) flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV; break; case VIR_NODE_DEV_CAP_AP_CARD: + case VIR_NODE_DEV_CAP_AP_QUEUE: case VIR_NODE_DEV_CAP_LAST: break; } --=20 2.26.2 From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278055; cv=none; d=zohomail.com; s=zohoarc; b=Jyp/ZwORfMmarn6/0OZyi8pxF27huO9XT3liamTBHhuIK4lS3CnDVDwn5MdizpAwXc4rWGEGMpVYMdWR0E4Leweehr13e7y5vxHHAsuRYJvdQU79/HnoQX1LzYUQcCJnzj3jN+Z/6Wa0KttOl1ghm52u8QnpnS9b34Izt1Y3t50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278055; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ptlzVdqi2jHhsJqMw81ocjMDELMmHeem5wZxgjwil38=; b=FB4alegZ2MB0bHBKHnA+1AhycbKV3Nd5Wh5U8iXntdYXHNY365QyDbLl5/ODKVMbQwmsDQgHKHVrVKH7PUHM/oNXRmgyRgYXitWAzn3vJPgtbqY++UIdt+q+4F6K9aryVqtQzK4C+BZnh5KIp1ynxPOys3IsYOj5AqTifTAYeK4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603278055246606.369998732604; Wed, 21 Oct 2020 04:00:55 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-98-iKGvmxYNP6eRpRzYmq9y2w-1; Wed, 21 Oct 2020 07:00:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 95BAE87505D; Wed, 21 Oct 2020 11:00:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D3BB100239A; Wed, 21 Oct 2020 11:00:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3706D8C7DB; Wed, 21 Oct 2020 11:00:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0LTv025192 for ; Wed, 21 Oct 2020 07:00:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 69C7F200E21D; Wed, 21 Oct 2020 11:00:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 640B120316D9 for ; Wed, 21 Oct 2020 11:00:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4A35A857021 for ; Wed, 21 Oct 2020 11:00:21 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-377-aYxxp6Y5N0my26Mopnzlrg-1; Wed, 21 Oct 2020 07:00:17 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAX1Vs070185 for ; Wed, 21 Oct 2020 07:00:15 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 34ajecag7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:14 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAv0iW032519 for ; Wed, 21 Oct 2020 11:00:12 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04fra.de.ibm.com with ESMTP id 347r88a5yq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:12 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB09Vo28180858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:09 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E448FA404D; Wed, 21 Oct 2020 11:00:08 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C49A4A407D; Wed, 21 Oct 2020 11:00:08 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:08 +0000 (GMT) X-MC-Unique: iKGvmxYNP6eRpRzYmq9y2w-1 X-MC-Unique: aYxxp6Y5N0my26Mopnzlrg-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 3/7] virsh: nodedev: Filter by AP Card and AP Queue capabilities Date: Wed, 21 Oct 2020 12:59:58 +0200 Message-Id: <20201021110002.303518-4-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_03:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 suspectscore=0 malwarescore=0 phishscore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210082 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Farhan Ali , Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Farhan Ali Add support to filter by 'ap_card' and 'ap_queue' capabilities. Signed-off-by: Farhan Ali Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk Signed-off-by: Shalini Chellathurai Saroja --- docs/manpages/virsh.rst | 2 +- include/libvirt/libvirt-nodedev.h | 2 ++ src/conf/node_device_conf.h | 4 +++- src/conf/virnodedeviceobj.c | 4 +++- src/libvirt-nodedev.c | 2 ++ tools/virsh-nodedev.c | 4 ++++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index d34a1c86..e4110c45 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -4970,7 +4970,7 @@ List all of the devices available on the node that ar= e 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'. +'mdev_types', 'ccw', 'css', 'ap_card', 'ap_queue'. If *--tree* is used, the output is formatted in a tree representing parent= s of each node. *cap* and *--tree* are mutually exclusive. =20 diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-no= dedev.h index dd2ffd57..789f9c86 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -82,6 +82,8 @@ typedef enum { VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV =3D 1 << 14, /* Mediat= ed device */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV =3D 1 << 15, /* CCW de= vice */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV =3D 1 << 16, /* CSS de= vice */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD =3D 1 << 17, /* s390 A= P Card device */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE =3D 1 << 18, /* s390 A= P Queue */ } virConnectListAllNodeDeviceFlags; =20 int virConnectListAllNodeDevices (virConnectPtr conn, diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index c8100c8b..d732efaa 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -386,7 +386,9 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps); 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) + VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV | \ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD | \ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE) =20 int virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host); diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 0fd44f6f..0ce230db 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -864,7 +864,9 @@ virNodeDeviceObjMatch(virNodeDeviceObjPtr obj, MATCH(MDEV_TYPES) || MATCH(MDEV) || MATCH(CCW_DEV) || - MATCH(CSS_DEV))) + MATCH(CSS_DEV) || + MATCH(AP_CARD) || + MATCH(AP_QUEUE))) return false; } =20 diff --git a/src/libvirt-nodedev.c b/src/libvirt-nodedev.c index 28765b9c..762413eb 100644 --- a/src/libvirt-nodedev.c +++ b/src/libvirt-nodedev.c @@ -102,6 +102,8 @@ virNodeNumOfDevices(virConnectPtr conn, const char *cap= , unsigned int flags) * VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV * VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV * VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV + * VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD + * VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE * * Returns the number of node devices found or -1 and sets @devices to NUL= L in * case of error. On success, the array stored into @devices is guarantee= d to diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index f79e0b78..3862d8f3 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -465,7 +465,11 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd = G_GNUC_UNUSED) flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV; break; case VIR_NODE_DEV_CAP_AP_CARD: + flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD; + break; case VIR_NODE_DEV_CAP_AP_QUEUE: + flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE; + break; case VIR_NODE_DEV_CAP_LAST: break; } --=20 2.26.2 From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278054; cv=none; d=zohomail.com; s=zohoarc; b=faw5VvwrNaqeTq/KVS9pGvaVD38oKgXsjOVHWNT+Dy8+id0pE6H+huP/YuVSdVLJrszIxPWI6KRT5aBDE1r91Lxym+l7+c+PjwbCO500Mi4VK5YV81n7nN3lz8w2Fb47swjJ6xkL3/8ME9a7cmQKHmdDE/Zim5EYZ+y3l5MNICY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278054; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DfHHIHq9i9Ef6/0C0J7sfior4YptomMphzA3yflSov0=; b=jefncgpT3KOK7yjRWx14h730boQa94X1omx6UlIVpg93+Tny++Xo3qxrAMTsoLmg0qk6ZNKJ/GDIbchjjIgWLNEz3NO41ZL5V2I1NBu2xeGu3DGQ5ZLMY6AqUAs1J+vAzfFffAY10dpAPRee4JbCf6LNYcMsSc7fTMYV7N9/C9U= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603278054830503.41378400368603; Wed, 21 Oct 2020 04:00:54 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-492-m4v_1dzkNBa9OinCWclQmQ-1; Wed, 21 Oct 2020 07:00:51 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E74D410E2181; Wed, 21 Oct 2020 11:00:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFF742616B; Wed, 21 Oct 2020 11:00:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 891EF181A06D; Wed, 21 Oct 2020 11:00:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0NiX025211 for ; Wed, 21 Oct 2020 07:00:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id D3ADA114B304; Wed, 21 Oct 2020 11:00:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF148114B303 for ; Wed, 21 Oct 2020 11:00:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8A18E85829E for ; Wed, 21 Oct 2020 11:00:20 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-452-7PArFrPEM42NgNPu2Y_A0A-1; Wed, 21 Oct 2020 07:00:18 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAVhwL004382 for ; Wed, 21 Oct 2020 07:00:17 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 34ak37h2qq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:16 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAwPsJ014842 for ; Wed, 21 Oct 2020 11:00:13 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 347qvhc7sj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:13 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB0A2e28574028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:10 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1213FA4078; Wed, 21 Oct 2020 11:00:10 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7B89A4053; Wed, 21 Oct 2020 11:00:09 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:09 +0000 (GMT) X-MC-Unique: m4v_1dzkNBa9OinCWclQmQ-1 X-MC-Unique: 7PArFrPEM42NgNPu2Y_A0A-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 4/7] nodedev: detect AP Matrix device Date: Wed, 21 Oct 2020 12:59:59 +0200 Message-Id: <20201021110002.303518-5-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_03:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 mlxscore=0 phishscore=0 adultscore=0 suspectscore=2 bulkscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210078 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for AP matrix device in libvirt nodedev driver. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- docs/schemas/nodedev.rng | 7 ++++++ src/conf/node_device_conf.c | 10 +++++++- src/conf/node_device_conf.h | 8 +++++++ src/conf/virnodedeviceobj.c | 1 + src/node_device/node_device_udev.c | 23 +++++++++++++++++++ tests/nodedevschemadata/ap_matrix.xml | 7 ++++++ ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 9 ++++++++ tests/nodedevxml2xmltest.c | 2 ++ tools/virsh-nodedev.c | 1 + 9 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 tests/nodedevschemadata/ap_matrix.xml create mode 100644 tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2= a01e8e48ad.xml diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index 5f812c8f..7c017ff1 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -88,6 +88,7 @@ + @@ -698,6 +699,12 @@ =20 + + + ap_matrix + + + diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index d27b0c71..33c9a020 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -68,6 +68,7 @@ VIR_ENUM_IMPL(virNodeDevCap, "css", "ap_card", "ap_queue", + "ap_matrix", ); =20 VIR_ENUM_IMPL(virNodeDevNetCap, @@ -626,6 +627,7 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def) case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_FC_HOST: case VIR_NODE_DEV_CAP_VPORTS: + case VIR_NODE_DEV_CAP_AP_MATRIX: case VIR_NODE_DEV_CAP_LAST: break; } @@ -1995,6 +1997,9 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, ret =3D virNodeDevCapAPQueueParseXML(ctxt, def, node, &caps->data.ap_queue); break; + case VIR_NODE_DEV_CAP_AP_MATRIX: + ret =3D 0; + break; case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_FC_HOST: case VIR_NODE_DEV_CAP_VPORTS: @@ -2310,6 +2315,9 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps) virMediatedDeviceAttrFree(data->mdev.attributes[i]); VIR_FREE(data->mdev.attributes); break; + case VIR_NODE_DEV_CAP_AP_MATRIX: + VIR_FREE(data->ap_matrix.addr); + break; case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_DRM: case VIR_NODE_DEV_CAP_FC_HOST: @@ -2374,6 +2382,7 @@ virNodeDeviceUpdateCaps(virNodeDeviceDefPtr def) case VIR_NODE_DEV_CAP_CSS_DEV: case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_AP_QUEUE: + case VIR_NODE_DEV_CAP_AP_MATRIX: case VIR_NODE_DEV_CAP_LAST: break; } @@ -2722,7 +2731,6 @@ virNodeDeviceGetPCIDynamicCaps(const char *sysfsPath = G_GNUC_UNUSED, return -1; } =20 - int virNodeDeviceGetSCSITargetCaps(const char *sysfsPath G_GNUC_UNUSED, virNodeDevCapSCSITargetPtr scsi_target = G_GNUC_UNUSED) { diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index d732efaa..f1e57ad7 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -67,6 +67,7 @@ typedef enum { VIR_NODE_DEV_CAP_CSS_DEV, /* s390 channel subsystem device */ VIR_NODE_DEV_CAP_AP_CARD, /* s390 AP Card device */ VIR_NODE_DEV_CAP_AP_QUEUE, /* s390 AP Queue */ + VIR_NODE_DEV_CAP_AP_MATRIX, /* s390 AP Matrix device */ =20 VIR_NODE_DEV_CAP_LAST } virNodeDevCapType; @@ -290,6 +291,12 @@ struct _virNodeDevCapAPQueue { unsigned int ap_domain; }; =20 +typedef struct _virNodeDevCapAPMatrix virNodeDevCapAPMatrix; +typedef virNodeDevCapAPMatrix *virNodeDevCapAPMatrixPtr; +struct _virNodeDevCapAPMatrix { + char *addr; +}; + typedef struct _virNodeDevCapData virNodeDevCapData; typedef virNodeDevCapData *virNodeDevCapDataPtr; struct _virNodeDevCapData { @@ -310,6 +317,7 @@ struct _virNodeDevCapData { virNodeDevCapCCW ccw_dev; virNodeDevCapAPCard ap_card; virNodeDevCapAPQueue ap_queue; + virNodeDevCapAPMatrix ap_matrix; }; }; =20 diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 0ce230db..a19017b8 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -713,6 +713,7 @@ virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, case VIR_NODE_DEV_CAP_CSS_DEV: case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_AP_QUEUE: + case VIR_NODE_DEV_CAP_AP_MATRIX: case VIR_NODE_DEV_CAP_LAST: break; } diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 16a73db2..ea983726 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1191,6 +1191,25 @@ udevProcessAPQueue(struct udev_device *device, } =20 =20 +static int +udevProcessAPMatrix(struct udev_device *device, + virNodeDeviceDefPtr def) +{ + size_t i; + virNodeDevCapDataPtr data =3D &def->caps->data; + + data->ap_matrix.addr =3D g_strdup(udev_device_get_sysname(device)); + def->name =3D g_strdup_printf("ap_%s", data->ap_matrix.addr); + + for (i =3D 0; i < strlen(def->name); i++) { + if (!(g_ascii_isalnum(*(def->name + i)))) + *(def->name + i) =3D '_'; + } + + return 0; +} + + static int udevGetDeviceNodes(struct udev_device *device, virNodeDeviceDefPtr def) @@ -1274,6 +1293,8 @@ udevGetDeviceType(struct udev_device *device, *type =3D VIR_NODE_DEV_CAP_CCW_DEV; else if (STREQ_NULLABLE(subsystem, "css")) *type =3D VIR_NODE_DEV_CAP_CSS_DEV; + else if (STREQ_NULLABLE(subsystem, "matrix")) + *type =3D VIR_NODE_DEV_CAP_AP_MATRIX; =20 VIR_FREE(subsystem); } @@ -1324,6 +1345,8 @@ udevGetDeviceDetails(struct udev_device *device, return udevProcessAPCard(device, def); case VIR_NODE_DEV_CAP_AP_QUEUE: return udevProcessAPQueue(device, def); + case VIR_NODE_DEV_CAP_AP_MATRIX: + return udevProcessAPMatrix(device, def); case VIR_NODE_DEV_CAP_MDEV_TYPES: case VIR_NODE_DEV_CAP_SYSTEM: case VIR_NODE_DEV_CAP_FC_HOST: diff --git a/tests/nodedevschemadata/ap_matrix.xml b/tests/nodedevschemadat= a/ap_matrix.xml new file mode 100644 index 00000000..30dab9cf --- /dev/null +++ b/tests/nodedevschemadata/ap_matrix.xml @@ -0,0 +1,7 @@ + + ap_matrix + /sys/devices/vfio_ap/matrix + computer + + + diff --git a/tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e4= 8ad.xml b/tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad= .xml new file mode 100644 index 00000000..106f7593 --- /dev/null +++ b/tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml @@ -0,0 +1,9 @@ + + mdev_ee0b88c4-f554-4dc1-809d-b2a01e8e48ad + /sys/devices/vfio_ap/matrix/mdev_ee0b88c4-f554-4dc1-809d-b2a01e8e4= 8ad + ap_matrix + + + + + diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c index d6ab25bf..69d72ff0 100644 --- a/tests/nodedevxml2xmltest.c +++ b/tests/nodedevxml2xmltest.c @@ -126,6 +126,8 @@ mymain(void) DO_TEST("css_0_0_ffff"); DO_TEST("ap_card07"); DO_TEST("ap_07_0038"); + DO_TEST("ap_matrix"); + DO_TEST("mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad"); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 3862d8f3..d39d87c7 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -470,6 +470,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G= _GNUC_UNUSED) case VIR_NODE_DEV_CAP_AP_QUEUE: flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE; break; + case VIR_NODE_DEV_CAP_AP_MATRIX: case VIR_NODE_DEV_CAP_LAST: break; } --=20 2.26.2 From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278100; cv=none; d=zohomail.com; s=zohoarc; b=ngbKiMoIaBgBIYJMYBZd3sAav4xQga2/reGklUnvXWpy4l85t4l5BtQdKxIbTsXTCFQtFi4OoalFTYGbwGCzm883cBXUNqcfkMWbkAX3/s5Pjbv+jam2S/OvuOy1VdftNlAdvhP/VGjdRW30lqqyYbvoP3enkkybXkiSrVWXAFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278100; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5ETpeSKgng5cGz6/rGfOmagBu6oE7S+3Q1QYLw28nuA=; b=f1vNsuKB9olEM3dC3jc2ZgfAkEQ3WNuFR9VIY6bXodRGSMKV04it5Wa/JkEzTuzKQSEl3P4SP10R+Ddyh5u04xH42YSRwsmaY7c1l21U1v86bWTmpO+s7Ef3OxGYA3xuSGti0SY0N9EJ2IGnXGIj/pFoycje1IXsQ7Jz3603vVg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603278100890430.35414329057323; Wed, 21 Oct 2020 04:01:40 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-224-KtnGlSjlM42ei0mFox1wuQ-1; Wed, 21 Oct 2020 07:00:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 60A4310E218C; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E7995B4C2; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 586F8180B791; Wed, 21 Oct 2020 11:00:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0JEg025169 for ; Wed, 21 Oct 2020 07:00:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6589A2017E93; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 609FF200E21D for ; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 386F4811E8F for ; Wed, 21 Oct 2020 11:00:19 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-520-zzcchq33O7WmMP6FmyVGEA-1; Wed, 21 Oct 2020 07:00:16 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAWGil192638 for ; Wed, 21 Oct 2020 07:00:16 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 34ak6q0xm5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:16 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAxGd8002792 for ; Wed, 21 Oct 2020 11:00:14 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04fra.de.ibm.com with ESMTP id 347r88a5ys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:14 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB0B8l19398922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:11 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F384A407B; Wed, 21 Oct 2020 11:00:11 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB640A4053; Wed, 21 Oct 2020 11:00:10 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:10 +0000 (GMT) X-MC-Unique: KtnGlSjlM42ei0mFox1wuQ-1 X-MC-Unique: zzcchq33O7WmMP6FmyVGEA-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 5/7] virsh: nodedev: filter by AP Matrix capability Date: Wed, 21 Oct 2020 13:00:00 +0200 Message-Id: <20201021110002.303518-6-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_03:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=9 mlxscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210078 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support to filter by 'ap_matrix' capability. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- docs/formatnode.html.in | 3 +++ docs/manpages/virsh.rst | 2 +- include/libvirt/libvirt-nodedev.h | 1 + src/conf/node_device_conf.h | 3 ++- src/conf/virnodedeviceobj.c | 3 ++- src/libvirt-nodedev.c | 1 + tools/virsh-nodedev.c | 2 ++ 7 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in index 16f68f38..db621bcf 100644 --- a/docs/formatnode.html.in +++ b/docs/formatnode.html.in @@ -450,6 +450,9 @@
AP Queue identifier.
+
ap_matrix
+
Describes an AP Matrix device on a S390 architecture providi= ng + cryptographic host resources usable for virtualization.
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index e4110c45..ff7e8812 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -4970,7 +4970,7 @@ List all of the devices available on the node that ar= e 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 parent= s of each node. *cap* and *--tree* are mutually exclusive. =20 diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-no= dedev.h index 789f9c86..0d7f33e0 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -84,6 +84,7 @@ typedef enum { VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV =3D 1 << 16, /* CSS de= vice */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_CARD =3D 1 << 17, /* s390 A= P Card device */ VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE =3D 1 << 18, /* s390 A= P Queue */ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX =3D 1 << 19, /* s390 A= P Matrix */ } virConnectListAllNodeDeviceFlags; =20 int virConnectListAllNodeDevices (virConnectPtr conn, diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index f1e57ad7..6daef571 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -396,7 +396,8 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps); VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV | \ 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_QUEUE | \ + VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX) =20 int virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host); diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index a19017b8..33dab6da 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -867,7 +867,8 @@ virNodeDeviceObjMatch(virNodeDeviceObjPtr obj, MATCH(CCW_DEV) || MATCH(CSS_DEV) || MATCH(AP_CARD) || - MATCH(AP_QUEUE))) + MATCH(AP_QUEUE) || + MATCH(AP_MATRIX))) return false; } =20 diff --git a/src/libvirt-nodedev.c b/src/libvirt-nodedev.c index 762413eb..eb8c735a 100644 --- a/src/libvirt-nodedev.c +++ b/src/libvirt-nodedev.c @@ -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 NUL= L in * case of error. On success, the array stored into @devices is guarantee= d to diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index d39d87c7..d5a8514e 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -471,6 +471,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G= _GNUC_UNUSED) flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE; break; case VIR_NODE_DEV_CAP_AP_MATRIX: + flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX; + break; case VIR_NODE_DEV_CAP_LAST: break; } --=20 2.26.2 From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278057; cv=none; d=zohomail.com; s=zohoarc; b=A4DDWhPbO6+hbsjLqb7l9JsJVSH9TKiwT/TP6gziXDAEIeJL31TRhFuhRudvgeaXA81uRxpJdiGVLX4zdSo2uxGc1PNhpw1t6TCuNWZa3x5pkqkzUNo0nUj9zZokt5RZHoZxNf6A0B1xTmJPODxTUKJ4q9YIWZaiqDly8Qmih4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278057; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TqunJT0bedqGI6VlwV1kzjqkgM6U57PTK9Sc7PYa7IU=; b=kmBSZqTucJhcTRzRodflrq7XeRMkHawPGxRfyniGKZ+rA6XeIR63ml/qeyhhOLjAfIHt6EySjFejVDexdnKn0cuid7Bd0tppr4IyEmIGP/PDlDXdkFPxa3S/7qrR2dXM1Mz0463D4TRT47ciV5bUevWwrE8A9etsV0kTdqrEpw0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603278057654300.81138527887526; Wed, 21 Oct 2020 04:00:57 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-284-bmeyrVT0NEegS4bYT5sj-A-1; Wed, 21 Oct 2020 07:00:53 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 64ED610E2184; Wed, 21 Oct 2020 11:00:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F89755770; Wed, 21 Oct 2020 11:00:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 073628C7DE; Wed, 21 Oct 2020 11:00:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0O9w025216 for ; Wed, 21 Oct 2020 07:00:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 62FF8F5670; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D000FDCED for ; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 42C6F102F1E3 for ; Wed, 21 Oct 2020 11:00:24 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481--4PpqSUBOWWkltmK1yQXFA-1; Wed, 21 Oct 2020 07:00:21 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAWDX4055313 for ; Wed, 21 Oct 2020 07:00:19 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 34ajnb1u0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:19 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAvxqU021593 for ; Wed, 21 Oct 2020 11:00:15 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma01fra.de.ibm.com with ESMTP id 347r8826d7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:15 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB0CIS25821634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:12 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0796DA405D; Wed, 21 Oct 2020 11:00:12 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D9BE1A404D; Wed, 21 Oct 2020 11:00:11 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:11 +0000 (GMT) X-MC-Unique: bmeyrVT0NEegS4bYT5sj-A-1 X-MC-Unique: -4PpqSUBOWWkltmK1yQXFA-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 6/7] node_device: refactor address retrieval of node device Date: Wed, 21 Oct 2020 13:00:01 +0200 Message-Id: <20201021110002.303518-7-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_03:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 malwarescore=0 mlxlogscore=956 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210078 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use switch statements instead of if-else condition in the method nodeDeviceFindAddressByName to retrieve address of a node device. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/node_device/node_device_driver.c | 29 ++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index f5ea973c..d77b47c6 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -638,7 +638,8 @@ nodeDeviceFindAddressByName(const char *name) =20 def =3D virNodeDeviceObjGetDef(dev); for (caps =3D def->caps; caps !=3D NULL; caps =3D caps->next) { - if (caps->data.type =3D=3D VIR_NODE_DEV_CAP_PCI_DEV) { + switch (caps->data.type) { + case VIR_NODE_DEV_CAP_PCI_DEV: { virPCIDeviceAddress pci_addr =3D { .domain =3D caps->data.pci_dev.domain, .bus =3D caps->data.pci_dev.bus, @@ -648,7 +649,9 @@ nodeDeviceFindAddressByName(const char *name) =20 addr =3D virPCIDeviceAddressAsString(&pci_addr); break; - } else if (caps->data.type =3D=3D VIR_NODE_DEV_CAP_CSS_DEV) { + } + + case VIR_NODE_DEV_CAP_CSS_DEV: { virDomainDeviceCCWAddress ccw_addr =3D { .cssid =3D caps->data.ccw_dev.cssid, .ssid =3D caps->data.ccw_dev.ssid, @@ -657,6 +660,28 @@ nodeDeviceFindAddressByName(const char *name) =20 addr =3D virDomainCCWAddressAsString(&ccw_addr); break; + } + + case VIR_NODE_DEV_CAP_SYSTEM: + case VIR_NODE_DEV_CAP_USB_DEV: + case VIR_NODE_DEV_CAP_USB_INTERFACE: + case VIR_NODE_DEV_CAP_NET: + case VIR_NODE_DEV_CAP_SCSI_HOST: + case VIR_NODE_DEV_CAP_SCSI_TARGET: + case VIR_NODE_DEV_CAP_SCSI: + case VIR_NODE_DEV_CAP_STORAGE: + case VIR_NODE_DEV_CAP_FC_HOST: + case VIR_NODE_DEV_CAP_VPORTS: + case VIR_NODE_DEV_CAP_SCSI_GENERIC: + case VIR_NODE_DEV_CAP_DRM: + case VIR_NODE_DEV_CAP_MDEV_TYPES: + case VIR_NODE_DEV_CAP_MDEV: + case VIR_NODE_DEV_CAP_CCW_DEV: + case VIR_NODE_DEV_CAP_AP_CARD: + case VIR_NODE_DEV_CAP_AP_QUEUE: + case VIR_NODE_DEV_CAP_AP_MATRIX: + case VIR_NODE_DEV_CAP_LAST: + break; } } =20 --=20 2.26.2 From nobody Sat May 4 00:06:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1603278051; cv=none; d=zohomail.com; s=zohoarc; b=VIgBTCQwvMkb+GNyiTa61Dwm+8FRQY1QPzAC9q6lFtpRVudKDl2lR+f6LPJvwOGUyQtD6QztwTL2lNFAKGg7FpOHOLNreJZQnPv3lLcF4/32YZHc2gpiE+nPOI7INeC53ednR/QyDAzKPfkyFtW+fhVqglphMyOH71WVVNfGzdM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603278051; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6fBvWbrJ2KyI8vf4uliIihGTzP9eQuGh1Dt7r9hxy4s=; b=WgtrepzshVdn78iyG5L8tNnT2WxfTrPOTUTszNNm2wv9PXEM3ZqF05gRKZET538bY5/m0QY3KGGmxpdRjEOahC6k/126lmy9zBUPjb7X7DJ+k7dlwsxnS0nKKzFKMezbMEmQXjS5DqqAOr9Bov5V2J5MIogvdHTIQqVWhCpwIvU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603278051524624.907704140282; Wed, 21 Oct 2020 04:00:51 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-394-FQ9PZlCiOxmd_V5nsiqfng-1; Wed, 21 Oct 2020 07:00:48 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90DFB80362F; Wed, 21 Oct 2020 11:00:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6EE6E6EF69; Wed, 21 Oct 2020 11:00:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3B5668C7DB; Wed, 21 Oct 2020 11:00:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09LB0LlE025188 for ; Wed, 21 Oct 2020 07:00:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2DBB0200E21A; Wed, 21 Oct 2020 11:00:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28F5C2028DCC for ; Wed, 21 Oct 2020 11:00:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F0F180353F for ; Wed, 21 Oct 2020 11:00:21 +0000 (UTC) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-437-ut3io36COpCUYer1O8UdbA-1; Wed, 21 Oct 2020 07:00:18 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09LAVeSJ018596 for ; Wed, 21 Oct 2020 07:00:18 -0400 Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 34aj9ejhuc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 07:00:17 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09LAwAhm000473 for ; Wed, 21 Oct 2020 11:00:15 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma06fra.de.ibm.com with ESMTP id 347qvha6tc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Oct 2020 11:00:15 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09LB0Dae30998950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Oct 2020 11:00:13 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC670A406F; Wed, 21 Oct 2020 11:00:12 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA929A407B; Wed, 21 Oct 2020 11:00:12 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Oct 2020 11:00:12 +0000 (GMT) X-MC-Unique: FQ9PZlCiOxmd_V5nsiqfng-1 X-MC-Unique: ut3io36COpCUYer1O8UdbA-1 From: Shalini Chellathurai Saroja To: Libvirt Mailing List Subject: [PATCH libvirt v1 7/7] node_device: mdev matrix support Date: Wed, 21 Oct 2020 13:00:02 +0200 Message-Id: <20201021110002.303518-8-shalini@linux.ibm.com> In-Reply-To: <20201021110002.303518-1-shalini@linux.ibm.com> References: <20201021110002.303518-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-21_03:2020-10-20, 2020-10-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 phishscore=0 clxscore=1015 bulkscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010210078 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Shalini Chellathurai Saroja X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Allow mdev devices to be created on the matrix device. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/node_device/node_device_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index d77b47c6..11d50bf6 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -662,6 +662,10 @@ nodeDeviceFindAddressByName(const char *name) break; } =20 + case VIR_NODE_DEV_CAP_AP_MATRIX: + addr =3D g_strdup(caps->data.ap_matrix.addr); + break; + case VIR_NODE_DEV_CAP_SYSTEM: case VIR_NODE_DEV_CAP_USB_DEV: case VIR_NODE_DEV_CAP_USB_INTERFACE: @@ -679,7 +683,6 @@ nodeDeviceFindAddressByName(const char *name) case VIR_NODE_DEV_CAP_CCW_DEV: case VIR_NODE_DEV_CAP_AP_CARD: case VIR_NODE_DEV_CAP_AP_QUEUE: - case VIR_NODE_DEV_CAP_AP_MATRIX: case VIR_NODE_DEV_CAP_LAST: break; } --=20 2.26.2