From patchwork Thu Dec 21 03:16:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756957 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp687541wrw; Wed, 20 Dec 2023 19:25:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFm9h2VsUFg31tRiHJVbG+HccnjOIqzl2FUbUx9wtP7j9pRtdg5Sno61ixygFa3ObQ2EXdI X-Received: by 2002:a05:6214:b61:b0:67f:3f47:e12d with SMTP id ey1-20020a0562140b6100b0067f3f47e12dmr11931517qvb.34.1703129101590; Wed, 20 Dec 2023 19:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129101; cv=none; d=google.com; s=arc-20160816; b=xnd0flH/TebnxdzL37Pf0ii4YzMf9xx5Uho562T1hb0fRO99CmB5l5X/H6XWHFL4wR 7cV4/OrulWd1RKWp0Qf2VJJSUqTkFWiTdVxYAMnW35wbVy44+nB0kvK8moOlheBg0ClI lZX76mK3J9cecpweDBFJfpj4hmjYVca/W4pBxtuNdLh1oB2c61Fx+l3e9msjxK2aalA2 VJ4Rkz1d59qs93+cjvRRL7CIycWn8fxBgkvOCP6kSkAOzP+WmdSOXXU93vqmlCV1V8PT g5CvUqbQQcaVk+NCVcDSXLKieuR5/dK1wF+CNJBS+AkSE1qxTmizuLWTPrC3iBUYF/0O uVxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=DG0aaoeEohQ09SvvzgB8FkzO0oCsIp6ZWWtbFbko7Wg=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=OyCRTl9hwDcqOm/IdX2k2XZ8OmpbjTNndHKgJk79Wf8SiPy/ya//Ewgco/GuWRYeRJ 6Be/nEJLqU9gmkZIMcvQPxt95tleSqC8DR7uPY2oDWItBUiVAkQxdGHS5t4niyhA/VFB M1Gf3ntWYGJdiixi1p/LiR0QZJJnlkdjlaLGDcby2BOXbyV9GnRKNbmhAAlGwPnhkqDo wV/xXvGKHGw0ox+xXQxlIwTMCptm8pGB6DVpQMhAtlQer+naT++902QyEPXD6HaKop9q gKMYmkyiexiGQba5tug4tu9bkMMPHJuI8ZaxnV3/uG0K1JDuT42LYiQzaCp4Dsu5XO/S YU5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LGiCdEZQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z15-20020a0cf24f000000b0067f65b8f3e7si1252096qvl.315.2023.12.20.19.25.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:25:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LGiCdEZQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9fo-0002K0-Nx; Wed, 20 Dec 2023 22:24:36 -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 1rG9fg-00022M-Oa for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:30 -0500 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9ff-0000zp-Cm for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:28 -0500 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-67f7bd86cafso2322636d6.0 for ; Wed, 20 Dec 2023 19:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703129066; x=1703733866; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DG0aaoeEohQ09SvvzgB8FkzO0oCsIp6ZWWtbFbko7Wg=; b=LGiCdEZQjpDX/katPvaVui3luiopVios+d0A7EGq/bV6p6lI4RP1KqGIYH1V6KAqSu ROQmWqVe+6bZ/LRMC83TlriIn8ZO51f0+Umb5XZZhzApBs91XvG9Wh6NELQT+wooibWp 8BzoHahLrnyeCZXQQm4Qnv96wYxMQLajjMDmHFtfmcPMaJUqY8Dx/BAxa8g8u+/WElV0 A+UMcw+YmIyB63d7jy2ysdOSJLpkMx63V/w6oOmWNren+kdkSpa/B0jKNe64QYX5kKYn 4XEMR0H+dOmKXz84D0D0uKOtYFfa35XenMD/vTP5voIcln7XB3YkQGqU+4HYhTMM3OJc iXQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703129066; x=1703733866; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DG0aaoeEohQ09SvvzgB8FkzO0oCsIp6ZWWtbFbko7Wg=; b=L+5GLI8nbynYMk/ZxtOsYxGJ7JYlnYKezljY3vOGQjHp85cn1ZQljgBYJgvTehYLZq tTIMSElYMzrhQrrt1GNrUpDYsBinU3WkpTN0qcIyC+FKbQhc2+1of7nwzjzS0iRGyvSC 6vMl/m5SB0NuO0vMiCxC5xc7nN9BAOVnN69Ksqct2KWossRZHvaKcTKnP2B/UPHqnJVF aUsYOMEuzVwh0kMWmgMEj/Yqn9m5DdDw4ODoaqYyMw3IrmsT8NmfI/xflG8i7UynwEsv edfgUfRY5Qf2Qs0ifg/OlL5Yh6xkl7vN4GZtlE6BQjD/rsaMUjykjDxh0KKnCkKp689q 3Z+g== X-Gm-Message-State: AOJu0YzPepD39X1dumF4rRNd0B5k30vIftdGNIeSGB0fjM6BC3dOao2P pF8WFsNNYWKwNW/cKiihFFBDSF0KmMqdil+vPP5Se9AG X-Received: by 2002:ad4:4eed:0:b0:67f:74f6:4cd8 with SMTP id dv13-20020ad44eed000000b0067f74f64cd8mr1952971qvb.130.1703129066535; Wed, 20 Dec 2023 19:24:26 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id l16-20020ad44d10000000b0067f7b6318b9sm347257qvl.10.2023.12.20.19.24.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:24:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 64/71] backends: Constify VMState Date: Thu, 21 Dec 2023 14:16:45 +1100 Message-Id: <20231221031652.119827-65-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf29.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson --- backends/dbus-vmstate.c | 2 +- backends/tpm/tpm_emulator.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/dbus-vmstate.c b/backends/dbus-vmstate.c index a9d8cb0acd..be6c4d8e0a 100644 --- a/backends/dbus-vmstate.c +++ b/backends/dbus-vmstate.c @@ -393,7 +393,7 @@ static const VMStateDescription dbus_vmstate = { .version_id = 0, .pre_save = dbus_vmstate_pre_save, .post_load = dbus_vmstate_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(data_size, DBusVMState), VMSTATE_VBUFFER_ALLOC_UINT32(data, DBusVMState, 0, 0, data_size), VMSTATE_END_OF_LIST() diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c index f7f1b4ad7a..ebdd2e0a69 100644 --- a/backends/tpm/tpm_emulator.c +++ b/backends/tpm/tpm_emulator.c @@ -939,7 +939,7 @@ static const VMStateDescription vmstate_tpm_emulator = { .version_id = 0, .pre_save = tpm_emulator_pre_save, .post_load = tpm_emulator_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(state_blobs.permanent_flags, TPMEmulator), VMSTATE_UINT32(state_blobs.permanent.size, TPMEmulator), VMSTATE_VBUFFER_ALLOC_UINT32(state_blobs.permanent.buffer,