From patchwork Fri Dec 29 21:23:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 758847 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp4672444wrw; Fri, 29 Dec 2023 13:31:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpbRFkFk7uS3xbaFlenqfGhXs9ti9+5HOvHXa1cXPgZHQHQQX0g6YQMtGXfjj2U4D3/z22 X-Received: by 2002:a05:6214:769:b0:67a:9649:4229 with SMTP id f9-20020a056214076900b0067a96494229mr20203111qvz.65.1703885502948; Fri, 29 Dec 2023 13:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703885502; cv=none; d=google.com; s=arc-20160816; b=feWAhFvVs+N05uwiqTufyBf2vUMl7KDMOxyS2JAy1c4/t2d/eEGylL0miQ3gk6ZAIz C0fWz60ZPf30D8isNAtFJcMrH+KOfxIbXugP/ZwLdppsA5owS6rd18Jfca8RqfIgIYkG JJomGGgCjY7HaMokU0//V0627YTo2KtIJ8aBFVzKJoFUQOGhRnyStPfW+QqVC4X43x4J OFC1noJFN5HcJA1UuVvEEqZpW3Y1WqeBRrNHboO/3f6vkX7iZGjygZODOFN3olash44b 7dzEanvAYCfwNh7EoIskSIuIVAZIvVH4AAtGwj5z3WJnr95yR9IHUt6uouIXbmSRFPgm gBAw== 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=vt60Tnr4DqLoORHWhbTyoaC4aknKVapk9I6rFjWSbFY=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=sBPlLbcgIwgj+igPoUVXpB7L8dGQFapnwlrG5YGzXWIUAGM90/D228qbO8DFCKjzW6 QFIhj2xiwXNmsWsA1i3xw/isnnsCPPgj8tRPm2/NhsHMrh+WVBQOuGiMcoeHAXbhUyOq roDfkYkColOitnSR1vx1J4tO4/c7d1O8tbX2NN8H+y1lUZc2g8AvloLaLKToHeE6TGp9 iM4Dip+8+EzkVlGtNmL/dtqNf3AOv2NFtr+WcXCmYH6ODx/s+J9XNBEngTyyfPU9dtL/ b+x1EUmQSTGfsNHO0i29FanL1nTk+i2GqXe3LPcVUkfGjYdLm48lje6OocuITRXBnocW qf9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r9JozAFP; 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 a18-20020a0cca92000000b0067f4f8cc986si19825601qvk.274.2023.12.29.13.31.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2023 13:31:42 -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=r9JozAFP; 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 1rJKQ9-0008R6-0P; Fri, 29 Dec 2023 16:29:33 -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 1rJKPu-0008Ef-Ii for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:29:18 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKPl-0000NK-1n for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:29:13 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6d98ce84e18so5160941b3a.3 for ; Fri, 29 Dec 2023 13:29:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885348; x=1704490148; 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=vt60Tnr4DqLoORHWhbTyoaC4aknKVapk9I6rFjWSbFY=; b=r9JozAFP3HZdhWC8TBQmwRBg2HhFx2fgrl9ttYw3BWpmOyBKxyCYbiNXV5lxK6nAOJ FJQiu8qhuRSyA9lVSAs8/jrQSqnlaPcLgpCjtOqiy4pgdPd7BQWBEYa+zB/4+y+wD1Uo sbfWBhO3AdF19EWikWJ/Rt1TO7uGRJStpol35DqwBU3R3/AJPLHzI+ZDB3eQJ94KHwZc Hz7E/spLLrrlWUUGBCtfoFDaBc9ykNKPO4a/qH3RVhtnecXffIa68MyYfYZOSpwmg7v9 fbEN+KrDRTtCMBa79WtEoHy579/R0uXm1eWZmDZTV8Y7oZcuuhQlOT9Ehql8PviyVDyf aewQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885348; x=1704490148; 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=vt60Tnr4DqLoORHWhbTyoaC4aknKVapk9I6rFjWSbFY=; b=YWJDwPyywXYk3NYb9jS5SJU99T+ApmGiE2Jy5qL7nrGAFfUOvImCv2TtqC8HIEPTCh 300YE4DTsDiawFryOwFs/qyMvI9aQHOxsczrFJ3Tm9qxsTbXGBSJr7BzyCskO3zsEn4Q 80md4SAPkosfmXEagqsfu7I+A9WeSDQko1BH1fN6N+KpUfRkhaPUsdgio05gPDh6O1DY /oLeg6XEZlIuRK7Iz+FRCrM2CIBeIkNg/V4Lp5jCQsgyvDAP8VHy55ZnxU/9IzWyxkOB Pp1qK5PIbaIhnlsY+UfDZIODMub/nNQxFn/kQ6OBzCOxND4RMuB29Ihx94JKC2AKeuKG BuXw== X-Gm-Message-State: AOJu0Yxrcx70pHVLwXni0LSq7sS/4gOqqoQDXMNGBW1s04wHrUMYyRXI SCXkK7Ai/FIRCWCLaLCidGqRdHRdVOpMw+xHMOJTz1fbflreUg== X-Received: by 2002:aa7:8504:0:b0:6d9:b187:b176 with SMTP id v4-20020aa78504000000b006d9b187b176mr10404928pfn.13.1703885347722; Fri, 29 Dec 2023 13:29:07 -0800 (PST) Received: from stoup.lan (203-217-28-32.perm.iinet.net.au. [203.217.28.32]) by smtp.gmail.com with ESMTPSA id bd33-20020a056a0027a100b006d9a96b7d0dsm11285396pfb.208.2023.12.29.13.29.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:29:07 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 57/71] hw/tpm: Constify VMState Date: Sat, 30 Dec 2023 08:23:32 +1100 Message-Id: <20231229212346.147149-58-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229212346.147149-1-richard.henderson@linaro.org> References: <20231229212346.147149-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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 Message-Id: <20231221031652.119827-58-richard.henderson@linaro.org> --- 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),