From patchwork Fri Dec 29 21:22:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 758803 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp4671225wrw; Fri, 29 Dec 2023 13:27:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfCePM5rRPd/bCksZhRU8iwRMGbSiuVMFb8UTsnrxjdL1HatmdPnhfkt8SYm7R61dRULCA X-Received: by 2002:a05:6808:338b:b0:3bb:c774:563c with SMTP id ce11-20020a056808338b00b003bbc774563cmr4425769oib.61.1703885227288; Fri, 29 Dec 2023 13:27:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703885227; cv=none; d=google.com; s=arc-20160816; b=kC3o7r6zJichAUD6k/4aLr5td3Gs5gG/86La1obPVTGC6InNLABtxsCPOI4aFEChp6 nAIX3SN8UxqwTM6Aa390TIw/g9Eyaj+AwJA/qfVXO+YpThdsFxUyY+cC7l3ZAiX/L7KF 6reuP+LGUZAz31aYuQ9G2WxK80MqKzODxd22hdgKUxZgkDyEdX0pGI6QQrbv3B+JMAmE WlObGeuy99Ks0u17IdiY56NEYkQJN4QJPr/clK9RJhXsYIsDjIUlBzqWMD561b6gaY8+ JsFbzBuNXaV6IZIvXFj4x/qENF1rIMEZk0wT6iRHJCngqiSWKBoecvFt/ltbnUV56usC q3Jw== 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=CWWqpcyXTMz7Xz2FP1em44VzN8AMs3WMuNzELPAxUXs=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=R2dZQg9eLHXyifz6z+iDkA9gdhj8gd+FtuCH8rti1lgFS6djXkc2NAQ9GrAPAXYlBC NK3hLNGRUo5VgG2yOtBl1L47s32JY6NEsq2YLD2f8MzlhcY8O9uiI9ENvG6aMiCMe/wo ci/dGxB7w7WjW4U1ewvscC4pDCAOs/vyIcedUhaB+d0uJXC/E+YV367Vsix/SSp4ksKz wuvmrYWCX/dtg5llr32imkb1we4rJqA692ruYHokRq5piRldeQYOaA6E6d2a0Eu8A+Wi EW+PLSZsN8to/MMZb+4F2w1NpHaNgkeORBCkgXUcOy+gvSMR7cYvQbioWWhkcUC5dPHF vYLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nuRG0sEL; 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 c7-20020a0ce147000000b0067f623d7750si17888538qvl.468.2023.12.29.13.27.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2023 13:27:07 -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=nuRG0sEL; 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 1rJKLN-00076L-QZ; Fri, 29 Dec 2023 16:24:37 -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 1rJKLL-00075R-Mm for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:35 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKLJ-0006iY-1R for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:35 -0500 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5cdfed46372so4075063a12.3 for ; Fri, 29 Dec 2023 13:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885072; x=1704489872; 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=CWWqpcyXTMz7Xz2FP1em44VzN8AMs3WMuNzELPAxUXs=; b=nuRG0sELlKyURlE6DWlxfWPCVx8KKKiYVtnSrMUmCKixunW197g2CP+c+PYjKx7zU+ tVVvtizm85Klny6nGxwxq1VYv221etCvncxc77mEqjBZZZhNBYur0oOY/kwtzKxYVYPV Rgzi0mshwyzaCZ0gOSh3vsACZR6HZych+w6KRD0vg2zopbqEuTvtiEXiB3ngvQ04UZlJ jMO6zvMkih0L2nL/OrEE1YLemHNEYkWL0dA0JdRJ+3KYqp1ZdXjVVIGlz2ZjS2laqqX4 SqJkegta1o+YJtzqFdZwLkpXuNaU+pV3qpID9GR70rLp5QyZngqiQlr+O87WPfAotvPE ht/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885072; x=1704489872; 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=CWWqpcyXTMz7Xz2FP1em44VzN8AMs3WMuNzELPAxUXs=; b=Dfypk8F7DZcwGA44/iRfvSHibz41U3DZRMhX/svOki1RLInZO+anAJhzwQrQTfGNZ8 JS9a8fbxip59lLIMH5GHQIRMlerpihj5aQFkh6gD88jZq5UwW+tHiUw1z/9NiwReEqAe TjtTkQ0I817axWBZt4rzTDyHZqOVvxWcuINEGTar33WQ4La+m7ahiKP+vJFidTpJG55U SSIRPODRk6G3nF2W+ZV5eGfbWvNloto8v8iht++lBWZq3WGyocVS9xzaAo+8CA34JokB 6fzKqVCo5/lzfCJjwQC85wJ54ccG7v1CTiN8g129HLmEK68c1hmozxEELoDV+sEe4Gg0 g8Wg== X-Gm-Message-State: AOJu0YxI6iGE2DL4Kje9tNbtii0RI9NWSXq3FCNoRd9Lo7NcdcYL1h2Z ptdaLkIMmVJ+/vB+nse3a03Gvor0/Vfm6bw76hnQXbQL3FT/eg== X-Received: by 2002:a05:6a20:6311:b0:18c:2d7:c4b0 with SMTP id h17-20020a056a20631100b0018c02d7c4b0mr11389742pzf.4.1703885071718; Fri, 29 Dec 2023 13:24:31 -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 a34-20020a631a22000000b005c65e82a0cbsm15016237pga.17.2023.12.29.13.24.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:24:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 16/71] target/s390x: Constify VMState in machine.c Date: Sat, 30 Dec 2023 08:22:51 +1100 Message-Id: <20231229212346.147149-17-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::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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 Message-Id: <20231221031652.119827-17-richard.henderson@linaro.org> --- 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,