From nobody Wed Nov 27 00:37:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1703129186; cv=none; d=zohomail.com; s=zohoarc; b=JyghlhAbalAgCqYoEMxJuLxEDFXVjFNqmHmZz/i/y2LzQt7vjCr2LTVz2UiX5XHul243/AtKTOkYfcJc6i+qxusiXi7DU/pm78VmXnLu3KHxF5KK+PIxTi2/izsXoCaVqyt54BVWS73k1n8aLNPjCFcvM2GzI2uobmwcWECzEls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703129186; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iAff7NfKLGsZIuLEI++nBQMcWTneKvjKIjS8kdqu5s0=; b=dR4lrUHEyeMYhx6w0++o/sGm8qrb0UmRNszCncAtDgFfummc1q95eO0hjUkCONzl8SzXRyYLbWHHZ8nCYgBka34XPyMd1xsn9+68uleuBjP71NQLrwHgntVqPm4cI6wUGxR4uQj6+QtjgLnPtv1roNq3c1LGqRQdUT4lBw6UInI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703129186615610.5349350839605; Wed, 20 Dec 2023 19:26:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9fr-0002aR-6k; Wed, 20 Dec 2023 22:24:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rG9fp-0002Le-CX for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:37 -0500 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9fn-00010k-MT for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:37 -0500 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-67f147c04b7so1909856d6.2 for ; Wed, 20 Dec 2023 19:24:35 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id l16-20020ad44d10000000b0067f7b6318b9sm347257qvl.10.2023.12.20.19.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703129074; x=1703733874; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iAff7NfKLGsZIuLEI++nBQMcWTneKvjKIjS8kdqu5s0=; b=eXaAbXjU1rRjWFOPTFYOeAQiKWC2eVC94Trhbu00oRCYErtxvxMifuiJWA5SlQ0ON2 Kr/rVMiJ6PTzsGnIAdnT/KiqCCyRXm4sPNqBVOjDPFY7H4G551vYhOkQDUE+n4l9B5wR yaxGZ9YKGPC2FPb3eQJHg30x2MCKcddjbRm0mK+YXhhR1qpAsvBBfB32FWn0rcojah7g wO6NgLHQKp+5qmZrdwt6IfobBQd9MG27PO6edbr3d2CMyUdZS2ggLpT5WcJBmX52meTb b7Zn2WY8Xrmte59DljxabD5v/1ZQnhdpQdunhmoV8IXO+rflHC8TWf41wdS6hetmHBa8 ytcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703129074; x=1703733874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iAff7NfKLGsZIuLEI++nBQMcWTneKvjKIjS8kdqu5s0=; b=j13Q9xJb2zNPTWfhvluTR2JFVeXUHGJ2xZdbhg7QznReOCQ0R6JNmF51jM7RiWg3OY 94vFYrYy5is93zx11bBb4gtOaFF0lNGJpd0Ie7RwUKwgFdH7hoEYIVILFI1S1rhOzvLO VZXBFypNXLIhSg6EFw0q4itsik2yzVvb3GlFYnobqNMsyGvJwQubVQHJaTJQb9UiyFPU Cd7Cmbk7J3eV1VpB2JdHJZzCIVWDfwDUq+sLait2fIfKDYlUOav4Vwl19Ah5ebrAgAB2 eL2cmlvjFpxlG2ypIt2KeY389BrST97MTmt3hHzYQX6SN0KrmAoVvmLzajud2o84X46u 2yOA== X-Gm-Message-State: AOJu0Yx9AukVwJ5UP/Dw9CEnFeXa+WmpabZZ3s+ZOT+KEhHqFg5lazJ2 EdY7V82t2MjgzjEAZU6NZB5mGz9vkbVKlLWIrPKqUtQJ X-Google-Smtp-Source: AGHT+IGJfdLQi/JlcR0yUq2wvZMxkAzUCadmxTljvMPOS4rLLRfqZnP/1T/Hdkl4uprKM01+ZpXghA== X-Received: by 2002:a05:6214:20ad:b0:67f:808f:d30e with SMTP id 13-20020a05621420ad00b0067f808fd30emr805328qvd.32.1703129074735; Wed, 20 Dec 2023 19:24:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Juan Quintela Subject: [PATCH v2 66/71] migration: Constify VMState Date: Thu, 21 Dec 2023 14:16:47 +1100 Message-Id: <20231221031652.119827-67-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221031652.119827-1-richard.henderson@linaro.org> References: <20231221031652.119827-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::f35; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1703129188612100001 Content-Type: text/plain; charset="utf-8" Reviewed-by: Juan Quintela Signed-off-by: Richard Henderson --- migration/global_state.c | 2 +- migration/savevm.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/global_state.c b/migration/global_state.c index 4e2a9d8ec0..8ee15dbb06 100644 --- a/migration/global_state.c +++ b/migration/global_state.c @@ -131,7 +131,7 @@ static const VMStateDescription vmstate_globalstate =3D= { .post_load =3D global_state_post_load, .pre_save =3D global_state_pre_save, .needed =3D global_state_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(size, GlobalState), VMSTATE_BUFFER(runstate, GlobalState), VMSTATE_END_OF_LIST() diff --git a/migration/savevm.c b/migration/savevm.c index 39148636cc..3d0f459389 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -438,7 +438,7 @@ static const VMStateDescription vmstate_target_page_bit= s =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vmstate_target_page_bits_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(target_page_bits, SaveState), VMSTATE_END_OF_LIST() } @@ -454,7 +454,7 @@ static const VMStateDescription vmstate_capabilites =3D= { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vmstate_capabilites_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32_V(caps_count, SaveState, 1), VMSTATE_VARRAY_UINT32_ALLOC(capabilities, SaveState, caps_count, 1, vmstate_info_capability, @@ -499,7 +499,7 @@ static const VMStateDescription vmstate_uuid =3D { .minimum_version_id =3D 1, .needed =3D vmstate_uuid_needed, .post_load =3D vmstate_uuid_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY_V(uuid.data, SaveState, sizeof(QemuUUID), 1), VMSTATE_END_OF_LIST() } @@ -512,12 +512,12 @@ static const VMStateDescription vmstate_configuration= =3D { .post_load =3D configuration_post_load, .pre_save =3D configuration_pre_save, .post_save =3D configuration_post_save, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(len, SaveState), VMSTATE_VBUFFER_ALLOC_UINT32(name, SaveState, 0, NULL, len), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription *[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_target_page_bits, &vmstate_capabilites, &vmstate_uuid, --=20 2.34.1