From nobody Mon Feb 9 05:10:37 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17137981162761005.3416501815716; Mon, 22 Apr 2024 08:01:56 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 40E0518F7; Mon, 22 Apr 2024 11:01:55 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8AE2D1F80; Mon, 22 Apr 2024 10:57:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 643B61F04; Mon, 22 Apr 2024 10:57:37 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5E5561DC7 for ; Mon, 22 Apr 2024 10:57:34 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-208-6weemgoDOEySvVeb0flA3w-1; Mon, 22 Apr 2024 10:57:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2DC428032FA for ; Mon, 22 Apr 2024 14:57:31 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 980E32166B34 for ; Mon, 22 Apr 2024 14:57:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: 6weemgoDOEySvVeb0flA3w-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 3/3] qemu_validate: Reject virtiofs with bootindex on s390x with CCW Date: Mon, 22 Apr 2024 16:57:26 +0200 Message-ID: <37384030c9aa40a849dd38f69e1d08636a4405f9.1713797776.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: D5J7TPCGSMSRVC6YREOSHUL5D4PFTIMH X-Message-ID-Hash: D5J7TPCGSMSRVC6YREOSHUL5D4PFTIMH X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1713798117102100001 The CCW variant of the 'vhost-user-fs' device in qemu doesn't deliberately support the 'bootindex' attribute as the machine is unable to boot from such device. Reject ' Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_validate.c | 19 +++++++--- ...ost-user-fs-ccw-bootindex.s390x-latest.err | 1 + .../vhost-user-fs-ccw-bootindex.xml | 38 +++++++++++++++++++ ...vhost-user-fs-hugepages.x86_64-latest.args | 2 + .../vhost-user-fs-hugepages.x86_64-latest.xml | 8 ++++ .../vhost-user-fs-hugepages.xml | 8 ++++ tests/qemuxmlconftest.c | 1 + 7 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x= -latest.err create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index fd7b90e47d..b02da95c1e 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4495,12 +4495,21 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs, if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "virtio= fs") < 0) { return -1; } - if (fs->info.bootIndex && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VHOST_USER_FS_BOOTINDEX)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting virtiofs boot order is not supported= with this QEMU binary")); - return -1; + + if (fs->info.bootIndex) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VHOST_USER_FS_BOOTINDE= X)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("setting virtiofs boot order is not suppo= rted with this QEMU binary")); + return -1; + } + + if (fs->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("setting virtiofs boot order is supported= only with PCI bus")); + return -1; + } } + break; case VIR_DOMAIN_FS_DRIVER_TYPE_MTP: diff --git a/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest= .err b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest.err new file mode 100644 index 0000000000..d865421bc7 --- /dev/null +++ b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest.err @@ -0,0 +1 @@ +unsupported configuration: setting virtiofs boot order is supported only w= ith PCI bus diff --git a/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml b/tests/= qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml new file mode 100644 index 0000000000..833b91d574 --- /dev/null +++ b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml @@ -0,0 +1,38 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + + + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + + +
+ +