From nobody Wed Mar 12 17:58:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) 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 1741250271148239.14701818354263; Thu, 6 Mar 2025 00:37:51 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 7A6621725; Thu, 6 Mar 2025 03:37:50 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B43EC1796; Thu, 6 Mar 2025 03:36:45 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 69C661734; Thu, 6 Mar 2025 03:36:42 -0500 (EST) 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 B392816F7 for ; Thu, 6 Mar 2025 03:36:32 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-nCiwJCP2O8mhZBnRd45YfA-1; Thu, 06 Mar 2025 03:36:25 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 053F3180034D for ; Thu, 6 Mar 2025 08:36:25 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C744180AF7A for ; Thu, 6 Mar 2025 08:36:24 +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.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741250192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8bP1RMs/cRbhZchCPD2l5gdDpDkSLBZFCQduewTokNY=; b=LIqvhGqBwpw5+TwOx1fU6RyhVdNQ9bYDBBC2BYneajFApA3r6B1sfu1Je3Xd8cmoRiS/d8 u6saH6Pd5wexK0qpdF/Ey66uP4YEONTEX+KT3USxJwt9uZvyuENZE0MSXY4Tx87zmM2Vsz Zeoqh7dktpBEuYURzBLPgODLluQe8NM= X-MC-Unique: nCiwJCP2O8mhZBnRd45YfA-1 X-Mimecast-MFC-AGG-ID: nCiwJCP2O8mhZBnRd45YfA_1741250185 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 3/5] qemu_validate: Check whether UEFI shim is supported Date: Thu, 6 Mar 2025 09:36:16 +0100 Message-ID: <0696727024ddb0c3f5a09957f7f9344837b460fd.1741250151.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: c0S8vrDLe6yNdAvHFKUvQk-g4azk-Q4sxGIliHp3sm4_1741250185 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 64FKIQY6JLSE36LLXSDLLLG7FHBO4IVM X-Message-ID-Hash: 64FKIQY6JLSE36LLXSDLLLG7FHBO4IVM X-MailFrom: mprivozn@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741250271887019000 Content-Type: text/plain; charset="utf-8"; x-default="true" If UEFI shim is specified in domain XML but QEMU is too old, then report an error. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f3ef1be660..6be8c29b75 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -740,6 +740,13 @@ qemuValidateDomainDefBoot(const virDomainDef *def, return -1; } =20 + if (def->os.shim && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_SHIM)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("shim is not supported by this QEMU binary")); + return -1; + } + return 0; } =20 --=20 2.45.3