From patchwork Mon Nov 6 06:57: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: 741303 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp950032wrr; Sun, 5 Nov 2023 23:14:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFubVsjN1At36XOka7ZG7vqoMfZL8IhLQS1YgUzuWfePsuLMuRpea8+ArdgN4r3yMBWEKPo X-Received: by 2002:a05:620a:458d:b0:779:d0a6:2e6f with SMTP id bp13-20020a05620a458d00b00779d0a62e6fmr35192758qkb.43.1699254859328; Sun, 05 Nov 2023 23:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254859; cv=none; d=google.com; s=arc-20160816; b=bOstYtPWusurXdk9/20YxHj4xBx2TE7n0bbDawuPdLlCs0p3ft4mzEObsRr1ArG9mI GDg0lKdat5GCl+uJb+CMwZn0E7/O5+a28nn4vSiAo94J/IWHCVp95Y8J9VjwjjihylFA jVgDjvkkm++JtL8l/omJXIbvhI9XIsYOsXWLykCwt2cQZh9VFYVg6aVQEFs7TlyvTK52 aCVuNMoFXbxXnXvBUzC/Uz5sSpmbEve5JPYMViz+1IOJoSVnq1zZ6NnV+jXI98BgGmJs fnhGU/X1Sp5P77ub5JOL7sv2z4N+9jH/ekX6P/t8kMpSi/wYrQqPTAwbTkGqDg754jxG FQsQ== 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=vhaDOlXqK723HSaocfjU1ZCevxhmhF4yuGDJMeM3d5I=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=Ccrn9BMIUtfWuW6x3d35zzpt6/red7ZTguHnbvFMlF/krxdO42nJBBcVc1ADg2aJ2A IP7RSugoTgJg9m97+Pc85LYBxZY73jR1pJ0+UrHrhEEdvSRk8wD4/dqA7vcVL4lCgN/f TYYSp9PTRJrVFQFCMsiaMOaAM3ewk0ZjTmx3fN0pbEbrvny/BL8uidtbyupHMx+/AThr phPyGbSf5nNDl+ox8boAH10XormhsuGgghEtVDoQP6fu/bxKz5mwRkD2sQ14tAuj7Vq2 zdVoGe0WR4cCVCOMYfNp9zIFwKIn+ne3ncX4JzxJDvQvq7zU0BdRHgIejg3rLjfSiOcq 7PVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DfILDRyz; 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 y22-20020a05620a44d600b0076c81b9cd8csi5680886qkp.739.2023.11.05.23.14.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:14:19 -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=DfILDRyz; 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 1qztZZ-0004Za-KK; Mon, 06 Nov 2023 01:58:57 -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 1qztZO-0004V6-Pk for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:46 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztZM-0001Oj-GS for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:46 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1ccbb7f79cdso5485845ad.3 for ; Sun, 05 Nov 2023 22:58:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699253923; x=1699858723; 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=vhaDOlXqK723HSaocfjU1ZCevxhmhF4yuGDJMeM3d5I=; b=DfILDRyzNDrR8ECbgoMra8J2l2D3unYez3+EyiQ8B+kbolZpjFa+SsZTuK4qKAxvg3 9zG00trlXnKRS7D+C2rIzME572xh1wbmvXW3CecJzRktynwg0oiKnRvdyj3GxBAu2qGw PlLGy+LUVpFOgl4O+Rha8856WR7zldbl74B7I4IWvwb7H4r+ZpyryWEI+hU5HI02ViR/ Mhk2NKEU2rCiWrHhWsVbnpyUtsLHAjuNFViLemyN7sh3PB6CsKr8U20++2poCiFHwpfL d9zTtRO29qKBJ625M2xxG2HkcHXHO/yJR75RTrCxOvSbUGkwecgFLGsNb1x3HTgZDuz6 AxhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699253923; x=1699858723; 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=vhaDOlXqK723HSaocfjU1ZCevxhmhF4yuGDJMeM3d5I=; b=WTdmcUrkxl28yZXBfA5+z6S30sUXI61d2OrKk2tTAY6oaq3TuOHL7O6VBLsrwXi9Fb ZLY7GRR/PJmy4UUymxzDM7TWieQtPLTI7qmnMRzQt9z9kC0/blkZITrFhhNB5urCLpZL ApLfM/ZqTw2FCB+S/r7w1neae+noNI4WSnDDPtYPNOfdjA5TQ/GlQ3rVCKNuIcAxnJUD mJpaG03zTPNyLlPCva/1JHKrQ3t2qjU/JA7e+JPh9tdR+Y9oiIftfGAZHPJz+xnftnAn 1PxubCG7M3tkDefUtQps5W2JVc8VAeZeJHoqxJwcNaJUVin30acg3ajTaFnsl653+vUI KZCQ== X-Gm-Message-State: AOJu0YzuikB9xB3bXu3IoySb4Zcm77IaN4hzQrbpaer+9DQ7ya5FlbJI YyXx0dyJbap6tpf3K4BTd1OZNCi+LONgCI8ho/Y= X-Received: by 2002:a17:902:d18d:b0:1cc:1106:cf5b with SMTP id m13-20020a170902d18d00b001cc1106cf5bmr20889551plb.19.1699253923326; Sun, 05 Nov 2023 22:58:43 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id c3-20020a170902d48300b001c62e3e1286sm5167130plg.166.2023.11.05.22.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 22:58:42 -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 16/71] target/s390x: Constify VMState in machine.c Date: Sun, 5 Nov 2023 22:57:32 -0800 Message-Id: <20231106065827.543129-17-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::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 --- 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 = { .version_id = 1, .minimum_version_id = 1, .needed = fpu_needed, - .fields = (VMStateField[]) { + .fields = (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 = { .version_id = 1, .minimum_version_id = 1, .needed = vregs_needed, - .fields = (VMStateField[]) { + .fields = (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); } -const VMStateDescription vmstate_riccb = { +static const VMStateDescription vmstate_riccb = { .name = "cpu/riccb", .version_id = 1, .minimum_version_id = 1, .needed = riccb_needed, - .fields = (VMStateField[]) { + .fields = (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 != 0; } -const VMStateDescription vmstate_exval = { +static const VMStateDescription vmstate_exval = { .name = "cpu/exval", .version_id = 1, .minimum_version_id = 1, .needed = exval_needed, - .fields = (VMStateField[]) { + .fields = (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); } -const VMStateDescription vmstate_gscb = { +static const VMStateDescription vmstate_gscb = { .name = "cpu/gscb", .version_id = 1, .minimum_version_id = 1, .needed = gscb_needed, - .fields = (VMStateField[]) { + .fields = (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); } -const VMStateDescription vmstate_bpbc = { +static const VMStateDescription vmstate_bpbc = { .name = "cpu/bpbc", .version_id = 1, .minimum_version_id = 1, .needed = bpbc_needed, - .fields = (VMStateField[]) { + .fields = (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); } -const VMStateDescription vmstate_etoken = { +static const VMStateDescription vmstate_etoken = { .name = "cpu/etoken", .version_id = 1, .minimum_version_id = 1, .needed = etoken_needed, - .fields = (VMStateField[]) { + .fields = (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); } -const VMStateDescription vmstate_diag318 = { +static const VMStateDescription vmstate_diag318 = { .name = "cpu/diag318", .version_id = 1, .minimum_version_id = 1, .needed = diag318_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(env.diag318_info, S390CPU), VMSTATE_END_OF_LIST() } @@ -256,7 +256,7 @@ const VMStateDescription vmstate_s390_cpu = { .pre_save = cpu_pre_save, .version_id = 4, .minimum_version_id = 3, - .fields = (VMStateField[]) { + .fields = (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 = { irqstate_saved_size), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription*[]) { + .subsections = (const VMStateDescription * const []) { &vmstate_fpu, &vmstate_vregs, &vmstate_riccb,