From nobody Wed Nov 27 00:40:39 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=1703128927; cv=none; d=zohomail.com; s=zohoarc; b=Lfad4Yeu4GAjZjsdAmrB6DZAnTfotxiD/y1seuBV3idCe7HlMVXZLR38iwpCusoj9CiwJWkkGLxO5fZwg0o5ax5GdHI8iMXtV4WO3ux1bVP6k1XvS23yzjrnh+Dj5sADkJUpjMhWCoz7mC/3AKuAyJpZxUG/BOhz+MhBmKQoXTU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703128927; h=Content-Transfer-Encoding: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:Cc; bh=vhaDOlXqK723HSaocfjU1ZCevxhmhF4yuGDJMeM3d5I=; b=A3znsvbn4WKcA9cNOznfbs7GvxNO/F6BNVUOJGFXlA2a3FXiUgV19i7ZwMUp8CZfstaH9cmo5aCbPLE7RCko2eKk5caF53FI5/s9XK7z7C35Xs+ps1NzGse1WWgQn+3jT/i7VpKWaXHibJzVDXy9ism9QHwgKVN7syI/dWJiUcA= 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 1703128927206121.97402327155783; Wed, 20 Dec 2023 19:22:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9Zg-0007ao-OM; Wed, 20 Dec 2023 22:18:16 -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 1rG9Zf-0007aV-HD for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:15 -0500 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9Zd-0003pH-Tc for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:15 -0500 Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-7811b05d23bso20297285a.0 for ; Wed, 20 Dec 2023 19:18:12 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128692; x=1703733492; 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=vhaDOlXqK723HSaocfjU1ZCevxhmhF4yuGDJMeM3d5I=; b=jL5AfgEm4k7OiY/+dVcslWF1V5eGUuFBSJIxs+f8UCAsYTpxT4sHITiRxqP54ngi69 cRiQBIfeN6BB8ar3qMZ7Q/fii8dhSdRumKgiWAlfbeKBs+9pf5XT3kgKJXQfQvdESTGD uLR5NNEoDCZWx58niRf6O6JQ76+0bj7fvTkqSO1FnurHwiaiIBg6A2u5+8CRXp6o1AG0 KMkTBV+6psiNJfnutI+E4dPIFYPhJjmccHIpg9Wg/ju5gbEBIoKT3y8wzuaxa6vrKk8B DHZjH/dlmpQcs2rhRIH5PHLHjWcvI2zF2z8UGhxHK/OaXciOUbJkjD474qIytz/sRwOm Hf4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128692; x=1703733492; 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=vhaDOlXqK723HSaocfjU1ZCevxhmhF4yuGDJMeM3d5I=; b=LSEWUSPqRbyX+C1ca4ffnP6u8NFAWttVj8eH+VnWxharBkHGZBEr9Frjo2XzPjsFc3 MJGkvBUJIirNOH5JcINqzqUT9HISDcdPjWiQDY7RRjvKNbo45rtaTeeIsKqLfsm+5v+G Lsd3ZbUTEhkNWRbx2ft6xnizbdSIXFn+NebhlsoR3Qh7lpUvndLhIiRdcQpcPf4koU8b OGeFW457xK92ssDLizJ0REOeHsQkwubkon9ViqtFbSF+elV1mS1VBd6YlZE+2qvxm12o 8nwkpUvMHg4IMG2ssxQuVv7x2MfgFxIaaLUgITqU8OGs0m7C1N0EZlUolCUNE+5IVgR/ 7xgw== X-Gm-Message-State: AOJu0YzG9SYAETz63v2xXtFb54pjSXOPGH9Ju+g+//UGoKeD80BZcxxA bMee3Nk7sFi2vFeXEDnDzqTTMJ3AnbIYMFEJ7xsEbs7M X-Google-Smtp-Source: AGHT+IEytkLvltHz6xQehqzpm6q6tVlu/5YcMSTgihNWxGuSpmRP3Cq9vopZdjfh9Tuhm2TUwtb0GQ== X-Received: by 2002:a05:620a:31a7:b0:77f:5694:a03 with SMTP id bi39-20020a05620a31a700b0077f56940a03mr26876561qkb.111.1703128692095; Wed, 20 Dec 2023 19:18:12 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/71] target/s390x: Constify VMState in machine.c Date: Thu, 21 Dec 2023 14:15:57 +1100 Message-Id: <20231221031652.119827-17-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::72f; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72f.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: 1703128927851100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/s390x/machine.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/target/s390x/machine.c b/target/s390x/machine.c index 37a076858c..a125ebcc2f 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -66,7 +66,7 @@ static const VMStateDescription vmstate_fpu =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D fpu_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(env.vregs[0][0], S390CPU), VMSTATE_UINT64(env.vregs[1][0], S390CPU), VMSTATE_UINT64(env.vregs[2][0], S390CPU), @@ -98,7 +98,7 @@ static const VMStateDescription vmstate_vregs =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vregs_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { /* vregs[0][0] -> vregs[15][0] and fregs are overlays */ VMSTATE_UINT64(env.vregs[16][0], S390CPU), VMSTATE_UINT64(env.vregs[17][0], S390CPU), @@ -157,12 +157,12 @@ static bool riccb_needed(void *opaque) return s390_has_feat(S390_FEAT_RUNTIME_INSTRUMENTATION); } =20 -const VMStateDescription vmstate_riccb =3D { +static const VMStateDescription vmstate_riccb =3D { .name =3D "cpu/riccb", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D riccb_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY(env.riccb, S390CPU, 64), VMSTATE_END_OF_LIST() } @@ -174,12 +174,12 @@ static bool exval_needed(void *opaque) return cpu->env.ex_value !=3D 0; } =20 -const VMStateDescription vmstate_exval =3D { +static const VMStateDescription vmstate_exval =3D { .name =3D "cpu/exval", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D exval_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(env.ex_value, S390CPU), VMSTATE_END_OF_LIST() } @@ -190,12 +190,12 @@ static bool gscb_needed(void *opaque) return s390_has_feat(S390_FEAT_GUARDED_STORAGE); } =20 -const VMStateDescription vmstate_gscb =3D { +static const VMStateDescription vmstate_gscb =3D { .name =3D "cpu/gscb", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D gscb_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64_ARRAY(env.gscb, S390CPU, 4), VMSTATE_END_OF_LIST() } @@ -206,12 +206,12 @@ static bool bpbc_needed(void *opaque) return s390_has_feat(S390_FEAT_BPB); } =20 -const VMStateDescription vmstate_bpbc =3D { +static const VMStateDescription vmstate_bpbc =3D { .name =3D "cpu/bpbc", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D bpbc_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(env.bpbc, S390CPU), VMSTATE_END_OF_LIST() } @@ -222,12 +222,12 @@ static bool etoken_needed(void *opaque) return s390_has_feat(S390_FEAT_ETOKEN); } =20 -const VMStateDescription vmstate_etoken =3D { +static const VMStateDescription vmstate_etoken =3D { .name =3D "cpu/etoken", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D etoken_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(env.etoken, S390CPU), VMSTATE_UINT64(env.etoken_extension, S390CPU), VMSTATE_END_OF_LIST() @@ -239,12 +239,12 @@ static bool diag318_needed(void *opaque) return s390_has_feat(S390_FEAT_DIAG_318); } =20 -const VMStateDescription vmstate_diag318 =3D { +static const VMStateDescription vmstate_diag318 =3D { .name =3D "cpu/diag318", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D diag318_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(env.diag318_info, S390CPU), VMSTATE_END_OF_LIST() } @@ -256,7 +256,7 @@ const VMStateDescription vmstate_s390_cpu =3D { .pre_save =3D cpu_pre_save, .version_id =3D 4, .minimum_version_id =3D 3, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64_ARRAY(env.regs, S390CPU, 16), VMSTATE_UINT64(env.psw.mask, S390CPU), VMSTATE_UINT64(env.psw.addr, S390CPU), @@ -278,7 +278,7 @@ const VMStateDescription vmstate_s390_cpu =3D { irqstate_saved_size), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_fpu, &vmstate_vregs, &vmstate_riccb, --=20 2.34.1