From nobody Tue Nov 26 22:32:19 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=1703885303; cv=none; d=zohomail.com; s=zohoarc; b=JQUMfGZEcE1QcdzNOso+XLfh8nVsQv/anRQJ6oQIzZWyB5jvAlZ9np5dOvQd9pkT2MzWweSQvNZW1jcHUJAPIBIvzTDcez6kkIlxc62BDR/52ug240FdTWzt9Xu9QXAXhoFxq1Qm6W5doGrDXpFvLPAeYXYihG3tSJv2W97pklM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703885303; h=Content-Transfer-Encoding:Cc:Cc: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; bh=wia1mwDSmhvHBc7XK8M+uSpbG5o3R0nD6ejibX0WzAE=; b=giN9UHs9kwfwt66p7h6tEDYZAhH9y6DgAIMwwYOC/mDjpspJJcRsfPfRwg6VPXTZciGyTx3IjjFgO7oBheyg75JnotDzE1P2B27TMg+kMC5yzQpKy+4Hd4awcEqcAw6EWJhPpxYfdhCWhRf85o8DdbFwwab3CqF0X7gZ9kTygkU= 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 17038853035611006.5532289162088; Fri, 29 Dec 2023 13:28:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJKLw-0000U2-0g; Fri, 29 Dec 2023 16:25:12 -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 1rJKLt-0000Bw-H9 for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:25:09 -0500 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKLr-0007Vy-9J for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:25:09 -0500 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-35fb96f3404so39393165ab.2 for ; Fri, 29 Dec 2023 13:25:06 -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.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885106; x=1704489906; 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=wia1mwDSmhvHBc7XK8M+uSpbG5o3R0nD6ejibX0WzAE=; b=ZZ62eRgUm0vTsK1pJZF8eaS4j+I4HCQPSCumTb6kBcuNfAAX3bZr928TCHi5IMZNfN RCCqdNv4YL36a6fz2bcKmVEh1pZWdNtHTich7L965arfx7ZGP39l05sPucN1iXpJYfU0 YwDyI5eXLTGTDjs/GmoXCjpuVpfgA9NUGXHOZGzLE/zDyua1KLP5PboeErCSfAQr6hRY lCBIFCs8+HLpTdguWPWFaOGspvjxPzAlbn4iGvCVgBzQm/ec7VyeoGj87MB/Zc6Yx4hD z+6uMf8lThenalJS2KEhXyztMo6AsX9eSyYr+QrpwQ0PkSjOGyg7ThRFUOf6UnHtSK86 qNfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885106; x=1704489906; 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=wia1mwDSmhvHBc7XK8M+uSpbG5o3R0nD6ejibX0WzAE=; b=Ol4KgqG3bAEAUFHso9RS86l18uXTd3TMms23e1zwku0ovGdLW2EN5xphLW/tEsftsx Ux6NkZEm1ndFGtJJG85KI2voce2EI3lFweD4FZy4Z6soTcr7fla2/jI8Egc/3iu7CVdp fCmtnyU4LK8Rw8VNXOCJzXqmBELzy2BiTdKj5x6N08k4lC3lgAOG9n3/yhhF1vuJEKgq p/dc2Xx7h/WraTB7Y38M2ENhIH1hOGnaIKJVkzd+FOK5nrU/Z7DQCEzAVpg3zxY+/n59 FkGsbZQmm1SF/PNFMQETbzHcHf0Jv+T4cI2iVUr3c9RAcNow8WPHKP6AqlAkTwySQ3wV ETtw== X-Gm-Message-State: AOJu0Yylm6uDuBiyUHGnM91BnWmg+96tGQZjGXTCVXCvVahRBR9boENk doLy/a9oDozK34MHz0cb6JJ4nQMt+4K073xYfneG3YtObMK8Yg== X-Google-Smtp-Source: AGHT+IGmZTqtRYuznCgsykxdrib7SXxotSBydE0RUC270ce5Z2FFf+wdQkywT+sEszJt7SS75Haxqg== X-Received: by 2002:a05:6e02:180e:b0:35f:e1c5:b13c with SMTP id a14-20020a056e02180e00b0035fe1c5b13cmr22522749ilv.45.1703885106028; Fri, 29 Dec 2023 13:25:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 31/71] hw/i386: Constify VMState Date: Sat, 30 Dec 2023 08:23:06 +1100 Message-Id: <20231229212346.147149-32-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 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::133; envelope-from=richard.henderson@linaro.org; helo=mail-il1-x133.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: 1703885304263100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Zhao Liu Message-Id: <20231221031652.119827-32-richard.henderson@linaro.org> --- hw/i386/acpi-build.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/clock.c | 6 +++--- hw/i386/kvm/xen_evtchn.c | 4 ++-- hw/i386/kvm/xen_gnttab.c | 2 +- hw/i386/kvm/xen_overlay.c | 2 +- hw/i386/kvm/xen_xenstore.c | 2 +- hw/i386/kvmvapic.c | 6 +++--- hw/i386/port92.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/i386/xen/xen_platform.c | 2 +- hw/i386/xen/xen_pvdevice.c | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 80db183b78..edc979379c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2770,7 +2770,7 @@ static const VMStateDescription vmstate_acpi_build = =3D { .name =3D "acpi_build", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(patched, AcpiBuildState), VMSTATE_END_OF_LIST() }, diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 5085a6fee3..ed5677c0ae 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3289,7 +3289,7 @@ static const VMStateDescription vtd_vmstate =3D { .minimum_version_id =3D 1, .priority =3D MIG_PRI_IOMMU, .post_load =3D vtd_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(root, IntelIOMMUState), VMSTATE_UINT64(intr_root, IntelIOMMUState), VMSTATE_UINT64(iq, IntelIOMMUState), diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index e756b0aa43..40aa9a32c3 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -245,7 +245,7 @@ static const VMStateDescription kvmclock_reliable_get_c= lock =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D kvmclock_clock_is_reliable_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(clock_is_reliable, KVMClockState), VMSTATE_END_OF_LIST() } @@ -295,11 +295,11 @@ static const VMStateDescription kvmclock_vmsd =3D { .minimum_version_id =3D 1, .pre_load =3D kvmclock_pre_load, .pre_save =3D kvmclock_pre_save, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(clock, KVMClockState), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription * []) { + .subsections =3D (const VMStateDescription * const []) { &kvmclock_reliable_get_clock, NULL } diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index 02b8cbf8df..9a5f3caa24 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -240,7 +240,7 @@ static const VMStateDescription xen_evtchn_port_vmstate= =3D { .name =3D "xen_evtchn_port", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(vcpu, XenEvtchnPort), VMSTATE_UINT16(type, XenEvtchnPort), VMSTATE_UINT16(u.val, XenEvtchnPort), @@ -255,7 +255,7 @@ static const VMStateDescription xen_evtchn_vmstate =3D { .needed =3D xen_evtchn_is_needed, .pre_load =3D xen_evtchn_pre_load, .post_load =3D xen_evtchn_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(callback_param, XenEvtchnState), VMSTATE_UINT32(nr_ports, XenEvtchnState), VMSTATE_STRUCT_VARRAY_UINT32(port_table, XenEvtchnState, nr_ports,= 1, diff --git a/hw/i386/kvm/xen_gnttab.c b/hw/i386/kvm/xen_gnttab.c index 0a24f53f20..a0cc30f619 100644 --- a/hw/i386/kvm/xen_gnttab.c +++ b/hw/i386/kvm/xen_gnttab.c @@ -127,7 +127,7 @@ static const VMStateDescription xen_gnttab_vmstate =3D { .minimum_version_id =3D 1, .needed =3D xen_gnttab_is_needed, .post_load =3D xen_gnttab_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(nr_frames, XenGnttabState), VMSTATE_VARRAY_UINT32(gnt_frame_gpas, XenGnttabState, nr_frames, 0, vmstate_info_uint64, uint64_t), diff --git a/hw/i386/kvm/xen_overlay.c b/hw/i386/kvm/xen_overlay.c index 39fda1b72c..526f7a6077 100644 --- a/hw/i386/kvm/xen_overlay.c +++ b/hw/i386/kvm/xen_overlay.c @@ -139,7 +139,7 @@ static const VMStateDescription xen_overlay_vmstate =3D= { .needed =3D xen_overlay_is_needed, .pre_save =3D xen_overlay_pre_save, .post_load =3D xen_overlay_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(shinfo_gpa, XenOverlayState), VMSTATE_BOOL(long_mode, XenOverlayState), VMSTATE_END_OF_LIST() diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c index 6e651960b3..c3633f7829 100644 --- a/hw/i386/kvm/xen_xenstore.c +++ b/hw/i386/kvm/xen_xenstore.c @@ -243,7 +243,7 @@ static const VMStateDescription xen_xenstore_vmstate = =3D { .needed =3D xen_xenstore_is_needed, .pre_save =3D xen_xenstore_pre_save, .post_load =3D xen_xenstore_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY(req_data, XenXenstoreState, sizeof_field(XenXenstoreState, req_data)), VMSTATE_UINT8_ARRAY(rsp_data, XenXenstoreState, diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 43f8a8f679..f2b0aff479 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -802,7 +802,7 @@ static const VMStateDescription vmstate_handlers =3D { .name =3D "kvmvapic-handlers", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(set_tpr, VAPICHandlers), VMSTATE_UINT32(set_tpr_eax, VAPICHandlers), VMSTATE_UINT32_ARRAY(get_tpr, VAPICHandlers, 8), @@ -815,7 +815,7 @@ static const VMStateDescription vmstate_guest_rom =3D { .name =3D "kvmvapic-guest-rom", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UNUSED(8), /* signature */ VMSTATE_UINT32(vaddr, GuestROMState), VMSTATE_UINT32(fixup_start, GuestROMState), @@ -835,7 +835,7 @@ static const VMStateDescription vmstate_vapic =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D vapic_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(rom_state, VAPICROMState, 0, vmstate_guest_rom, GuestROMState), VMSTATE_UINT32(state, VAPICROMState), diff --git a/hw/i386/port92.c b/hw/i386/port92.c index e1379a4f98..1070bfbf36 100644 --- a/hw/i386/port92.c +++ b/hw/i386/port92.c @@ -54,7 +54,7 @@ static const VMStateDescription vmstate_port92_isa =3D { .name =3D "port92", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(outport, Port92State), VMSTATE_END_OF_LIST() } diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index 91320afa2f..a8d014d09a 100644 --- a/hw/i386/vmmouse.c +++ b/hw/i386/vmmouse.c @@ -277,7 +277,7 @@ static const VMStateDescription vmstate_vmmouse =3D { .version_id =3D 0, .minimum_version_id =3D 0, .post_load =3D vmmouse_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32_EQUAL(queue_size, VMMouseState, NULL), VMSTATE_UINT32_ARRAY(queue, VMMouseState, VMMOUSE_QUEUE_SIZE), VMSTATE_UINT16(nb_queue, VMMouseState), diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index ef7d3fc05f..708488af32 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -537,7 +537,7 @@ static const VMStateDescription vmstate_xen_platform = =3D { .version_id =3D 4, .minimum_version_id =3D 4, .post_load =3D xen_platform_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIXenPlatformState), VMSTATE_UINT8(flags, PCIXenPlatformState), VMSTATE_END_OF_LIST() diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c index e62e06622b..ed621531d8 100644 --- a/hw/i386/xen/xen_pvdevice.c +++ b/hw/i386/xen/xen_pvdevice.c @@ -77,7 +77,7 @@ static const VMStateDescription vmstate_xen_pvdevice =3D { .name =3D "xen-pvdevice", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, XenPVDevice), VMSTATE_END_OF_LIST() } --=20 2.34.1