From nobody Sat Feb 7 04:40:26 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=1671891723; cv=none; d=zohomail.com; s=zohoarc; b=KtPEmCuDf0GWFTOK8J845+pFg9dMKqKIq0DBzbLjM0OA4W6DVvsX2tC5HM2BaeWbNpU5bOit2bTTMIeJ0CbcdOyj3vTFX9CtliRgVvgiTq0mKx21cVtOd6n7fYyQhBX2eVrHcWwJRAdo+iUwwne9IdHwie43o+6jmuf2mHEwWDc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671891723; 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=WsmvcMPQsLIE/6h+yHavejswEV+vki35btfiDXCdZUg=; b=KhgSPV78M1lq6dL29WaVtN5RMCFX8Alta/ewPu8ZqjL4scNGZnvVlA3eKxG+gYanPpswi5Zv9VYqLmvmXSod4/YrRFkHZzy2xlVKspxm6jAT1fcgJezLxIaiZGLhyh7+BKnnjK2ygXtwkk9YzcF/fjGUjsKeuiJbmkAX8Eo14XU= 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 1671891723588879.9775055878032; Sat, 24 Dec 2022 06:22:03 -0800 (PST) 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-527-upzsuThVMsKUVfHTnhKTcw-1; Sat, 24 Dec 2022 09:21:52 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9EDA080D0FF; Sat, 24 Dec 2022 14:21:48 +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 3D256492B03; Sat, 24 Dec 2022 14:21:48 +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 1B2BF1947042; Sat, 24 Dec 2022 14:21:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D93B319465B3 for ; Sat, 24 Dec 2022 14:21:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B12B82166B34; Sat, 24 Dec 2022 14:21:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA2152166B33 for ; Sat, 24 Dec 2022 14:21:43 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 8B963101A5B4 for ; Sat, 24 Dec 2022 14:21:43 +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-317-pfz1R3dkMcahzNljMp6q8A-1; Sat, 24 Dec 2022 09:21:41 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NfR6C0pmmzJqc7 for ; Sat, 24 Dec 2022 22:20:35 +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.34; Sat, 24 Dec 2022 22:21:37 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671891723; 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=WsmvcMPQsLIE/6h+yHavejswEV+vki35btfiDXCdZUg=; b=QzaZvhgsByhJuKVE+tTaGwJamxHVQGLbOCAtpvV9Bxg4eNbtVsC1XXrwTpqnTNRSEv/MjK d49WDscFODzFAFf6UhIbApiqI7o3azjrC49dr90fd8lV9o62jXNfMDdFYyI+1fAhOFggb+ Ssrj8RRJX52vvUno9EdDau3Z5bRWh8g= X-MC-Unique: upzsuThVMsKUVfHTnhKTcw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: pfz1R3dkMcahzNljMp6q8A-1 From: Jiang Jiacheng To: Subject: [PATCH V3 2/7] qemu: Marking a device's bootindex can be changed Date: Sat, 24 Dec 2022 22:09:19 +0800 Message-ID: <20221224140924.581972-3-jiangjiacheng@huawei.com> In-Reply-To: <20221224140924.581972-1-jiangjiacheng@huawei.com> References: <20221224140924.581972-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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.6 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.10 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: 1671891724979100001 Content-Type: text/plain; charset="utf-8" We explicitly specify the boot order of some device in XML file to get the desired boot order, just like: ... ... Those devices are considered to be able to change the bootindex by the following patches. To distinguish those devices from others, we add a bool bootIndexSpecified into _virDomainDeviceInfo, which means the device's bootindex is specified in domain's XML file and can be changed after.BootIndexSpecified will be set to true only if the device's bootindex is set in XML. Signed-off-by: Jiang Jiacheng --- src/conf/device_conf.h | 3 +++ src/conf/domain_conf.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index f2907dc596..5259e25c10 100644 --- a/src/conf/device_conf.h +++ b/src/conf/device_conf.h @@ -144,6 +144,9 @@ struct _virDomainDeviceInfo { * not formatted back. This allows HV drivers to update it if effectiveBootIndex =3D info->bootIndex; + info->bootIndexSpecified =3D true; =20 loadparm =3D virXMLPropString(node, "loadparm"); if (loadparm) { --=20 2.33.0