From nobody Mon Sep 16 19:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1679081356; cv=none; d=zohomail.com; s=zohoarc; b=aTWBHugu1SaJ3P3XKrf/uiisFGmrt9Qwe5MM4CtUhc1pujoZvQsFmCqQlm0q0kgteXrKmiPuW+rwqGrzNG/EXJMl4iql3gjDSW/VAi5exGYDTaNV+Nf3huIdEAAkkvJTgNCgprWw789RGDtNEs7/EW6YkwrYEGeVPsf7H0nNQ7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679081356; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1cmUmV3UNvgVH+vkkzv53R7NjJrGA31fx0H7Qb/W2Yc=; b=WcDeMCUj49g4siyJlck9E1WhZGJSQk93/S3TxmL9FohfC1dj9HDCLjClvGr3QZ1IoUyYa8RtjwRreoezjJYZNLmn4nprZ20YdHkv6MhgB0xuQJsvpEgysUiahBDzQtVC9fE8Bs1XnkYsPvMrrpsYEFKDFD+T2TgU57OWHhhWSno= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1679081356444659.603860134346; Fri, 17 Mar 2023 12:29:16 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-3-HMV-po4yOaSUQ5eU4okdwA-1; Fri, 17 Mar 2023 15:28:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 72F8D18A646A; Fri, 17 Mar 2023 19:28:10 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D55C1121315; Fri, 17 Mar 2023 19:28:10 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 299DB1946A6B; Fri, 17 Mar 2023 19:28:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9C47019466DF for ; Fri, 17 Mar 2023 19:28:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8CA1040C6E69; Fri, 17 Mar 2023 19:28:00 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 218E040C6E6B for ; Fri, 17 Mar 2023 19:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679081355; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1cmUmV3UNvgVH+vkkzv53R7NjJrGA31fx0H7Qb/W2Yc=; b=U4qbeaEcuCP/pgAeC4eMMcRzTH9wqCKWavx51xySNcMk8ItdpOwd8sObEm/oGsJxAwitRO AsFhDXh8l2Q5cNQG5K5rQX5EgABGbaGqfUnzwOmv1YoDxfjErYNHxjOeu45StUM+N2XLvt Bq/UVeW0b3MCubNS9wC2ydp4k4R62Qo= X-MC-Unique: HMV-po4yOaSUQ5eU4okdwA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 15/15] qemu: Move validation check out of postparse Date: Fri, 17 Mar 2023 20:27:47 +0100 Message-Id: <20230317192747.1311223-16-abologna@redhat.com> In-Reply-To: <20230317192747.1311223-1-abologna@redhat.com> References: <20230317192747.1311223-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1679081357037100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Suggested-by: Michal Privoznik Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 6 ------ src/qemu/qemu_validate.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0a7b30fa65..6c29c8f09f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4474,12 +4474,6 @@ qemuDomainDefBootPostParse(virDomainDef *def, { bool abiUpdate =3D !!(parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE); =20 - if (def->os.bootloader || def->os.bootloaderArgs) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("bootloader is not supported by QEMU")); - return -1; - } - /* Firmware selection can fail for a number of reasons, but the * most likely one is that the requested configuration contains * mistakes or includes constraints that are impossible to diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 12128acda6..b2624c9131 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -766,6 +766,12 @@ static int qemuValidateDomainDefBoot(const virDomainDef *def, virQEMUCaps *qemuCaps) { + if (def->os.bootloader || def->os.bootloaderArgs) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("bootloader is not supported by QEMU")); + return -1; + } + if (def->os.loader) { if (def->os.loader->secure =3D=3D VIR_TRISTATE_BOOL_YES) { /* These are the QEMU implementation limitations. But we --=20 2.39.2