From nobody Thu May 16 19:00:18 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 153357008987620.35707779468987; Mon, 6 Aug 2018 08:41:29 -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 7A32F308A958; Mon, 6 Aug 2018 15:41:26 +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 305626442C; Mon, 6 Aug 2018 15:41:25 +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 89B0C3F7FA; Mon, 6 Aug 2018 15:41:22 +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 w76FfK73004213 for ; Mon, 6 Aug 2018 11:41:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id BB07E2010CF0; Mon, 6 Aug 2018 15:41:20 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B20262010CDB for ; Mon, 6 Aug 2018 15:41:18 +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 1A25581DE9 for ; Mon, 6 Aug 2018 15:41:18 +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 w76FOZYH115585 for ; Mon, 6 Aug 2018 11:41:17 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kpqp8mbhf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Aug 2018 11:41:17 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Aug 2018 16:41:15 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 6 Aug 2018 16:41:12 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w76FfBKO42926208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 6 Aug 2018 15:41:11 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE31552051; Mon, 6 Aug 2018 18:41:19 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.24]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7831D5204E; Mon, 6 Aug 2018 18:41:19 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 6 Aug 2018 17:41:06 +0200 In-Reply-To: <20180806154108.3554-1-fiuczy@linux.ibm.com> References: <20180806154108.3554-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18080615-4275-0000-0000-000002A52DD2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080615-4276-0000-0000-000037AD2F9C Message-Id: <20180806154108.3554-2-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-06_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808060163 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 209 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Aug 2018 15:41:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Aug 2018 15:41:18 +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.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, jtomko@redhat.com Subject: [libvirt] [PATCH v3 1/3] tests: qemuxml2argv: add CAPS_ARCH_LATEST macro 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.41]); Mon, 06 Aug 2018 15:41:28 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Bjoern Walk Testing with the latest capabilities is possible with the x86_64 centric implemented macro CAPS_LATEST. The new macro CAPS_ARCH_LATEST provides the user the ability to specify the desired architecture when testing with the latest capabilities. Signed-off-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemuxml2argvtest.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 84117a3e63..dd830c2dd6 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -621,10 +621,11 @@ testCompareXMLToArgv(const void *data) static int mymain(void) { - int ret =3D 0; + int ret =3D 0, i; char *fakerootdir; bool skipLegacyCPUs =3D false; - char *capslatest_x86_64 =3D NULL; + const char *archs[] =3D { "x86_64", "s390x" }; + virHashTablePtr capslatest =3D NULL; =20 if (VIR_STRDUP_QUIET(fakerootdir, FAKEROOTDIRTEMPLATE) < 0) { fprintf(stderr, "Out of memory\n"); @@ -693,12 +694,23 @@ mymain(void) if (VIR_STRDUP_QUIET(driver.config->memoryBackingDir, "/var/lib/libvir= t/qemu/ram") < 0) return EXIT_FAILURE; =20 - if (!(capslatest_x86_64 =3D testQemuGetLatestCapsForArch(abs_srcdir "/= qemucapabilitiesdata", - "x86_64", "xml"= ))) + capslatest =3D virHashCreate(4, virHashValueFree); + if (!capslatest) return EXIT_FAILURE; =20 - VIR_TEST_VERBOSE("\nlatest caps x86_64: %s\n", capslatest_x86_64); + VIR_TEST_VERBOSE("\n"); =20 + for (i =3D 0; i < ARRAY_CARDINALITY(archs); ++i) { + char *cap =3D testQemuGetLatestCapsForArch(abs_srcdir "/qemucapabi= litiesdata", + archs[i], "xml"); + + if (!cap || virHashAddEntry(capslatest, archs[i], cap) < 0) + return EXIT_FAILURE; + + VIR_TEST_VERBOSE("latest caps for %s: %s\n", archs[i], cap); + } + + VIR_TEST_VERBOSE("\n"); =20 /** * The following set of macros allows testing of XML -> argv conversion wi= th a @@ -746,9 +758,12 @@ mymain(void) # define DO_TEST_CAPS_VER(name, ver) \ DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) =20 +# define DO_TEST_CAPS_ARCH_LATEST(name, arch) \ + DO_TEST_CAPS_INTERNAL(name, arch "-latest", NULL, 0, 0, arch, \ + virHashLookup(capslatest, arch), true) + # define DO_TEST_CAPS_LATEST(name) \ - DO_TEST_CAPS_INTERNAL(name, "x86_64-latest", NULL, 0, 0, "x86_64", \ - capslatest_x86_64, true) + DO_TEST_CAPS_ARCH_LATEST(name, "x86_64") =20 /** * The following test macros should be used only in cases when the tests r= equire @@ -2948,7 +2963,7 @@ mymain(void) VIR_FREE(driver.config->nbdTLSx509certdir); qemuTestDriverFree(&driver); VIR_FREE(fakerootdir); - VIR_FREE(capslatest_x86_64); + virHashFree(capslatest); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 16 19:00:18 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 1533570114145153.99574908797945; Mon, 6 Aug 2018 08:41:54 -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 83F8C20277; Mon, 6 Aug 2018 15:41:51 +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 DD9F83001A40; Mon, 6 Aug 2018 15:41:50 +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 55C143F7FF; Mon, 6 Aug 2018 15:41:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w76FfNY1004228 for ; Mon, 6 Aug 2018 11:41:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 897AC18E3B; Mon, 6 Aug 2018 15:41:23 +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 7D5E75DD94 for ; Mon, 6 Aug 2018 15:41:20 +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 97D978764F for ; Mon, 6 Aug 2018 15:41:19 +0000 (UTC) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w76FOf7u014510 for ; Mon, 6 Aug 2018 11:41:19 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kpnkpa81d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Aug 2018 11:41:18 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Aug 2018 16:41:16 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 6 Aug 2018 16:41:13 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w76FfCqx22609926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 6 Aug 2018 15:41:12 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DFA3452051; Mon, 6 Aug 2018 18:41:20 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.24]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id B39345204F; Mon, 6 Aug 2018 18:41:20 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 6 Aug 2018 17:41:07 +0200 In-Reply-To: <20180806154108.3554-1-fiuczy@linux.ibm.com> References: <20180806154108.3554-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18080615-0020-0000-0000-000002B202A1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080615-0021-0000-0000-000020FE44DF Message-Id: <20180806154108.3554-3-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-06_08:, , 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808060163 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 209 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 06 Aug 2018 15:41:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 06 Aug 2018 15:41:19 +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.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, jtomko@redhat.com Subject: [libvirt] [PATCH v3 2/3] qemu: Add ccw support for vhost-vsock 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.29]); Mon, 06 Aug 2018 15:41:52 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add support and tests for vhost-vsock-ccw. Signed-off-by: Boris Fiuczynski Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_command.c | 8 +++-- src/qemu/qemu_domain.c | 10 ++++-- src/qemu/qemu_domain_address.c | 7 +++- .../vhost-vsock-ccw-auto.s390x-latest.args | 32 +++++++++++++++++++ .../qemuxml2argvdata/vhost-vsock-ccw-auto.xml | 25 +++++++++++++++ .../vhost-vsock-ccw.s390x-latest.args | 32 +++++++++++++++++++ tests/qemuxml2argvdata/vhost-vsock-ccw.xml | 32 +++++++++++++++++++ tests/qemuxml2argvtest.c | 2 ++ .../vhost-vsock-ccw-auto.xml | 32 +++++++++++++++++++ tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml | 1 + tests/qemuxml2xmltest.c | 5 +++ 11 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-lates= t.args create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw-auto.xml create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args create mode 100644 tests/qemuxml2argvdata/vhost-vsock-ccw.xml create mode 100644 tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.xml create mode 120000 tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d148db90fa..9e8f2f4c9c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10217,10 +10217,14 @@ qemuBuildVsockDevStr(virDomainDefPtr def, { qemuDomainVsockPrivatePtr priv =3D (qemuDomainVsockPrivatePtr)vsock->p= rivateData; virBuffer buf =3D VIR_BUFFER_INITIALIZER; - const char *device =3D "vhost-vsock-pci"; char *ret =3D NULL; =20 - virBufferAsprintf(&buf, "%s", device); + if (vsock->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { + virBufferAddLit(&buf, "vhost-vsock-ccw"); + } else { + virBufferAddLit(&buf, "vhost-vsock-pci"); + } + virBufferAsprintf(&buf, ",id=3D%s", vsock->info.alias); virBufferAsprintf(&buf, ",guest-cid=3D%u", vsock->guest_cid); virBufferAsprintf(&buf, ",vhostfd=3D%s%u", fdprefix, priv->vhostfd); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index de056272e8..6b50e0c484 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5546,7 +5546,8 @@ qemuDomainDeviceDefValidateMemory(const virDomainMemo= ryDef *memory ATTRIBUTE_UNU =20 =20 static int -qemuDomainDeviceDefValidateVsock(const virDomainVsockDef *vsock ATTRIBUTE_= UNUSED, +qemuDomainDeviceDefValidateVsock(const virDomainVsockDef *vsock, + const virDomainDef *def, virQEMUCapsPtr qemuCaps) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_VSOCK)) { @@ -5555,6 +5556,11 @@ qemuDomainDeviceDefValidateVsock(const virDomainVsoc= kDef *vsock ATTRIBUTE_UNUSED "with this QEMU binary")); return -1; } + + if (!qemuDomainCheckCCWS390AddressSupport(def, vsock->info, qemuCaps, + "vsock")) + return -1; + return 0; } =20 @@ -5702,7 +5708,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef = *dev, break; =20 case VIR_DOMAIN_DEVICE_VSOCK: - ret =3D qemuDomainDeviceDefValidateVsock(dev->data.vsock, qemuCaps= ); + ret =3D qemuDomainDeviceDefValidateVsock(dev->data.vsock, def, qem= uCaps); break; =20 case VIR_DOMAIN_DEVICE_TPM: diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 0d27e6ce9c..6671eccf6f 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -306,7 +306,8 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr de= f, declare address-less virtio devices to be of address type 'type' disks, networks, videos, consoles, controllers, memballoon and rng in this order - if type is ccw filesystem devices are declared to be of address typ= e ccw + if type is ccw filesystem and vsock devices are declared to be of + address type ccw */ size_t i; =20 @@ -373,6 +374,10 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr d= ef, if (def->fss[i]->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TY= PE_NONE) def->fss[i]->info.type =3D type; } + if (def->vsock && + def->vsock->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NO= NE) { + def->vsock->info.type =3D type; + } } } =20 diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args = b/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args new file mode 100644 index 0000000000..6092f8e85c --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-s390x \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine s390-ccw-virtio,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0000,drive=3Ddrive-virtio-d= isk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0001 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-device vhost-vsock-ccw,id=3Dvsock0,guest-cid=3D42,vhostfd=3D6789,devno=3D= fe.0.0002 \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.xml b/tests/qemuxm= l2argvdata/vhost-vsock-ccw-auto.xml new file mode 100644 index 0000000000..e5b60765ab --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.xml @@ -0,0 +1,25 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + + + + + + + diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args b/tes= ts/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args new file mode 100644 index 0000000000..93eb3f3430 --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-s390x \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine s390-ccw-virtio,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0000,drive=3Ddrive-virtio-d= isk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-device virtio-balloon-ccw,id=3Dballoon0,devno=3Dfe.0.0001 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-device vhost-vsock-ccw,id=3Dvsock0,guest-cid=3D4,vhostfd=3D6789,devno=3Df= e.0.0003 \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw.xml b/tests/qemuxml2arg= vdata/vhost-vsock-ccw.xml new file mode 100644 index 0000000000..083061c6cc --- /dev/null +++ b/tests/qemuxml2argvdata/vhost-vsock-ccw.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + + +
+ + +
+ + + + +
+ + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index dd830c2dd6..eb53b9afd5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2952,6 +2952,8 @@ mymain(void) =20 DO_TEST_CAPS_LATEST("vhost-vsock"); DO_TEST_CAPS_LATEST("vhost-vsock-auto"); + DO_TEST_CAPS_ARCH_LATEST("vhost-vsock-ccw", "s390x"); + DO_TEST_CAPS_ARCH_LATEST("vhost-vsock-ccw-auto", "s390x"); =20 DO_TEST("launch-security-sev", QEMU_CAPS_KVM, diff --git a/tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.xml b/tests/qemu= xml2xmloutdata/vhost-vsock-ccw-auto.xml new file mode 100644 index 0000000000..38a0fb3808 --- /dev/null +++ b/tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + + +
+ + +
+ + + + +
+ + + diff --git a/tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml b/tests/qemuxml2x= mloutdata/vhost-vsock-ccw.xml new file mode 120000 index 0000000000..e0fa69dba9 --- /dev/null +++ b/tests/qemuxml2xmloutdata/vhost-vsock-ccw.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/vhost-vsock-ccw.xml \ No newline at end of file diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c6cb2dda0c..6c4f96e505 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1208,6 +1208,11 @@ mymain(void) =20 DO_TEST("vhost-vsock", QEMU_CAPS_DEVICE_VHOST_VSOCK); DO_TEST("vhost-vsock-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK); + DO_TEST("vhost-vsock-ccw", QEMU_CAPS_DEVICE_VHOST_VSOCK, + QEMU_CAPS_CCW); + DO_TEST("vhost-vsock-ccw-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK, + QEMU_CAPS_CCW); + =20 if (getenv("LIBVIRT_SKIP_CLEANUP") =3D=3D NULL) virFileDeleteTree(fakerootdir); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 16 19:00:18 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 1533570146670981.9871905570853; Mon, 6 Aug 2018 08:42:26 -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 5BB6A3084041; Mon, 6 Aug 2018 15:42:21 +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 1A8A078C06; Mon, 6 Aug 2018 15:42:21 +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 A6EC318037EC; Mon, 6 Aug 2018 15:42:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w76FfNo4004229 for ; Mon, 6 Aug 2018 11:41:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9321530012A5; Mon, 6 Aug 2018 15:41:23 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B1E4300193F for ; Mon, 6 Aug 2018 15:41:20 +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 1575381DE8 for ; Mon, 6 Aug 2018 15:41:20 +0000 (UTC) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w76FOafo052877 for ; Mon, 6 Aug 2018 11:41:19 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kpnqct55u-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Aug 2018 11:41:19 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Aug 2018 16:41:17 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 6 Aug 2018 16:41:14 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w76FfEBa39190616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 6 Aug 2018 15:41:14 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 272B852052; Mon, 6 Aug 2018 18:41:22 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.24]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id E5BA052051; Mon, 6 Aug 2018 18:41:21 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 6 Aug 2018 17:41:08 +0200 In-Reply-To: <20180806154108.3554-1-fiuczy@linux.ibm.com> References: <20180806154108.3554-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18080615-0012-0000-0000-00000295AE08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080615-0013-0000-0000-000020C7B60C Message-Id: <20180806154108.3554-4-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-06_08:, , 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808060163 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 209 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Aug 2018 15:41:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Aug 2018 15:41:20 +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.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, jtomko@redhat.com Subject: [libvirt] [PATCH v3 3/3] news: Update for vhost-vsock-ccw support 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.40]); Mon, 06 Aug 2018 15:42:22 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Boris Fiuczynski Reviewed-by: J=EF=BF=BDn Tomko --- docs/news.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index afafb9c337..2f0c0107a9 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -46,6 +46,14 @@
+ + + qemu: Add ccw support for vhost-vsock + + + Support the vhost-vsock-ccw device on S390. + +
--=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list