From patchwork Mon Nov 6 06:58:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741307 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp950157wrr; Sun, 5 Nov 2023 23:14:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtchsSTQW4w79fyfi8B0qYqHpbjhYXu6RGyyvmPe7GdsbxwTeGuFG0CiPubYbJZ3Uvc6Pc X-Received: by 2002:a05:6214:301b:b0:66d:368e:24f5 with SMTP id ke27-20020a056214301b00b0066d368e24f5mr34526508qvb.46.1699254887366; Sun, 05 Nov 2023 23:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254887; cv=none; d=google.com; s=arc-20160816; b=triSkPLSGtueqzGNnbb8zfrKK/8Ow0CcHWQkYkh9H4Qz/6VJJjwViSueAJ4R5xfFeT SaFs7slSvtczHYxpkaz9zSaxmf1Owo1CfsCwD5t2nlAZM56yMP1c4FhSWyeoEYr0WuVn kmwdjuk21pQurugAnsGfssAFfVNIbPkQoICcESjzICt20R5I0AbFOwJehV80/LE+24Qh UAMr1Q5Hr5UOZlWvIUBjhcvFqJGKir2zP3YckCDSIswAQi/O25cPD+/UMlw/5GYqMHgr 67ZeE+2JHmK+Rf9Kzfrr/wDr3mr/TO3rEpGHi99n43/ya1wBRTYlx6T9unwQB1hRuww7 PsvQ== 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=wP/TkDWVSVJqvgDwz7D9SOOabbihQTPsWePRhRJgejc=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=mDvKlFT/Vkn2DOnj0/Y3aMHPqF0E/wCBt3HpqXTC70RonAa2U56R+6bm9PxPb9IUjn cPbU/4uS1SmwI5RcvJeboNxjSDKa//idzRSAB9T4Bwb/64UNO0vMqvGi79bW91TsvcNY gwQREiSrBmG/5mfmE26fYy+q+avucU+NFZ+t/osSiuMtqx6pgmfaLsWVmJiWi7rwor0K hMtMfXv4aB1LEfi7LxIuHhdSF9nmZYMm6BuOgED8/PWDe45+ERkiiwl63+JdwzqKVr7E rcQKLKwtstjJ9TfTOBWCcOYar9K9cwCeV7pg6YNhUxZcZWndtxAMgN+cXz30TmJ5WbQN WEzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MkBpatoh; 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 da18-20020a05621408d200b0066d854ccbe8si5399727qvb.388.2023.11.05.23.14.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:14:47 -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=MkBpatoh; 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 1qztg7-0006gv-4L; Mon, 06 Nov 2023 02:05:43 -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 1qztdD-00018f-CW for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:46 -0500 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztcz-00022D-92 for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:39 -0500 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-5bd6ac9833fso483481a12.0 for ; Sun, 05 Nov 2023 23:02:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699254146; x=1699858946; 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=wP/TkDWVSVJqvgDwz7D9SOOabbihQTPsWePRhRJgejc=; b=MkBpatohcPggXAnUQgjErz39eq5oJdkG0szGCjqigJtPrs5zhaxpywbcRGF5wc5gaG +jKOIX3QDCNIhSnpZCAdDElokShGHDLf0GjxVyScGMVXD32t+cDP9kVvJXf81tHuB4ls /dv4E9b5JuchpGAu05JXd9n48VU+0khgBhH0I343mw85AltTiK9792pZy9h+XS5SQ9gP WGbNogkPh8Xg8dEbaxPzyiwEQkKmQoiJ7TuOGqF79yYxYq5arW0cuYa8RI4kUjeOJS9k Bo21SwsBHYRwaOkDEMwxgS24AjPV6Pyo1e03GLmk5zHVJUG62WnE0yNpOXJXzmEGwamF eynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699254146; x=1699858946; 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=wP/TkDWVSVJqvgDwz7D9SOOabbihQTPsWePRhRJgejc=; b=fn4Y82g0WoYaqyKE3LqHf7haA12Ow/YgGRtqwF7ckvaw+hOCTpVYelIb4NIlyaB7mx dWUzPzmv3d/7JS/qvukY02UiW/H6iFBy/Tqv2BSfyn8tR6vHDN/Rptx8BsP3B14dajFq m+C3miN/gtYY+wPxhsWb6spyPLejaFA35svgNKbP0RQgnrM9nHg9tVV5FyoCsO55FxNF G5W4qZXLcyPM1/FfXtD9gVwRQ+MU8n3ErsPxIhDBWJ4slaElgfXty82ocY6ixNt/bA5b yGggztvxbLxREBx/Gn7tplyzDWAC+BMLV+FJoiVnfTG9QkBu0gF6KfULnNAKN2huRFs/ Xujw== X-Gm-Message-State: AOJu0YyLu4jpVL4qhRgBQLa+AFc+++iZVg9A8QrP8qYGkpQIB36R47nh +FCaRvsf64BBQGy+nR20j91ex48/RYdAp/SUOGg= X-Received: by 2002:a17:90a:1a03:b0:280:f4a:86b4 with SMTP id 3-20020a17090a1a0300b002800f4a86b4mr21644502pjk.17.1699254146537; Sun, 05 Nov 2023 23:02:26 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 8-20020a17090a194800b0027d88387287sm5319650pjh.51.2023.11.05.23.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:02:26 -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 67/71] system: Constify VMState Date: Sun, 5 Nov 2023 22:58:23 -0800 Message-Id: <20231106065827.543129-68-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::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- system/cpu-timers.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/system/cpu-timers.c b/system/cpu-timers.c index 7452d97b67..bdf3a41dcb 100644 --- a/system/cpu-timers.c +++ b/system/cpu-timers.c @@ -165,7 +165,7 @@ static const VMStateDescription icount_vmstate_warp_timer = { .version_id = 1, .minimum_version_id = 1, .needed = warp_timer_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT64(vm_clock_warp_start, TimersState), VMSTATE_TIMER_PTR(icount_warp_timer, TimersState), VMSTATE_END_OF_LIST() @@ -177,7 +177,7 @@ static const VMStateDescription icount_vmstate_adjust_timers = { .version_id = 1, .minimum_version_id = 1, .needed = adjust_timers_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_TIMER_PTR(icount_rt_timer, TimersState), VMSTATE_TIMER_PTR(icount_vm_timer, TimersState), VMSTATE_END_OF_LIST() @@ -189,7 +189,7 @@ static const VMStateDescription icount_vmstate_shift = { .version_id = 2, .minimum_version_id = 2, .needed = icount_shift_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT16(icount_time_shift, TimersState), VMSTATE_INT64(last_delta, TimersState), VMSTATE_END_OF_LIST() @@ -204,12 +204,12 @@ static const VMStateDescription icount_vmstate_timers = { .version_id = 1, .minimum_version_id = 1, .needed = icount_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT64(qemu_icount_bias, TimersState), VMSTATE_INT64(qemu_icount, TimersState), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &icount_vmstate_warp_timer, &icount_vmstate_adjust_timers, &icount_vmstate_shift, @@ -221,13 +221,13 @@ static const VMStateDescription vmstate_timers = { .name = "timer", .version_id = 2, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT64(cpu_ticks_offset, TimersState), VMSTATE_UNUSED(8), VMSTATE_INT64_V(cpu_clock_offset, TimersState, 2), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &icount_vmstate_timers, NULL }