From patchwork Mon Nov 6 06:58:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741301 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp949955wrr; Sun, 5 Nov 2023 23:14:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjqKfW+Ktu8ZttNP9fPDHB3dkWtXPgoNEj3a9iulXpxoH1Y7ooDWV+n/BGUQsJRRFEP/6Q X-Received: by 2002:a05:620a:1a81:b0:779:e171:3356 with SMTP id bl1-20020a05620a1a8100b00779e1713356mr33756599qkb.53.1699254846167; Sun, 05 Nov 2023 23:14:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254846; cv=none; d=google.com; s=arc-20160816; b=omN33djRGZiT4A8ev/Llew3OulJbGXPPFz8dB5EImI+twj0DAJ021Edyp6pxPyCyCp 8FO17145viv5IMj6f3LfqTPrKVaP11XzvmZG9RZNBHpcfml9cCLYE66a12ur9IgUxIOE fc+MPLC7Qyf5eevp0RLlbBQWP/m4GdLc4ZQ45+ifIPqvGsph0DxvY4iJU1g85KfDF2gE mVC+La7ol7ikH3tODW/UtpQqaqNJrD4W2UK/jGVwC7fQdGBkdiLTQ9TnCsrX9hVQRacy V+l2THeDeuQ2mszWMo+1KQ6lVYlf8gYwbjBLitRk/zWcV+XqrTh7B1exxyajVty3c1JY vG0g== 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:cc:to :from:dkim-signature; bh=PZ6ASpRcT/Xlbl/IqgWgNPX4+U13cawDV+cHG4YYem0=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=zcjw8aohAXmYgk0WVrrJsDyke9CX3nVudmp6oAV3i6YVM1WPYcQIHRuuEWr97/5r20 DpElANElIitCQPMrGHCl5NEqvpWSup+wCDEqoYJ/QmXJ9kKec8xqx61jDjz8IymG+k5Z 65/KUP+vJFnbET1QHvh6Cl2Tdz5aPshhvQb/D/mhAY+O2els28uhijnkoiACjUTwR/Yv HcVM2fxVF5zM90++YTK0apGwUZnaUFOhY7PwgoBCLZ1eEwOsPtOQOgQf+SzErG8XgMvJ NgtXu76jqqXLpyCo0hwEZx0AGZoa/1UldqAQrHTTFEo23s+fo6RuNL6TSFAPfJ6HwCRv q5rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=exGH93dS; 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 ro21-20020a05620a399500b007741fee2a52si4724756qkn.403.2023.11.05.23.14.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:14:06 -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=exGH93dS; 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 1qztg2-0006Nq-HY; Mon, 06 Nov 2023 02:05:38 -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 1qztd1-0000cU-5O for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:32 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztcr-00020Y-KV for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:29 -0500 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-280200949c3so3006282a91.0 for ; Sun, 05 Nov 2023 23:02:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699254138; x=1699858938; 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=PZ6ASpRcT/Xlbl/IqgWgNPX4+U13cawDV+cHG4YYem0=; b=exGH93dSvuEWCSL5u9gAvjbaCGcOGFPR2niCXbzRbogiPpb9JX0LhcYETDFQllbLug FryG72h8vSlotCeW9EKSYyxZQozE1btsXbXZiTdwXNF1O9Dr2o+KWqTWE4z7UyJlpifO mdLWKmidc7MOseD5385GsNQ63Gtprp39V4maTg08bPc4vYgpzKRMQkpshWyTJjyhk7Vz 5B6w2Peyg9y0OA9Ld6Zh76OjMq9/aEaudpJNcGoQuG8eSHEOFwPAMreyEWqN88VX4c1c oqVQq+BrTsXgRUiBcwQ4lZVNwKWSkVIFspgFdhB3tCPqxGwlerovhfwtT/xAdAoTNYa9 BnZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699254138; x=1699858938; 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=PZ6ASpRcT/Xlbl/IqgWgNPX4+U13cawDV+cHG4YYem0=; b=ejjV8IiYX66n0+I9paXNK1oLRsIRgAl5aIuAM20MQIjfUtwI5+K0wMMgCyx7faLYk0 YWiPpJZoNplWMt/bHHex8dt/7M7xTETmxRFLO+2b9hlK2WSV0926Lnr3s0tW17dFHcS6 Ja1Q4yv6mnp22E+TJsNOZfiTWxCzrMwotB/FuYwBdHbYj/uWinDioOyktAtFhdZIb/oN iB5NXljgl+z7Yq7ejOwfm+XdYEdX7qqgDezdtWh9k1yjCiaCJGkhRNM9vMFwcIkBThid fedlXbi5KDJ0bJqi84i4nXvvS3Aq+n4OhCIAMvqvDajdcoMmGTFXi12TRbi27RvzLAoF UZ3w== X-Gm-Message-State: AOJu0YzuhGKHi9/oANdaCvxjImi6a1x5PhVNRkp9KH8VSvr6tdn4hRFy mFI5hI3pT2J9Y+9JyQuphsC6J62UMKVrLGKHKB0= X-Received: by 2002:a17:90a:5c:b0:27e:3b1c:4f03 with SMTP id 28-20020a17090a005c00b0027e3b1c4f03mr22238651pjb.38.1699254138479; Sun, 05 Nov 2023 23:02:18 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 8-20020a17090a194800b0027d88387287sm5319650pjh.51.2023.11.05.23.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:02:18 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: quintela@redhat.com, peterx@redhat.com, farosas@suse.de, leobras@redhat.com Subject: [PATCH 57/71] hw/tpm: Constify VMState Date: Sun, 5 Nov 2023 22:58:13 -0800 Message-Id: <20231106065827.543129-58-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231106065827.543129-1-richard.henderson@linaro.org> References: <20231106065827.543129-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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 --- hw/tpm/tpm_crb.c | 2 +- hw/tpm/tpm_spapr.c | 2 +- hw/tpm/tpm_tis_common.c | 2 +- hw/tpm/tpm_tis_i2c.c | 2 +- hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index ea930da545..5cd5a2533b 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -220,7 +220,7 @@ static int tpm_crb_pre_save(void *opaque) static const VMStateDescription vmstate_tpm_crb = { .name = "tpm-crb", .pre_save = tpm_crb_pre_save, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, CRBState, TPM_CRB_R_MAX), VMSTATE_END_OF_LIST(), } diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index dea7b1333b..e084e987e6 100644 --- a/hw/tpm/tpm_spapr.c +++ b/hw/tpm/tpm_spapr.c @@ -353,7 +353,7 @@ static const VMStateDescription vmstate_spapr_vtpm = { .name = "tpm-spapr", .pre_save = tpm_spapr_pre_save, .post_load = tpm_spapr_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_SPAPR_VIO(vdev, SpaprTpmState), VMSTATE_UINT8(state, SpaprTpmState), diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index 279ce436b5..1bfa28bfd9 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -879,7 +879,7 @@ int tpm_tis_pre_save(TPMState *s) const VMStateDescription vmstate_locty = { .name = "tpm-tis/locty", .version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(state, TPMLocality), VMSTATE_UINT32(inte, TPMLocality), VMSTATE_UINT32(ints, TPMLocality), diff --git a/hw/tpm/tpm_tis_i2c.c b/hw/tpm/tpm_tis_i2c.c index 4ecea7fa3e..4bb09655b4 100644 --- a/hw/tpm/tpm_tis_i2c.c +++ b/hw/tpm/tpm_tis_i2c.c @@ -115,7 +115,7 @@ static const VMStateDescription vmstate_tpm_tis_i2c = { .version_id = 0, .pre_save = tpm_tis_i2c_pre_save, .post_load = tpm_tis_i2c_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_BUFFER(state.buffer, TPMStateI2C), VMSTATE_UINT16(state.rw_offset, TPMStateI2C), VMSTATE_UINT8(state.active_locty, TPMStateI2C), diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index 0367401586..8887b3c9c4 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -53,7 +53,7 @@ static const VMStateDescription vmstate_tpm_tis_isa = { .name = "tpm-tis", .version_id = 0, .pre_save = tpm_tis_pre_save_isa, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_BUFFER(state.buffer, TPMStateISA), VMSTATE_UINT16(state.rw_offset, TPMStateISA), VMSTATE_UINT8(state.active_locty, TPMStateISA), diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index 2fc550f119..941f7f7f62 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -52,7 +52,7 @@ static const VMStateDescription vmstate_tpm_tis_sysbus = { .name = "tpm-tis", .version_id = 0, .pre_save = tpm_tis_pre_save_sysbus, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_BUFFER(state.buffer, TPMStateSysBus), VMSTATE_UINT16(state.rw_offset, TPMStateSysBus), VMSTATE_UINT8(state.active_locty, TPMStateSysBus),