From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704133368500.85419385203716; Mon, 7 May 2018 07:42:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D19D330B79F4; Mon, 7 May 2018 14:42:11 +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 9156360BE7; Mon, 7 May 2018 14:42:11 +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 3EE175BBE4; Mon, 7 May 2018 14:42:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47Efa5g001118 for ; Mon, 7 May 2018 10:41:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 489A82010CDA; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FF8C20154EF for ; Mon, 7 May 2018 14:41:30 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1F8630023CF for ; Mon, 7 May 2018 14:41:28 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EdsNJ157260 for ; Mon, 7 May 2018 10:41:27 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2htpbtq409-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:26 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:24 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:22 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfLhk7078280; Mon, 7 May 2018 14:41:21 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1E4FDAE055; Mon, 7 May 2018 15:30:51 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C769AAE053; Mon, 7 May 2018 15:30:50 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:50 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:11 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0044-0000-0000-0000054FF970 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0045-0000-0000-0000289134B4 Message-Id: <20180507144118.6260-2-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 07 May 2018 14:41:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 07 May 2018 14:41:28 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.44 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 1/8] qemu: introduce capability for virtual-css-bridge 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 07 May 2018 14:42:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Let us introduce the capability QEMU_CAPS_CCW for virtual-css-bridge and replace QEMU_CAPS_VIRTIO_CCW with QEMU_CAPS_CCW in code segments which identify support for ccw devices. The virtual-css-bridge is part of the ccw support introduced in QEMU 2.7. The QEMU_CAPS_CCW capability is based on the existence of the QEMU type. Let us also add the capability QEMU_CAPS_CCW to the tests which require support for ccw devices. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- src/qemu/qemu_capabilities.c | 9 +++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain_address.c | 4 +- src/qemu/qemu_hotplug.c | 4 +- tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 + tests/qemuhotplugtest.c | 2 +- tests/qemuxml2argvtest.c | 86 ++++++++++++--------= ---- tests/qemuxml2xmltest.c | 26 +++---- 13 files changed, 77 insertions(+), 62 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 920a596..ae3d2a6 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -475,6 +475,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "disk-write-cache", "nbd-tls", "tpm-crb", + "virtual-css-bridge", ); =20 =20 @@ -1101,6 +1102,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-mouse-ccw", QEMU_CAPS_DEVICE_VIRTIO_MOUSE_CCW }, { "virtio-tablet-ccw", QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW }, { "pcie-pci-bridge", QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE }, + { "virtual-css-bridge", QEMU_CAPS_CCW }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[]= =3D { @@ -3906,6 +3908,13 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_CACHE); =20 + if (ARCH_IS_S390(qemuCaps->arch)) { + /* Legacy assurance for QEMU_CAPS_CCW */ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCW) && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_CCW)) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_CCW); + } + ret =3D 0; cleanup: return ret; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index abd6eff..e8a916c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -459,6 +459,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DISK_WRITE_CACHE, /* qemu block frontends support write-cach= e param */ QEMU_CAPS_NBD_TLS, /* NBD server supports TLS transport */ QEMU_CAPS_DEVICE_TPM_CRB, /* -device tpm-crb */ + QEMU_CAPS_CCW, /* -device virtual-css-bridge */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 727ea33..fcf95b1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11782,7 +11782,7 @@ qemuDomainCheckCCWS390AddressSupport(const virDomai= nDef *def, "'%s' using machine type '%s'"), devicename, def->os.machine); return false; - } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_CCW)) { + } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCW)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("CCW address type is not supported by " "this QEMU")); diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index ce2b079..8a5ff74 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -396,7 +396,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def, virDomainCCWAddressSetPtr addrs =3D NULL; =20 if (qemuDomainIsS390CCW(def) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_CCW)) { + virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCW)) { qemuDomainPrimeVirtioDeviceAddresses( def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW); =20 @@ -2985,7 +2985,7 @@ qemuDomainEnsureVirtioAddress(bool *releaseAddr, =20 if (!info->type) { if (qemuDomainIsS390CCW(vm->def) && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW)) + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CCW)) info->type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW; else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_S390)) info->type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 9ca8e66..a8e0e91 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1001,7 +1001,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, } =20 if (qemuDomainIsS390CCW(vm->def) && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW)) { + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CCW)) { net->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW; if (!(ccwaddrs =3D qemuDomainCCWAddrSetCreateFromDomain(vm->def))) goto cleanup; @@ -2437,7 +2437,7 @@ qemuDomainAttachSCSIVHostDevice(virQEMUDriverPtr driv= er, =20 if (hostdev->info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { if (qemuDomainIsS390CCW(vm->def) && - virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW)) + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CCW)) hostdev->info->type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW; } =20 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.s390x.xml index 098326e..24bd8e8 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -114,6 +114,7 @@ + 2010000 0 303326 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index 64bd554..6776031 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -119,6 +119,7 @@ + 2011000 0 342058 diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.7.0.s390x.xml index 2662873..10ce426 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml @@ -104,6 +104,7 @@ + 2007000 0 216732 diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.8.0.s390x.xml index 3449ca5..800fcc5 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -106,6 +106,7 @@ + 2007093 0 241633 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.s390x.xml index 2122a51..f8aee83 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -109,6 +109,7 @@ + 2009000 0 265051 diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 85e5365..0c88f36 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -74,7 +74,7 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, =20 virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW); + virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_CCW); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_DISK_WWN); diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ddf567b..9a05803 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -965,11 +965,11 @@ mymain(void) DO_TEST("disk-many", NONE); DO_TEST("disk-virtio", QEMU_CAPS_DRIVE_BOOT); DO_TEST("disk-virtio-ccw", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-virtio-ccw-many", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-virtio-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-order", QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("disk-virtio-drive-queues", @@ -1240,7 +1240,7 @@ mymain(void) DO_TEST("net-virtio-s390", QEMU_CAPS_VIRTIO_S390); DO_TEST("net-virtio-ccw", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("net-virtio-rxtxqueuesize", QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE, QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE); @@ -1353,7 +1353,7 @@ mymain(void) QEMU_CAPS_VIRTIO_S390); DO_TEST("console-virtio-ccw", QEMU_CAPS_BOOTINDEX, - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("console-sclp", QEMU_CAPS_VIRTIO_S390, @@ -1516,7 +1516,7 @@ mymain(void) QEMU_CAPS_OBJECT_USB_AUDIO); DO_TEST("fs9p", NONE); DO_TEST("fs9p-ccw", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); =20 DO_TEST("hostdev-usb-address", NONE); DO_TEST("hostdev-usb-address-device", NONE); @@ -1560,13 +1560,13 @@ mymain(void) DO_TEST_FAILURE("iothreads-nocap", NONE); DO_TEST("iothreads-disk", QEMU_CAPS_OBJECT_IOTHREAD); DO_TEST("iothreads-disk-virtio-ccw", QEMU_CAPS_OBJECT_IOTHREAD, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("iothreads-virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_OBJECT_IOTHREAD, QEMU_CAPS_VIRTIO_SCSI_IOTHREAD); DO_TEST("iothreads-virtio-scsi-ccw", QEMU_CAPS_OBJECT_IOTHREAD, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI_IOTHREAD, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); =20 DO_TEST("cpu-topology1", NONE); DO_TEST("cpu-topology2", NONE); @@ -1598,7 +1598,7 @@ mymain(void) DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM); =20 qemuTestSetHostArch(driver.caps, VIR_ARCH_S390X); - DO_TEST("cpu-s390-zEC12", QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_CCW, QEMU_CA= PS_VIRTIO_S390); + DO_TEST("cpu-s390-zEC12", QEMU_CAPS_KVM, QEMU_CAPS_CCW, QEMU_CAPS_VIRT= IO_S390); DO_TEST("cpu-s390-features", QEMU_CAPS_KVM, QEMU_CAPS_QUERY_CPU_MODEL_= EXPANSION); DO_TEST_FAILURE("cpu-s390-features", QEMU_CAPS_KVM); qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE); @@ -1936,7 +1936,7 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_EGD); DO_TEST("virtio-rng-ccw", QEMU_CAPS_BOOTINDEX, - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); @@ -1953,28 +1953,28 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_RANDOM); =20 DO_TEST("s390-panic-no-address", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("s390-panic-address", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-panic-missing", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_PARSE_ERROR("s390-no-parallel", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-serial", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_SCLPCONSOLE); DO_TEST("s390-serial-2", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_SCLPCONSOLE, QEMU_CAPS_DEVICE_SCLPLMCONSOLE); DO_TEST("s390-serial-console", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_SCLPCONSOLE); =20 @@ -2315,7 +2315,7 @@ mymain(void) # endif DO_TEST("hostdev-scsi-vhost-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, - QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_VIRTIO_CCW); + QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_CCW); DO_TEST("hostdev-scsi-vhost-scsi-pci", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC); @@ -2569,99 +2569,99 @@ mymain(void) QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-on-caps", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-on-caps", NONE); =20 DO_TEST("machine-aeskeywrap-on-cap", QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-on-cap", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-on-cap", NONE); =20 DO_TEST("machine-aeskeywrap-off-caps", QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-off-caps", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-off-caps", NONE); =20 DO_TEST("machine-aeskeywrap-off-cap", QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-off-cap", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-aeskeywrap-off-cap", NONE); =20 DO_TEST("machine-deakeywrap-on-caps", QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-on-caps", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-on-caps", NONE); =20 DO_TEST("machine-deakeywrap-on-cap", QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-on-cap", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-on-cap", NONE); =20 DO_TEST("machine-deakeywrap-off-caps", QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-off-caps", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-off-caps", NONE); =20 DO_TEST("machine-deakeywrap-off-cap", QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-off-cap", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST_FAILURE("machine-deakeywrap-off-cap", NONE); =20 DO_TEST("machine-keywrap-none-caps", QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("machine-keywrap-none", QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); =20 DO_TEST("machine-loadparm-s390", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM); DO_TEST("machine-loadparm-net-s390", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM); DO_TEST("machine-loadparm-multiple-disks-nets-s390", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM); DO_TEST_PARSE_ERROR("machine-loadparm-s390-char-invalid", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM); DO_TEST_PARSE_ERROR("machine-loadparm-s390-len-invalid", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM); =20 @@ -2807,14 +2807,14 @@ mymain(void) DO_TEST("disk-many-format-probing", QEMU_CAPS_DRIVE_BOOT); driver.config->allowDiskFormatProbing =3D false; =20 - DO_TEST("video-virtio-gpu-ccw", QEMU_CAPS_VIRTIO_CCW, + DO_TEST("video-virtio-gpu-ccw", QEMU_CAPS_CCW, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS, QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW); =20 - DO_TEST("input-virtio-ccw", QEMU_CAPS_VIRTIO_CCW, + DO_TEST("input-virtio-ccw", QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_KEYBOARD, QEMU_CAPS_VIRTIO_MOUSE, QEMU_CAPS_VIRTIO_TABLET, diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 53a26a0..f0b1c34 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -502,11 +502,11 @@ mymain(void) DO_TEST("cputune-iothreads", NONE); DO_TEST("iothreads-disk", NONE); DO_TEST("iothreads-disk-virtio-ccw", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("iothreads-virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI); DO_TEST("iothreads-virtio-scsi-ccw", - QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("lease", NONE); DO_TEST("event_idx", NONE); @@ -910,7 +910,7 @@ mymain(void) =20 DO_TEST("hostdev-scsi-vhost-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, - QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_VIRTIO_CCW); + QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_CCW); DO_TEST("hostdev-scsi-vhost-scsi-pci", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC); @@ -961,19 +961,19 @@ mymain(void) QEMU_CAPS_DEVICE_SCSI_GENERIC); =20 DO_TEST("s390-defaultconsole", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-panic", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-panic-missing", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-panic-no-address", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-serial", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-serial-2", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-serial-console", - QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); =20 DO_TEST("pcihole64", NONE); DO_TEST("pcihole64-gib", NONE); @@ -1116,14 +1116,14 @@ mymain(void) DO_TEST("video-qxl-noheads", NONE); DO_TEST("video-virtio-gpu-secondary", NONE); DO_TEST("video-virtio-gpu-ccw", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS, QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW); DO_TEST("video-virtio-gpu-ccw-auto", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS, @@ -1165,7 +1165,7 @@ mymain(void) =20 DO_TEST("user-aliases", NONE); DO_TEST("input-virtio-ccw", - QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_KEYBOARD, QEMU_CAPS_VIRTIO_MOUSE, QEMU_CAPS_VIRTIO_TABLET, --=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704419379114.00569951745001; Mon, 7 May 2018 07:46:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F08B030023F2; Mon, 7 May 2018 14:46:57 +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 B7DE431320A4; Mon, 7 May 2018 14:46:57 +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 6210E5BBE6; Mon, 7 May 2018 14:46:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfYSw001011 for ; Mon, 7 May 2018 10:41:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0AE531001F4F; Mon, 7 May 2018 14:41:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 030111001F4E for ; Mon, 7 May 2018 14:41:30 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCD9130A034B for ; Mon, 7 May 2018 14:41:28 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EdvHB157573 for ; Mon, 7 May 2018 10:41:28 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2htpbtq418-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:28 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:26 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:23 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfMH79109966; Mon, 7 May 2018 14:41:22 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67E46AE053; Mon, 7 May 2018 15:30:52 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2BB04AE04D; Mon, 7 May 2018 15:30:52 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:52 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:12 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0040-0000-0000-00000436FD8C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0041-0000-0000-0000263B32E1 Message-Id: <20180507144118.6260-3-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 07 May 2018 14:41:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 07 May 2018 14:41:29 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 2/8] qemu: introduce vfio-ccw capability 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 07 May 2018 14:46:58 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Let us introduce the capability vfio-ccw for supporting the basic channel I/O passthrough, which have been introduced in QEMU 2.10. The current focus is to support dasd-eckd (cu_type/dev_type =3D 0x3990/0x3390) as the target device. Let us also introduce the capability QEMU_CAPS_CCW_CSSID_UNRESTRICTED for virtual-css-bridge. This capability is based on the cssid-unrestricted property which exists if QEMU no longer enforces cssid restrictions based on ccw device types. Vfio-ccw capability is dependent on the hidden virtual-css-bridge, so that we are able to probe for the cssid-unrestriced property to make sure the devices are visible to non-mcss-e enabled guests. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- src/qemu/qemu_capabilities.c | 14 ++++++++++ src/qemu/qemu_capabilities.h | 4 +++ .../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 28 ++++++++++++------- tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 28 ++++++++++++------- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.12.0.s390x.replies | 31 ++++++++++++++++--= ---- tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 3 +++ .../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 24 ++++++++++++----- tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 28 ++++++++++++------- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 28 ++++++++++++------- tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 2 +- 14 files changed, 142 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index ae3d2a6..b2e1fab 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -476,6 +476,10 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "nbd-tls", "tpm-crb", "virtual-css-bridge", + + /* 295 */ + "virtual-css-bridge.cssid-unrestricted", + "vfio-ccw", ); =20 =20 @@ -1103,6 +1107,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-tablet-ccw", QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW }, { "pcie-pci-bridge", QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE }, { "virtual-css-bridge", QEMU_CAPS_CCW }, + { "vfio-ccw", QEMU_CAPS_DEVICE_VFIO_CCW }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[]= =3D { @@ -1244,6 +1249,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevi= cePropsIntelIOMMU[] =3D { { "device-iotlb", QEMU_CAPS_INTEL_IOMMU_DEVICE_IOTLB }, }; =20 +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtualCSSBridg= e[] =3D { + { "cssid-unrestricted", QEMU_CAPS_CCW_CSSID_UNRESTRICTED }, +}; + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =3D { { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUS= TER_DEBUG_LEVEL}, @@ -1369,6 +1378,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsDevicePr= ops[] =3D { { "virtio-gpu-ccw", virQEMUCapsDevicePropsVirtioGpu, ARRAY_CARDINALITY(virQEMUCapsDevicePropsVirtioGpu), QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW }, + { "virtual-css-bridge", virQEMUCapsObjectPropsVirtualCSSBridge, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtualCSSBridge), + QEMU_CAPS_CCW }, }; =20 =20 @@ -3913,6 +3925,8 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCW) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_CCW)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_CCW); + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCW_CSSID_UNRESTRICTED)) + virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_VFIO_CCW); } =20 ret =3D 0; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index e8a916c..74ac41d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -461,6 +461,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for= syntax-check */ QEMU_CAPS_DEVICE_TPM_CRB, /* -device tpm-crb */ QEMU_CAPS_CCW, /* -device virtual-css-bridge */ =20 + /* 295 */ + QEMU_CAPS_CCW_CSSID_UNRESTRICTED, /* virtual-css-bridge.cssid-unrestri= cted=3D */ + QEMU_CAPS_DEVICE_VFIO_CCW, /* -device vfio-ccw */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.10.0.s390x.replies index 534756f..3e19ac6 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.replies @@ -3405,6 +3405,16 @@ { "return": [ { + "name": "css_dev_path", + "type": "bool" + } + ], + "id": "libvirt-34" +} + +{ + "return": [ + { "hotpluggable-cpus": false, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3447,7 +3457,7 @@ "cpu-max": 248 } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -3981,19 +3991,19 @@ "migration-safe": true } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "return": [ ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { @@ -5098,7 +5108,7 @@ "option": "drive" } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -5148,7 +5158,7 @@ "capability": "return-path" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -14871,7 +14881,7 @@ "meta-type": "object" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -14911,11 +14921,11 @@ } } }, - "id": "libvirt-41" + "id": "libvirt-42" } =20 { - "id": "libvirt-42", + "id": "libvirt-43", "error": { "class": "GenericError", "desc": "Property '.migratable' not found" diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.s390x.xml index 24bd8e8..cb7b35c 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -117,7 +117,7 @@ 2010000 0 - 303326 + 303434 s390x diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.11.0.s390x.replies index 2de2560..21fede3 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies @@ -3524,6 +3524,16 @@ { "return": [ { + "name": "css_dev_path", + "type": "bool" + } + ], + "id": "libvirt-35" +} + +{ + "return": [ + { "hotpluggable-cpus": true, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3571,7 +3581,7 @@ "cpu-max": 248 } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { @@ -4105,20 +4115,20 @@ "migration-safe": true } ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { "return": [ "emulator" ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -5239,7 +5249,7 @@ "option": "drive" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -5297,7 +5307,7 @@ "capability": "x-multifd" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -15165,7 +15175,7 @@ "meta-type": "object" } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { @@ -15204,11 +15214,11 @@ } } }, - "id": "libvirt-42" + "id": "libvirt-43" } =20 { - "id": "libvirt-43", + "id": "libvirt-44", "error": { "class": "GenericError", "desc": "Property '.migratable' not found" diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index 6776031..cefb863 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -122,7 +122,7 @@ 2011000 0 - 342058 + 342166 s390x diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.12.0.s390x.replies index c4e44c6..4a0317b 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies @@ -3617,6 +3617,21 @@ { "return": [ { + "name": "cssid-unrestricted", + "description": "A css device can use any cssid, regardless whether v= irtual or not (read only, always true)", + "type": "bool" + }, + { + "name": "css_dev_path", + "type": "bool" + } + ], + "id": "libvirt-35" +} + +{ + "return": [ + { "hotpluggable-cpus": true, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3669,7 +3684,7 @@ "alias": "s390-ccw-virtio" } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { @@ -6324,20 +6339,20 @@ "migration-safe": true } ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { "return": [ "emulator" ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -7493,7 +7508,7 @@ "option": "drive" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -7555,7 +7570,7 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -18923,11 +18938,11 @@ "meta-type": "object" } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { - "id": "libvirt-42", + "id": "libvirt-43", "error": { "class": "GenericError", "desc": "The CPU definition 'max' is unknown." diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.s390x.xml index 80f3ec6..f1995eb 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -120,6 +120,9 @@ + + + 2011090 0 0 diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.replies b/tests/qe= mucapabilitiesdata/caps_2.7.0.s390x.replies index 61fbd9a..fe2aecd 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.replies @@ -2550,6 +2550,16 @@ { "return": [ { + "name": "css_dev_path", + "type": "bool" + } + ], + "id": "libvirt-34" +} + +{ + "return": [ + { "hotpluggable-cpus": false, "name": "s390-ccw-virtio-2.5", "cpu-max": 248 @@ -2577,7 +2587,7 @@ "cpu-max": 248 } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -2586,19 +2596,19 @@ "name": "host" } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "return": [ ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { @@ -3534,7 +3544,7 @@ "option": "drive" } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -3568,7 +3578,7 @@ "capability": "postcopy-ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -11924,7 +11934,7 @@ "meta-type": "object" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.7.0.s390x.xml index 10ce426..3c5601c 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml @@ -107,7 +107,7 @@ 2007000 0 - 216732 + 216840 s390x diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies b/tests/qe= mucapabilitiesdata/caps_2.8.0.s390x.replies index 818118c..34734ec 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies @@ -2823,6 +2823,16 @@ { "return": [ { + "name": "css_dev_path", + "type": "bool" + } + ], + "id": "libvirt-34" +} + +{ + "return": [ + { "hotpluggable-cpus": false, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -2855,7 +2865,7 @@ "alias": "s390-ccw-virtio" } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -3181,19 +3191,19 @@ "migration-safe": true } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "return": [ ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { @@ -4154,7 +4164,7 @@ "option": "drive" } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -4192,7 +4202,7 @@ "capability": "x-colo" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -12962,7 +12972,7 @@ "meta-type": "object" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -12988,11 +12998,11 @@ } } }, - "id": "libvirt-41" + "id": "libvirt-42" } =20 { - "id": "libvirt-42", + "id": "libvirt-43", "error": { "class": "GenericError", "desc": "Property '.migratable' not found" diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.8.0.s390x.xml index 800fcc5..55c2c5b 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -109,7 +109,7 @@ 2007093 0 - 241633 + 241741 s390x diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.replies b/tests/qe= mucapabilitiesdata/caps_2.9.0.s390x.replies index cbacec6..967148a 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.replies @@ -3104,6 +3104,16 @@ { "return": [ { + "name": "css_dev_path", + "type": "bool" + } + ], + "id": "libvirt-34" +} + +{ + "return": [ + { "hotpluggable-cpus": false, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3141,7 +3151,7 @@ "cpu-max": 248 } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -3531,19 +3541,19 @@ "migration-safe": true } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "return": [ ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { @@ -4618,7 +4628,7 @@ "option": "drive" } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -4660,7 +4670,7 @@ "capability": "release-ram" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -13946,7 +13956,7 @@ "meta-type": "object" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -13973,11 +13983,11 @@ } } }, - "id": "libvirt-41" + "id": "libvirt-42" } =20 { - "id": "libvirt-42", + "id": "libvirt-43", "error": { "class": "GenericError", "desc": "Property '.migratable' not found" diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.s390x.xml index f8aee83..497e02d 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -112,7 +112,7 @@ 2009000 0 - 265051 + 265159 s390x --=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704239822354.2436837102422; Mon, 7 May 2018 07:43:59 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 0369630023CF; Mon, 7 May 2018 14:43:56 +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 CA53C1001959; Mon, 7 May 2018 14:43:55 +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 888E45BBE6; Mon, 7 May 2018 14:43:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfaQ0001136 for ; Mon, 7 May 2018 10:41:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 866B830B498D; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7BB9730B4985 for ; Mon, 7 May 2018 14:41:32 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 813493004435 for ; Mon, 7 May 2018 14:41:30 +0000 (UTC) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EeUnM140821 for ; Mon, 7 May 2018 10:41:29 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 2htqcpm8hc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:29 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:27 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:24 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfODO7864710; Mon, 7 May 2018 14:41:24 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB065AE059; Mon, 7 May 2018 15:30:53 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79FA8AE056; Mon, 7 May 2018 15:30:53 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:53 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:13 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0040-0000-0000-00000455FC56 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0041-0000-0000-000020FA3776 Message-Id: <20180507144118.6260-4-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 07 May 2018 14:41:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 07 May 2018 14:41:30 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 3/8] util: virhostdev: add virHostdevIsMdevDevice() 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 07 May 2018 14:43:58 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Add the function virHostdevIsMdevDevice() which detects whether a hostdev is a mediated device or not. Also, replace all existing conditionals. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 4 +--- src/qemu/qemu_domain_address.c | 8 ++++---- src/qemu/qemu_hostdev.c | 3 +-- src/util/virhostdev.c | 26 +++++++++++++++++--------- src/util/virhostdev.h | 3 +++ 6 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 92b5e0f..36150a3 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1925,6 +1925,7 @@ virHostCPUStatsAssign; =20 # util/virhostdev.h virHostdevFindUSBDevice; +virHostdevIsMdevDevice; virHostdevIsSCSIDevice; virHostdevManagerGetDefault; virHostdevPCINodeDeviceDetach; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 50b0ffc..df1c046 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5294,9 +5294,7 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, } =20 /* MDEV */ - if (hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && - subsys->type =3D=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) { - + if (virHostdevIsMdevDevice(hostdev)) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("VFIO PCI device assignment is not " diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 8a5ff74..50f815c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -655,10 +655,10 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDev= iceDefPtr dev, virPCIDevicePtr pciDev; virPCIDeviceAddressPtr hostAddr =3D &hostdev->source.subsys.u.pci.= addr; =20 - if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS || - (hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TY= PE_PCI && - hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TY= PE_MDEV && - hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TY= PE_SCSI_HOST)) { + if (!virHostdevIsMdevDevice(hostdev) && + (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS || + (hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_T= YPE_PCI && + hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_T= YPE_SCSI_HOST))) { return 0; } =20 diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index d2b5460..955b5df 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@ -339,8 +339,7 @@ qemuHostdevPrepareMediatedDevices(virQEMUDriverPtr driv= er, supportsVFIO =3D virFileExists("/dev/vfio/vfio"); =20 for (i =3D 0; i < nhostdevs; i++) { - if (hostdevs[i]->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && - hostdevs[i]->source.subsys.type =3D=3D VIR_DOMAIN_HOSTDEV_SUBS= YS_TYPE_MDEV) { + if (virHostdevIsMdevDevice(hostdevs[i])) { if (!supportsVFIO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Mediated host device assignment requires= " diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index db10b7a..f4bd19d 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -372,6 +372,20 @@ virHostdevIsSCSIDevice(virDomainHostdevDefPtr hostdev) } =20 =20 +/** + * virHostdevIsMdevDevice: + * @hostdev: host device to check + * + * Returns true if @hostdev is a Mediated device, false otherwise. + */ +bool +virHostdevIsMdevDevice(virDomainHostdevDefPtr hostdev) +{ + return hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && + hostdev->source.subsys.type =3D=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_= MDEV; +} + + static int virHostdevNetConfigVirtPortProfile(const char *linkdev, int vf, virNetDevVPortProfilePtr virtPort, @@ -1330,10 +1344,8 @@ virHostdevUpdateActiveMediatedDevices(virHostdevMana= gerPtr mgr, =20 mdevsrc =3D &hostdev->source.subsys.u.mdev; =20 - if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS || - hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYP= E_MDEV) { + if (!virHostdevIsMdevDevice(hostdev)) continue; - } =20 if (!(mdev =3D virMediatedDeviceNew(mdevsrc->uuidstr, mdevsrc->mod= el))) goto cleanup; @@ -1828,9 +1840,7 @@ virHostdevPrepareMediatedDevices(virHostdevManagerPtr= mgr, virDomainHostdevSubsysMediatedDevPtr src =3D &hostdev->source.subs= ys.u.mdev; virMediatedDevicePtr mdev; =20 - if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) - continue; - if (hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYP= E_MDEV) + if (!virHostdevIsMdevDevice(hostdev)) continue; =20 if (!(mdev =3D virMediatedDeviceNew(src->uuidstr, src->model))) @@ -2087,10 +2097,8 @@ virHostdevReAttachMediatedDevices(virHostdevManagerP= tr mgr, =20 mdevsrc =3D &hostdev->source.subsys.u.mdev; =20 - if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS || - hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYP= E_MDEV) { + if (!virHostdevIsMdevDevice(hostdev)) continue; - } =20 if (!(mdev =3D virMediatedDeviceNew(mdevsrc->uuidstr, mdevsrc->model))) diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 54e1c66..8f77c00 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -191,6 +191,9 @@ virHostdevReAttachDomainDevices(virHostdevManagerPtr mg= r, bool virHostdevIsSCSIDevice(virDomainHostdevDefPtr hostdev) ATTRIBUTE_NONNULL(1); +bool +virHostdevIsMdevDevice(virDomainHostdevDefPtr hostdev) + ATTRIBUTE_NONNULL(1); =20 /* functions used by NodeDevDetach/Reattach/Reset */ int virHostdevPCINodeDeviceDetach(virHostdevManagerPtr mgr, --=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704425238294.90126230556143; Mon, 7 May 2018 07:47:05 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 4EE5085365; Mon, 7 May 2018 14:47:03 +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 1B83C600D2; Mon, 7 May 2018 14:47:03 +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 A723B180BADC; Mon, 7 May 2018 14:47:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfYSD001046 for ; Mon, 7 May 2018 10:41:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id C7B4169286; Mon, 7 May 2018 14:41:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B229068D99 for ; Mon, 7 May 2018 14:41:32 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62BAC30BB7FA for ; Mon, 7 May 2018 14:41:31 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47Edqh7138047 for ; Mon, 7 May 2018 10:41:31 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htr7mspen-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:30 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:28 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:25 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfPGr5505338; Mon, 7 May 2018 14:41:25 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 171DBAE055; Mon, 7 May 2018 15:30:55 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA1F3AE04D; Mon, 7 May 2018 15:30:54 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:54 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:14 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0008-0000-0000-000004F3F9ED X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0009-0000-0000-00001E88354C Message-Id: <20180507144118.6260-5-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 07 May 2018 14:41:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 07 May 2018 14:41:31 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 4/8] qemu: vfio-ccw device address generation 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 07 May 2018 14:47:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Introduces the vfio-ccw model for mediated devices and prime vfio-ccw devices such that CCW address will be generated. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer Reviewed-by: Stefan Zimmermann Reviewed-by: John Ferlan --- docs/schemas/domaincommon.rng | 5 ++++- src/qemu/qemu_domain_address.c | 20 ++++++++++++++++++++ src/util/virmdev.c | 3 ++- src/util/virmdev.h | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 0a6b29b..bea2bc0 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4478,7 +4478,10 @@ mdev - vfio-pci + + vfio-pci + vfio-ccw + diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 50f815c..be0424d 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -282,6 +282,23 @@ qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def) =20 =20 static void +qemuDomainPrimeVfioDeviceAddresses(virDomainDefPtr def, + virDomainDeviceAddressType type) +{ + size_t i; + + for (i =3D 0; i < def->nhostdevs; i++) { + virDomainHostdevSubsysPtr subsys =3D &def->hostdevs[i]->source.sub= sys; + + if (virHostdevIsMdevDevice(def->hostdevs[i]) && + subsys->u.mdev.model =3D=3D VIR_MDEV_MODEL_TYPE_VFIO_CCW && + def->hostdevs[i]->info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_= TYPE_NONE) + def->hostdevs[i]->info->type =3D type; + } +} + + +static void qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def, virDomainDeviceAddressType type) { @@ -397,6 +414,9 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def, =20 if (qemuDomainIsS390CCW(def) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCW)) { + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_CCW)) + qemuDomainPrimeVfioDeviceAddresses( + def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW); qemuDomainPrimeVirtioDeviceAddresses( def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW); =20 diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 536ddbe..6c51388 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -48,7 +48,8 @@ struct _virMediatedDeviceList { }; =20 VIR_ENUM_IMPL(virMediatedDeviceModel, VIR_MDEV_MODEL_TYPE_LAST, - "vfio-pci") + "vfio-pci", + "vfio-ccw") =20 static virClassPtr virMediatedDeviceListClass; =20 diff --git a/src/util/virmdev.h b/src/util/virmdev.h index 01ab02e..cfda2ca 100644 --- a/src/util/virmdev.h +++ b/src/util/virmdev.h @@ -25,6 +25,7 @@ =20 typedef enum { VIR_MDEV_MODEL_TYPE_VFIO_PCI =3D 0, + VIR_MDEV_MODEL_TYPE_VFIO_CCW =3D 1, =20 VIR_MDEV_MODEL_TYPE_LAST } virMediatedDeviceModelType; --=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15257041378079.075460846222086; Mon, 7 May 2018 07:42:17 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 57BE0C03D466; Mon, 7 May 2018 14:42:16 +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 1FBBD100195F; Mon, 7 May 2018 14:42:16 +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 9E1BC180BAE8; Mon, 7 May 2018 14:42:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfaEZ001137 for ; Mon, 7 May 2018 10:41:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 85C4730B4981; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B9CF30B4982 for ; Mon, 7 May 2018 14:41:32 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1CE0883C3 for ; Mon, 7 May 2018 14:41:31 +0000 (UTC) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EdpCI105917 for ; Mon, 7 May 2018 10:41:31 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htqdum3vb-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:31 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:28 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:27 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfQSm63176730; Mon, 7 May 2018 14:41:26 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6517EAE051; Mon, 7 May 2018 15:30:56 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 24AF5AE04D; Mon, 7 May 2018 15:30:56 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:56 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:15 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0012-0000-0000-000005D39A10 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0013-0000-0000-00001950A3F0 Message-Id: <20180507144118.6260-6-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 07 May 2018 14:41:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 07 May 2018 14:41:31 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 5/8] qemu: command line generation for vfio-ccw device 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 07 May 2018 14:42:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Generates the QEMU command line for the vfio-ccw device. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer Reviewed-by: John Ferlan --- src/qemu/qemu_command.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index df1c046..ea545b3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5071,11 +5071,17 @@ qemuBuildHostdevMediatedDevStr(const virDomainDef *= def, virDomainHostdevSubsysMediatedDevPtr mdevsrc =3D &dev->source.subsys.u= .mdev; char *ret =3D NULL; char *mdevPath =3D NULL; + const char *dev_str =3D NULL; =20 if (!(mdevPath =3D virMediatedDeviceGetSysfsPath(mdevsrc->uuidstr))) goto cleanup; =20 - virBufferAddLit(&buf, "vfio-pci"); + dev_str =3D virMediatedDeviceModelTypeToString(mdevsrc->model); + + if (!dev_str) + goto cleanup; + + virBufferAdd(&buf, dev_str, -1); virBufferAsprintf(&buf, ",id=3D%s,sysfsdev=3D%s", dev->info->alias, md= evPath); =20 if (qemuBuildDeviceAddressStr(&buf, def, dev->info, qemuCaps) < 0) @@ -5295,11 +5301,28 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, =20 /* MDEV */ if (virHostdevIsMdevDevice(hostdev)) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("VFIO PCI device assignment is not " - "supported by this version of qemu")); + switch ((virMediatedDeviceModelType) subsys->u.mdev.model) { + case VIR_MDEV_MODEL_TYPE_VFIO_PCI: + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("VFIO PCI device assignment is not " + "supported by this version of QEMU")); + return -1; + } + break; + case VIR_MDEV_MODEL_TYPE_VFIO_CCW: + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_CCW)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("VFIO CCW device assignment is not " + "supported by this version of QEMU")); + return -1; + } + break; + case VIR_MDEV_MODEL_TYPE_LAST: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unexpected vfio type '%d'"), subsys->u.m= dev.model); return -1; + break; } =20 virCommandAddArg(cmd, "-device"); --=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704430238743.8542197241593; Mon, 7 May 2018 07:47:10 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id CCE08C058EC8; Mon, 7 May 2018 14:47:08 +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 93F8D1001959; Mon, 7 May 2018 14:47:08 +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 500FB180BAE5; Mon, 7 May 2018 14:47:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfZgm001089 for ; Mon, 7 May 2018 10:41:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id A22A91001F4F; Mon, 7 May 2018 14:41:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B61D1001F4E for ; Mon, 7 May 2018 14:41:35 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25D4530C809E for ; Mon, 7 May 2018 14:41:34 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EdrgT138210 for ; Mon, 7 May 2018 10:41:33 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htr7mspgd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:33 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:31 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:28 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfSgt1769954; Mon, 7 May 2018 14:41:28 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4B01AE051; Mon, 7 May 2018 15:30:57 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 757D9AE045; Mon, 7 May 2018 15:30:57 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:57 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:16 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0044-0000-0000-0000054FF973 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0045-0000-0000-0000289134B8 Message-Id: <20180507144118.6260-7-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 07 May 2018 14:41:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 07 May 2018 14:41:34 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 6/8] tests: tests for vfio-ccw passthrough 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 07 May 2018 14:47:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Let us test the following functionalities of vfio-ccw in libvirt 1. Generation of QEMU command line from domain xml file 2. Generation of dump xml from domain xml file 3. Checks duplicate/invalid addresses for vfio-ccw devices. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer Reviewed-by: Stefan Zimmermann Reviewed-by: John Ferlan --- ...tdev-subsys-mdev-vfio-ccw-duplicate-address.xml | 29 ++++++++++++++++++= ++++ ...ostdev-subsys-mdev-vfio-ccw-invalid-address.xml | 23 +++++++++++++++++ .../hostdev-subsys-mdev-vfio-ccw.args | 26 +++++++++++++++++++ .../hostdev-subsys-mdev-vfio-ccw.xml | 22 ++++++++++++++++ tests/qemuxml2argvtest.c | 16 ++++++++++++ .../hostdev-subsys-mdev-vfio-ccw.xml | 28 ++++++++++++++++++= +++ tests/qemuxml2xmltest.c | 5 ++++ 7 files changed, 149 insertions(+) create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-dup= licate-address.xml create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-inv= alid-address.xml create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.args create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.xml create mode 100644 tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.x= ml diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-duplicate-= address.xml b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-duplicate= -address.xml new file mode 100644 index 0000000..4b95fe2 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-duplicate-address= .xml @@ -0,0 +1,29 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 524288 + 524288 + 2 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + +
+ +
+ + + +
+ +
+ + + diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-invalid-ad= dress.xml b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-invalid-add= ress.xml new file mode 100644 index 0000000..680090e --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-invalid-address.x= ml @@ -0,0 +1,23 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 524288 + 524288 + 2 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + +
+ +
+ + + diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.args b/tes= ts/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.args new file mode 100644 index 0000000..56ebf9a --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.args @@ -0,0 +1,26 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-s390x \ +-name QEMUGuest1 \ +-S \ +-machine s390-ccw-virtio,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 512 \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot c \ +-device vfio-ccw,id=3Dhostdev0,\ +sysfsdev=3D/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627,\ +devno=3Dfe.0.0000 \ +-device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0001 diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.xml b/test= s/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.xml new file mode 100644 index 0000000..96f30f5 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 524288 + 524288 + 2 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + +
+ + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9a05803..bd8d1b4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1539,6 +1539,22 @@ mymain(void) DO_TEST("pci-rom-disabled", NONE); DO_TEST("pci-rom-disabled-invalid", NONE); =20 + DO_TEST("hostdev-subsys-mdev-vfio-ccw", + QEMU_CAPS_CCW, + QEMU_CAPS_CCW_CSSID_UNRESTRICTED, + QEMU_CAPS_DEVICE_VFIO_CCW); + DO_TEST_FAILURE("hostdev-subsys-mdev-vfio-ccw", + QEMU_CAPS_CCW, + QEMU_CAPS_CCW_CSSID_UNRESTRICTED); + DO_TEST_PARSE_ERROR("hostdev-subsys-mdev-vfio-ccw-duplicate-address", + QEMU_CAPS_CCW, + QEMU_CAPS_CCW_CSSID_UNRESTRICTED, + QEMU_CAPS_DEVICE_VFIO_CCW); + DO_TEST_PARSE_ERROR("hostdev-subsys-mdev-vfio-ccw-invalid-address", + QEMU_CAPS_CCW, + QEMU_CAPS_CCW_CSSID_UNRESTRICTED, + QEMU_CAPS_DEVICE_VFIO_CCW); + DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, GIC_NONE, NONE); DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, GIC_NONE, NONE); DO_TEST_FULL("restore-v2-fd", "fd:7", 7, 0, 0, GIC_NONE, NONE); diff --git a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.xml b/te= sts/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.xml new file mode 100644 index 0000000..a14ab05 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.xml @@ -0,0 +1,28 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 524288 + 524288 + 2 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + +
+ +
+ + +
+ + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index f0b1c34..ff43455 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -960,6 +960,11 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_DEVICE_SCSI_GENERIC); =20 + DO_TEST("hostdev-subsys-mdev-vfio-ccw", + QEMU_CAPS_CCW, + QEMU_CAPS_CCW_CSSID_UNRESTRICTED, + QEMU_CAPS_DEVICE_VFIO_CCW); + DO_TEST("s390-defaultconsole", QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("s390-panic", --=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704434831987.7986598394838; Mon, 7 May 2018 07:47:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E236C0005C5; Mon, 7 May 2018 14:47:13 +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 1E5489C9BB; Mon, 7 May 2018 14:47:13 +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 BF1BA4CAA7; Mon, 7 May 2018 14:47:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfabM001161 for ; Mon, 7 May 2018 10:41:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB6D65C293; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD76168D86 for ; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C785630015CA for ; Mon, 7 May 2018 14:41:35 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EeUsx081973 for ; Mon, 7 May 2018 10:41:35 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htqx32h3w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:35 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:33 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:30 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfTNt4850110; Mon, 7 May 2018 14:41:29 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E8209AE056; Mon, 7 May 2018 15:30:58 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBE8CAE045; Mon, 7 May 2018 15:30:58 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:58 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:17 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0040-0000-0000-00000455FC58 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0041-0000-0000-000020FA3778 Message-Id: <20180507144118.6260-8-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=15 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 07 May 2018 14:41:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 07 May 2018 14:41:35 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 7/8] docs: documentation for vfio-ccw passthrough 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 07 May 2018 14:47:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- docs/drvnodedev.html.in | 21 ++++++++++++++++++++- docs/formatdomain.html.in | 20 +++++++++++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/docs/drvnodedev.html.in b/docs/drvnodedev.html.in index 885904d..71a8a57 100644 --- a/docs/drvnodedev.html.in +++ b/docs/drvnodedev.html.in @@ -335,8 +335,27 @@ $ ls /sys/class/mdev_bus/<device>/mdev_supported_types =20

+ Before creating a mediated device, unbind the device from the respec= tive + device driver, eg. subchannel I/O driver for a CCW device. Then bind= the + device to the respective VFIO driver. For a CCW device, also unbind = the + corresponding subchannel of the CCW device from the subchannel I/O d= river + and then bind the subchannel (instead of the CCW device) to the vfio= _ccw + driver. The below example shows the unbinding and binding steps for = a CCW + device. +

+ +
+device=3D"0.0.1234"
+subchannel=3D"0.0.0123"
+echo $device > /sys/bus/ccw/devices/$device/driver/unbind
+echo $subchannel > /sys/bus/css/devices/$subchannel/driver/unbind
+echo $subchannel > /sys/bus/css/drivers/vfio_ccw/bind
+    
+ +

To manually instantiate a mediated device, use one of the following = as a - reference: + reference. For a CCW device, use the subchannel ID instead of the de= vice + ID.

=20
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index caeb14e..bcae85e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4311,6 +4311,12 @@
       <address uuid=3D'c2177883-f1bb-47f0-914d-32a22e3a8804'/>
     </source>
     </hostdev>
+    <hostdev mode=3D'subsystem' type=3D'mdev' model=3D'vfio-ccw'>
+    <source>
+      <address uuid=3D'9063cba3-ecef-47b6-abcf-3fef4fdcad85'/>
+    </source>
+    <address type=3D'ccw' cssid=3D'0xfe' ssid=3D'0x0' devno=3D'0x0001'/=
>
+    </hostdev>
   </devices>
   ...
=20 @@ -4362,10 +4368,13 @@
For mediated devices (Since 3.2.0) the model attribute specifies the device API which determines how the host's vfio driver will expose the device to = the - guest. Currently, only model=3D'vfio-pci' is suppor= ted. - There are also some implications on the usage of guest's address= type - depending on the model attribute, see the - address element below.
+ guest. Currently, model=3D'vfio-pci' and + model=3D'vfio-ccw' (Since 4.4= .0) + is supported. Refer MDEV to= create + a mediated device on the host. There are also some implications = on the + usage of guest's address type depending on the model + attribute, see the address element below. +

Note: The managed attribute is only used with @@ -4497,7 +4506,8 @@ devices defining an allocation of resources on the physical parent d= evice, the address type used must conform to the model attribu= te of element hostdev, e.g. any address type other than PC= I for - vfio-pci device API will result in an error. + vfio-pci device API or any address type other than CCW = for + vfio-ccw device API will result in an error. See above for more details on the a= ddress element.

driver
--=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 10:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704229855280.9597159818237; Mon, 7 May 2018 07:43:49 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 74F353003A2F; Mon, 7 May 2018 14:43:48 +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 2E18758A9; Mon, 7 May 2018 14:43:48 +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 CFDF2180BAE9; Mon, 7 May 2018 14:43:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfafE001147 for ; Mon, 7 May 2018 10:41:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id A88882010CDA; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A14042010D57 for ; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E61CC30BD52D for ; Mon, 7 May 2018 14:41:35 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EdqS6138061 for ; Mon, 7 May 2018 10:41:35 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htr7msphp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:35 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:33 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:31 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfUZm3539426; Mon, 7 May 2018 14:41:30 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CAF7AE051; Mon, 7 May 2018 15:31:00 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 00E81AE045; Mon, 7 May 2018 15:31:00 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:59 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:18 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0008-0000-0000-000004F3F9F0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0009-0000-0000-00001E88354E Message-Id: <20180507144118.6260-9-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070150 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 07 May 2018 14:41:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 07 May 2018 14:41:36 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 8/8] news: documentation of new feature 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 07 May 2018 14:43:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- docs/news.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 8018141..2d6fcf6 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,15 @@
+ + + qemu: Provide VFIO channel I/O passthrough support + + + Support passthrough devices that use channel I/O based mechanism= in + a QEMU virtual machine. + +
--=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list