From nobody Thu Sep 18 10:01:09 2025 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 1504787128498284.85102585562754; Thu, 7 Sep 2017 05:25:28 -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 5CB5A19C327; Thu, 7 Sep 2017 12:25:26 +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 21B6018B9A; Thu, 7 Sep 2017 12:25: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 5BCBB180610A; Thu, 7 Sep 2017 12:25:24 +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 v87CJrVr024356 for ; Thu, 7 Sep 2017 08:19:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F38D17D59; Thu, 7 Sep 2017 12:19:53 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4D014F077; Thu, 7 Sep 2017 12:19:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5CB5A19C327 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 7 Sep 2017 14:19:39 +0200 Message-Id: <20170907121940.18090-5-ptoscano@redhat.com> In-Reply-To: <20170907121940.18090-1-ptoscano@redhat.com> References: <20170907121940.18090-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: thuth@redhat.com Subject: [libvirt] [PATCH 4/5] qemu: reject parallel ports for s390 archs 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.29]); Thu, 07 Sep 2017 12:25:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" They are simply not supported on those architectures. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1487499 Signed-off-by: Pino Toscano Reviewed-by: Thomas Huth --- src/qemu/qemu_domain.c | 9 ++++++++- .../qemuxml2argv-s390-no-parallel.xml | 22 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0b8a66307..6f1b453b2 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3292,11 +3292,18 @@ qemuDomainChrSourceDefValidate(const virDomainChrSo= urceDef *def) =20 static int qemuDomainChrDefValidate(const virDomainChrDef *dev, - const virDomainDef *def ATTRIBUTE_UNUSED) + const virDomainDef *def) { if (qemuDomainChrSourceDefValidate(dev->source) < 0) return -1; =20 + if (dev->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL && + ARCH_IS_S390(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("parallel ports are not supported")); + return -1; + } + return 0; } =20 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml b/tes= ts/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml new file mode 100644 index 000000000..5e6a23fe9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-no-parallel.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + /usr/bin/qemu-system-s390x + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3f7d1db3e..e9748bf1a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1947,6 +1947,10 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + DO_TEST_PARSE_ERROR("s390-no-parallel", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_VIRTIO_S390); =20 DO_TEST("ppc-dtb", QEMU_CAPS_KVM, --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list