From nobody Wed May 1 20:35:20 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 1521825777775687.6368687302978; Fri, 23 Mar 2018 10:22:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 133594903F; Fri, 23 Mar 2018 17:22: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 D46816090A; Fri, 23 Mar 2018 17:22: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 CF92E4CA99; Fri, 23 Mar 2018 17:22:54 +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 w2NHMqZq013546 for ; Fri, 23 Mar 2018 13:22:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id DCE7A9D98A; Fri, 23 Mar 2018 17:22:52 +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 D3D9F9D990 for ; Fri, 23 Mar 2018 17:22:52 +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 BEA67C0524EB for ; Fri, 23 Mar 2018 17:22:50 +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 w2NHK2qN116484 for ; Fri, 23 Mar 2018 13:22:50 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gw44mvuth-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 23 Mar 2018 13:22:49 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 23 Mar 2018 11:22:48 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 23 Mar 2018 11:22:46 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2NHMkoe9110012; Fri, 23 Mar 2018 10:22:46 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B912BE03B; Fri, 23 Mar 2018 11:22:46 -0600 (MDT) Received: from alifm-ThinkPad-T470p.pok.ibm.com (unknown [9.56.58.48]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS id 75CCDBE03A; Fri, 23 Mar 2018 11:22:45 -0600 (MDT) From: Farhan Ali To: libvir-list@redhat.com Date: Fri, 23 Mar 2018 13:22:38 -0400 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 x-cbid: 18032317-0004-0000-0000-000013D86AC7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008730; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000255; SDB=6.01007315; UDB=6.00512952; IPR=6.00786603; MB=3.00020202; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-23 17:22:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032317-0005-0000-0000-00008695394D Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-23_11:, , 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-1803230197 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]); Fri, 23 Mar 2018 17:22:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 23 Mar 2018 17:22:51 +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.16 X-loop: libvir-list@redhat.com Cc: alifm@linux.vnet.ibm.com, jtomko@redhat.com Subject: [libvirt] [PATCH v3 1/6] qemu: Introduce a new capability 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 23 Mar 2018 17:22:56 +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 virtio-gpu-ccw device. Let's introduce a new qemu capability for the device. Signed-off-by: Farhan Ali Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_capabilities.c | 5 ++ src/qemu/qemu_capabilities.h | 1 + .../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 83 ++++++++++++++++++= +--- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 3 +- .../qemucapabilitiesdata/caps_2.12.0.s390x.replies | 81 ++++++++++++++++++= --- tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 + tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 +++++++++ tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 39 ++++++++++ tests/qemuxml2xmltest.c | 7 ++ 9 files changed, 237 insertions(+), 18 deletions(-) create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3eb5ed6..256595e 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 { @@ -1947,6 +1949,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 =20 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/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.11.0.s390x.replies index 860904b..2de2560 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies @@ -3459,6 +3459,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-34" +} + +{ + "return": [ + { "hotpluggable-cpus": true, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3506,7 +3571,7 @@ "cpu-max": 248 } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -4040,20 +4105,20 @@ "migration-safe": true } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "return": [ ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ "emulator" ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { @@ -5174,7 +5239,7 @@ "option": "drive" } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -5232,7 +5297,7 @@ "capability": "x-multifd" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -15100,7 +15165,7 @@ "meta-type": "object" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -15139,11 +15204,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.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index 17abac9..46ae5e2 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 - 340897 + 342058 s390x diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.12.0.s390x.replies index f2699d4..c4e44c6 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies @@ -3552,6 +3552,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-34" +} + +{ + "return": [ + { "hotpluggable-cpus": true, "name": "s390-ccw-virtio-2.7", "cpu-max": 248 @@ -3604,7 +3669,7 @@ "alias": "s390-ccw-virtio" } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -6259,20 +6324,20 @@ "migration-safe": true } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "return": [ ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "return": [ "emulator" ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { @@ -7428,7 +7493,7 @@ "option": "drive" } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -7490,7 +7555,7 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -18858,11 +18923,11 @@ "meta-type": "object" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { - "id": "libvirt-41", + "id": "libvirt-42", "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 355ccc1..d6d8885 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -146,6 +146,7 @@ + 2011090 0 0 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 + + + +
+ + +
+ + +