From nobody Mon Feb 9 22:03:52 2026 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=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1665495937; cv=none; d=zohomail.com; s=zohoarc; b=O8+yLUrnwYPXsLft2YuC9PSGn6JUQjGFkTw92apLmHDiUDv1vgBBhrqQ+JeivO3sQTihxZPVczvL2xHLHaHjgJ3N9bxhhZF0qKpavceQrIYCaCcUvRopWA65ENRxndzjWaAQR+0RSQ2V0Ahbo9UnHJ2MswLmk0lCZNqlcYGpdME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665495937; h=Content-Type:Content-Transfer-Encoding:Cc: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=bjQircpUO+mCQD3QRKRE/BYhs1DhOwcmgvc7llMOJyE=; b=HOBf21bIXbTqpTKPCFl0TtzDCY1m2PCwOZ3K3KFo2JFXBi4eB/MEVjV2RWUqk3d5gT2Hu/1lgVJqXtXG+MexUQUo8reb1vhe8zp5VYIesZYGHaJcYaEDV+evtsOMjS2Ii8Xjc/YfR/x2TIb6eGEC80c+vTc288I2RcvjXxu1wcs= 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=fail header.from= (p=quarantine dis=quarantine) 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 1665495937291599.4805018389218; Tue, 11 Oct 2022 06:45:37 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-281-v2zCQevOMeqmlKiiPtVqVw-1; Tue, 11 Oct 2022 09:45:26 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71A1329AA2FB; Tue, 11 Oct 2022 13:45:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3F36414A815; Tue, 11 Oct 2022 13:45:17 +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 57F321946A44; Tue, 11 Oct 2022 13:45:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7F2A119465A0 for ; Tue, 11 Oct 2022 13:45:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E22E9145F978; Tue, 11 Oct 2022 13:45:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA7D6145F977 for ; Tue, 11 Oct 2022 13:45:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9FFD0801585 for ; Tue, 11 Oct 2022 13:45:15 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-m_qFM6iCPUqV_hLT8nWbBw-1; Tue, 11 Oct 2022 09:45:12 -0400 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MmxkN2nLWzVhq0 for ; Tue, 11 Oct 2022 21:40:44 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 11 Oct 2022 21:45:09 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665495936; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=bjQircpUO+mCQD3QRKRE/BYhs1DhOwcmgvc7llMOJyE=; b=IlzyUAFraC10Fsijb18wQWp9FRgp/AP+j3adJLR8G3I9fTNnyWAOwDIW3HUxMPNeEG46sB IGmljRlTuk9LTDJAtX1gpve42fF6wzD7VCeX+IvclPeW3rPkXofQU8W38ZnhFbcYQqgW2l /XIaUmIUWLLK5K8HZttxUwmWDvbvcNE= X-MC-Unique: v2zCQevOMeqmlKiiPtVqVw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: m_qFM6iCPUqV_hLT8nWbBw-1 From: Jiang Jiacheng To: Subject: [PATCH 6/7] qemu: Support add bootindex = -1 to boothash Date: Tue, 11 Oct 2022 21:38:32 +0800 Message-ID: <20221011133834.384749-7-jiangjiacheng@huawei.com> In-Reply-To: <20221011133834.384749-1-jiangjiacheng@huawei.com> References: <20221011133834.384749-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, jiangjiacheng@huawei.com, xiexiangyou@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: 1665495938058100001 Content-Type: text/plain; charset="utf-8" Support add bootindex =3D -1 to boothash and return 0 if duplicated bootind= ex =3D -1 is set. It is nessary to add bootindex =3D -1 into boothash, otherwise libvirt will= auto set boot dev, which will cause bootindex unchangable. Meanwhile, bootindex =3D -1 means d= isable bootindex, so it should be allowed to set duplicated bootindex =3D -1. Signed-off-by: Jiang Jiacheng --- src/conf/domain_postparse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c index 9810de7437..d264a2ffee 100644 --- a/src/conf/domain_postparse.c +++ b/src/conf/domain_postparse.c @@ -1044,6 +1044,12 @@ virDomainDefCollectBootOrder(virDomainDef *def G_GNU= C_UNUSED, order =3D g_strdup_printf("%d", info->bootIndex); =20 if (virHashLookup(bootHash, order)) { + /* -1 means disable bootorder so it allowed to + * make more than one device use -1 + */ + if (info->bootIndex =3D=3D -1) { + return 0; + } virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("boot order '%s' used for more than one device"), order); --=20 2.33.0