From nobody Tue May 7 23:06:38 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520525239556243.89459428232772; Thu, 8 Mar 2018 08:07:19 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3648D8050B; Thu, 8 Mar 2018 16:07:18 +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 002E25D790; Thu, 8 Mar 2018 16:07:17 +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 927F2180BAE7; Thu, 8 Mar 2018 16:07:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w28G7FmY031777 for ; Thu, 8 Mar 2018 11:07:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id CA01018C7C; Thu, 8 Mar 2018 16:07:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B96276A03C for ; Thu, 8 Mar 2018 16:07:11 +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 BD5D4C04BE07 for ; Thu, 8 Mar 2018 16:07:10 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w28G2QX6126656 for ; Thu, 8 Mar 2018 11:07:10 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gk8488w84-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 08 Mar 2018 11:07:09 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Mar 2018 11:07:09 -0500 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 8 Mar 2018 11:07:07 -0500 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w28G77j656754314; Thu, 8 Mar 2018 16:07:07 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 07AB92804A; Thu, 8 Mar 2018 11:06:31 -0500 (EST) Received: from alifm-ThinkPad-T470p.ibm.com (unknown [9.85.157.14]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS id E006D2803A; Thu, 8 Mar 2018 11:06:30 -0500 (EST) From: Farhan Ali To: libvir-list@redhat.com Date: Thu, 8 Mar 2018 11:07:01 -0500 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 x-cbid: 18030816-0052-0000-0000-000002C5AA3C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008635; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000104; UDB=6.00508677; IPR=6.00779434; MB=3.00019918; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-08 16:07:09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030816-0053-0000-0000-00005BEECF28 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-08_09:, , 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803080185 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.31]); Thu, 08 Mar 2018 16:07:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 08 Mar 2018 16:07:10 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'alifm@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.72 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: alifm@linux.vnet.ibm.com Subject: [libvirt] [PATCH v1 1/7] qemu: Fix comment for 'qemuValidateDevicePCISlotsChipsets' 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 08 Mar 2018 16:07:18 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There is no function 'qemuValidateDevicePCISlotsChipsets', it should be qemuDomainValidateDevicePCISlotsChipsets. Signed-off-by: Farhan Ali Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- src/qemu/qemu_domain_address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 3fcb36a..ae49cf2 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1815,7 +1815,7 @@ qemuDomainValidateDevicePCISlotsChipsets(virDomainDef= Ptr def, * - Video (slot 2) * * - These integrated devices were already added by - * qemuValidateDevicePCISlotsChipsets invoked right before this function + * qemuDomainValidateDevicePCISlotsChipsets invoked right before this f= unction * * Incrementally assign slots from 3 onwards: * --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 23:06:38 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152052525067017.2346910916948; Thu, 8 Mar 2018 08:07:30 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4000E80F90; Thu, 8 Mar 2018 16:07:29 +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 0F1B15C54E; Thu, 8 Mar 2018 16:07:29 +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 C064D181BA02; Thu, 8 Mar 2018 16:07:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w28G7MrB031843 for ; Thu, 8 Mar 2018 11:07:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1587851DDB; Thu, 8 Mar 2018 16:07:22 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC8A860F90 for ; Thu, 8 Mar 2018 16:07:18 +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 85BAF4E028 for ; Thu, 8 Mar 2018 16:07:17 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w28G6jeS083535 for ; Thu, 8 Mar 2018 11:07:16 -0500 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gk8470w8m-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 08 Mar 2018 11:07:14 -0500 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Mar 2018 11:07:10 -0500 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 8 Mar 2018 11:07:08 -0500 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w28G77JX57409650; Thu, 8 Mar 2018 16:07:07 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F0BE28048; Thu, 8 Mar 2018 11:06:31 -0500 (EST) Received: from alifm-ThinkPad-T470p.ibm.com (unknown [9.85.157.14]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS id F3EF22804C; Thu, 8 Mar 2018 11:06:30 -0500 (EST) From: Farhan Ali To: libvir-list@redhat.com Date: Thu, 8 Mar 2018 11:07:02 -0500 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 x-cbid: 18030816-0040-0000-0000-000004046002 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008635; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000104; UDB=6.00508677; IPR=6.00779434; MB=3.00019918; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-08 16:07:09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030816-0041-0000-0000-00000805662F Message-Id: <91db69cb1794df7b7cdb60ebdd095bc35dee8845.1520524234.git.alifm@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-08_09:, , 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-1803080185 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.38]); Thu, 08 Mar 2018 16:07:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 08 Mar 2018 16:07:17 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'alifm@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.72 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: alifm@linux.vnet.ibm.com Subject: [libvirt] [PATCH v1 2/7] qemu: Add support for virtio-gpu-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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 08 Mar 2018 16:07:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" QEMU on S390 (since v2.11) can support the virtio-gpu-ccw device, so on S390 assign CCW address for a video device. Also introduce a new capability for the virtio-gpu-ccw device. Signed-off-by: Farhan Ali Signed-off-by: Boris Fiuczynski --- docs/formatdomain.html.in | 3 + src/qemu/qemu_capabilities.c | 5 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 18 ++++- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain_address.c | 8 +++ src/qemu/qemu_process.c | 5 +- .../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 83 ++++++++++++++++++= +--- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 3 +- 9 files changed, 114 insertions(+), 14 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 6fd2189..0908709 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -6484,6 +6484,9 @@ qemu-kvm -net nic,model=3D? /dev/null
The optional address sub-element can be used to tie the video device to a particular PCI slot. + On S390, address can be used to provide the + CCW address for the video device ( + since 4.2.0).
=20
driver
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b5eb8cf..9db4c31 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -459,6 +459,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "pl011", "machine.pseries.max-cpu-compat", "dump-completed", + "virtio-gpu-ccw", ); =20 =20 @@ -1694,6 +1695,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "sclplmconsole", QEMU_CAPS_DEVICE_SCLPLMCONSOLE }, { "isa-serial", QEMU_CAPS_DEVICE_ISA_SERIAL }, { "pl011", QEMU_CAPS_DEVICE_PL011 }, + { "virtio-gpu-ccw", QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[]= =3D { @@ -1932,6 +1934,9 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsO= bjectProps[] =3D { { "spapr-pci-host-bridge", virQEMUCapsObjectPropsSpaprPCIHostBridge, ARRAY_CARDINALITY(virQEMUCapsObjectPropsSpaprPCIHostBridge), QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE }, + { "virtio-gpu-ccw", virQEMUCapsObjectPropsVirtioGpu, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioGpu), + QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW }, }; =20 struct virQEMUCapsPropTypeObjects { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c2ec2be..b4852e5 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -444,6 +444,7 @@ typedef enum { QEMU_CAPS_DEVICE_PL011, /* -device pl011 (not user-instantiable) */ QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT, /* -machine pseries,max-cpu-= compat=3D */ QEMU_CAPS_DUMP_COMPLETED, /* DUMP_COMPLETED event */ + QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW, /* -device virtio-gpu-ccw */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fa0aa5d..ba63670 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -132,7 +132,7 @@ VIR_ENUM_IMPL(qemuDeviceVideoSecondary, VIR_DOMAIN_VIDE= O_TYPE_LAST, "", /* don't support vbox */ "qxl", "", /* don't support parallels */ - "virtio-gpu-pci", + "virtio-gpu", "" /* don't support gop */); =20 VIR_ENUM_DECL(qemuSoundCodec) @@ -4262,7 +4262,21 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, goto error; } =20 - virBufferAsprintf(&buf, "%s,id=3D%s", model, video->info.alias); + if (STREQ(model, "virtio-gpu")) { + switch (video->info.type) { + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: + virBufferAsprintf(&buf, "%s-pci", model); + break; + + case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW: + virBufferAsprintf(&buf, "%s-ccw", model); + break; + } + } else { + virBufferAsprintf(&buf, "%s", model); + } + + virBufferAsprintf(&buf, ",id=3D%s", video->info.alias); =20 if (video->accel && video->accel->accel3d =3D=3D VIR_TRISTATE_SWITCH_O= N) { virBufferAsprintf(&buf, ",virgl=3D%s", diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ee02ecd..b47b4d1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5156,7 +5156,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr de= v, if (dev->data.video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_DEFAULT) { if ARCH_IS_PPC64(def->os.arch) dev->data.video->type =3D VIR_DOMAIN_VIDEO_TYPE_VGA; - else if (qemuDomainIsVirt(def)) + else if (qemuDomainIsVirt(def) || ARCH_IS_S390(def->os.arch)) dev->data.video->type =3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO; else dev->data.video->type =3D VIR_DOMAIN_VIDEO_TYPE_CIRRUS; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index ae49cf2..49a293e 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -308,6 +308,14 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr d= ef, } } =20 + for (i =3D 0; i < def->nvideos; i++) { + virDomainVideoDefPtr video =3D def->videos[i]; + + if (video->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && + video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO) + video->info.type =3D type; + } + for (i =3D 0; i < def->ninputs; i++) { if (def->inputs[i]->bus =3D=3D VIR_DOMAIN_DISK_BUS_VIRTIO && def->inputs[i]->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYP= E_NONE) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 57c06c7..1afb71f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4778,7 +4778,10 @@ qemuProcessStartValidateVideo(virDomainObjPtr vm, (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_QXL && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QXL)) || (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU))) { + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU)) || + (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO && + video->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("this QEMU does not support '%s' video device= "), virDomainVideoTypeToString(video->type)); diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.11.0.s390x.replies index 6768937..53c4804 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies @@ -3515,6 +3515,71 @@ { "return": [ { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "devno", + "description": "Identifier of an I/O device in the channel subsystem= , example: fe.1.23ab", + "type": "str" + }, + { + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child" + }, + { + "name": "yres", + "type": "uint32" + }, + { + "name": "xres", + "type": "uint32" + }, + { + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "max_outputs", + "type": "uint32" + }, + { + "name": "max_hostmem", + "type": "size" + }, + { + "name": "max_revision", + "type": "uint32" + } + ], + "id": "libvirt-41" +} + +{ + "return": [ + { "hotpluggable-cpus": true, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3562,7 +3627,7 @@ "cpu-max": 248 } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { @@ -4096,20 +4161,20 @@ "migration-safe": true } ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "return": [ ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "return": [ "emulator" ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -5230,7 +5295,7 @@ "option": "drive" } ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -5288,7 +5353,7 @@ "capability": "x-multifd" } ], - "id": "libvirt-46" + "id": "libvirt-47" } =20 { @@ -15156,7 +15221,7 @@ "meta-type": "object" } ], - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -15195,11 +15260,11 @@ } } }, - "id": "libvirt-48" + "id": "libvirt-49" } =20 { - "id": "libvirt-49", + "id": "libvirt-50", "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 f7f102f..ec5c396 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -146,9 +146,10 @@ + 2011000 0 - 341724 + 342885 s390x --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 23:06:38 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520525246099300.0590630362617; Thu, 8 Mar 2018 08:07:26 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 38B01C20B4B6; Thu, 8 Mar 2018 16:07:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 020B55D6A8; Thu, 8 Mar 2018 16:07:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A87C6181BA01; Thu, 8 Mar 2018 16:07:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w28G7LX2031822 for ; Thu, 8 Mar 2018 11:07:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2D91A6A048; Thu, 8 Mar 2018 16:07:21 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21A046A040 for ; Thu, 8 Mar 2018 16:07:17 +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 F31B8C057F9F for ; Thu, 8 Mar 2018 16:07:12 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w28G1HS3133888 for ; Thu, 8 Mar 2018 11:07:12 -0500 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gk843gyrh-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 08 Mar 2018 11:07:10 -0500 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Mar 2018 11:07:09 -0500 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 8 Mar 2018 11:07:08 -0500 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w28G77TD64684106; Thu, 8 Mar 2018 16:07:07 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2150E2803F; Thu, 8 Mar 2018 11:06:31 -0500 (EST) Received: from alifm-ThinkPad-T470p.ibm.com (unknown [9.85.157.14]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS id 1183A28057; Thu, 8 Mar 2018 11:06:31 -0500 (EST) From: Farhan Ali To: libvir-list@redhat.com Date: Thu, 8 Mar 2018 11:07:03 -0500 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 x-cbid: 18030816-0048-0000-0000-00000246E9BE X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008635; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000103; UDB=6.00508677; IPR=6.00779434; MB=3.00019918; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-08 16:07:09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030816-0049-0000-0000-0000445FF554 Message-Id: <9e6eebf80fab746c0f2e7f48594976877798abf6.1520524234.git.alifm@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-08_09:, , 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-1803080185 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.32]); Thu, 08 Mar 2018 16:07:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 08 Mar 2018 16:07:13 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'alifm@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.72 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: alifm@linux.vnet.ibm.com Subject: [libvirt] [PATCH v1 3/7] tests: Add test case for virtio-gpu-ccw 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 08 Mar 2018 16:07:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" A test case to test the virtio-gpu-ccw device. Signed-off-by: Farhan Ali Signed-off-by: Boris Fiuczynski --- .../qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml | 18 ++++++++++ tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 25 ++++++++++++++ tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 ++++++++++++++++++= ++ tests/qemuxml2argvtest.c | 7 ++++ .../video-virtio-gpu-ccw-auto.xml | 34 +++++++++++++++++++ tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 38 ++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 14 ++++++++ 7 files changed, 171 insertions(+) create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.args create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml b/tests/q= emuxml2argvdata/video-virtio-gpu-ccw-auto.xml new file mode 100644 index 0000000..2d5da38 --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml @@ -0,0 +1,18 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1803 + 219136 + 1 + + hvm + + + /usr/bin/qemu-system-s390x + + + + + + + + diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw.args b/tests/qemux= ml2argvdata/video-virtio-gpu-ccw.args new file mode 100644 index 0000000..e5e8854 --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.args @@ -0,0 +1,25 @@ +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 \ +-M s390-ccw-virtio \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1803 \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-boot c \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-ccw,devno=3Dfe.0.0000,drive=3Ddrive-virtio-disk0,\ +id=3Dvirtio-disk0 \ +-vnc 127.0.0.1:0 \ +-device virtio-gpu-ccw,id=3Dvideo0,max_outputs=3D1,devno=3Dfe.0.0002 \ +-device virtio-gpu-ccw,id=3Dvideo1,max_outputs=3D1,devno=3Dfe.0.0003 \ +-device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0001 diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml b/tests/qemuxm= l2argvdata/video-virtio-gpu-ccw.xml new file mode 100644 index 0000000..b327595 --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml @@ -0,0 +1,35 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1803 + 219136 + 219136 + 1 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + +
+ + +
+ + +