From nobody Tue Nov 26 22:37:27 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=1703885401; cv=none; d=zohomail.com; s=zohoarc; b=ggYAgV31U48it7TtTmDx3dkuwlCJivJB74qfQGDLT79fa6U7HJNdNBZrpIwcmttprZXk3wOdNnFqDXsyCB5+pTqwZkiojyYdhnT4PxV59TpUk7ewIMN/7L/mhGjI128uzndzIc7eCmnLIoIgimwx5YHLSyOreQHYBEMd4AFkVdQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703885401; 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=DOvF0AY7fePCXN1tebEvp8pAm4Tzy5l1IurRZ4G7S50=; b=mRYZSLiULMd6w2BGSVQB83Jxcdni74s4n/1jYj/XU5wf8B10tgDG6aHRmM3QLokkv8BRFNog9GK9JaY9K6/f+3rceGnLCCUjTGSX2164kikm5ARExlcfaUBSvpvVJkBGk18QHtit6fSIn2juS8KJ8oJijUo6L8JTtboB0rix3mk= 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 1703885401580294.2323951275298; Fri, 29 Dec 2023 13:30:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJKLY-0007My-M9; Fri, 29 Dec 2023 16:24:48 -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 1rJKLX-0007KG-ME for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:47 -0500 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKLV-0006wW-Im for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:47 -0500 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-204fdd685fdso1195753fac.2 for ; Fri, 29 Dec 2023 13:24:45 -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.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:24:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885084; x=1704489884; 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=DOvF0AY7fePCXN1tebEvp8pAm4Tzy5l1IurRZ4G7S50=; b=eWAN8nYnA20J0T9XM41axANm8UuSAMqF/qdNqRPSgIZEmojg2X1nToKaOL2o2cXLK5 162LqkSJxcYk/Lbk2yJLRYZt//rMobDKVTN8Fe3qeUjSeXQNoWLM8BhlrfqfWMBAik/B pAWPDtD+x38HvZeeoNM87gwkmOsd9Hon3AGMe4FrYH4YHZu0/AcecfWPlY0lgIs7cdhX UvfpksQGtok26SxXx6dCuvwxKMVhe/xO5G98U2odMADQLtbse2iKi2vZ327g73h8jvxh +bslHfa8vaFFWfLRR4+h+ExXqYRAeiW6pJQSLRF21xlmBBqbH83HLSAotzUamzhVBW9c x6lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885084; x=1704489884; 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=DOvF0AY7fePCXN1tebEvp8pAm4Tzy5l1IurRZ4G7S50=; b=IZSOssp8L+IETWMZ5saCTlamj+uHyZRUhoDENC617RJ+5kZtIPSBqFHWIkmOM5Rbh5 +bxXpp4yzi54gq+DkQH0AhAd9OwCZPnE0O2oMoRXwve2uIqYRQTnDXRYCBleKggKwCfJ C7ZOCGp6TTsZPKn+dx0CZkFKiP2L47Y1aICBSU3gGhW5+MDUPQ741YRotH4bW7Bho2Ta rDTfje+u6nWkvAT/wRL8JPI0/zGzDHjUonbtwzvmAho8g5nRgFFFOuBjzKzYjBemkCrI FLlpAJywpHuDxSamlQUgljfMGnJOVpx0rK9HNWN8Yqt860E4ci62fAr20dKP3O92wpob fSQw== X-Gm-Message-State: AOJu0YyVRScj/mNakeHP0iKQgx6hjhMSfpglHI5NWRcdsyG5Yga8deTJ 5+QjTQurNKkatzwR7/NCjuHAySR+Ogvab4HelUyJFmoXS+McAg== X-Google-Smtp-Source: AGHT+IFkVhAFfpP+NGG0u6RRrQiNkqnDOfnfxgS2ZDrsVMxCPF155m7D0TSgoWOqmMSDcjVXFe3qNQ== X-Received: by 2002:a05:6870:c0cf:b0:1fb:75c:3ff0 with SMTP id e15-20020a056870c0cf00b001fb075c3ff0mr14672724oad.80.1703885084153; Fri, 29 Dec 2023 13:24:44 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 21/71] hw/acpi: Constify VMState Date: Sat, 30 Dec 2023 08:22:56 +1100 Message-Id: <20231229212346.147149-22-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=2001:4860:4864:20::33; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x33.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: 1703885402534100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Message-Id: <20231221031652.119827-22-richard.henderson@linaro.org> --- hw/acpi/cpu.c | 4 ++-- hw/acpi/erst.c | 2 +- hw/acpi/generic_event_device.c | 12 ++++++------ hw/acpi/ich9.c | 12 ++++++------ hw/acpi/ich9_tco.c | 2 +- hw/acpi/memory_hotplug.c | 4 ++-- hw/acpi/pcihp.c | 2 +- hw/acpi/piix4.c | 12 ++++++------ hw/acpi/vmgenid.c | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 011d2c6c2d..2d81c1e790 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -297,7 +297,7 @@ static const VMStateDescription vmstate_cpuhp_sts =3D { .name =3D "CPU hotplug device state", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(is_inserting, AcpiCpuStatus), VMSTATE_BOOL(is_removing, AcpiCpuStatus), VMSTATE_UINT32(ost_event, AcpiCpuStatus), @@ -310,7 +310,7 @@ const VMStateDescription vmstate_cpu_hotplug =3D { .name =3D "CPU hotplug state", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(selector, CPUHotplugState), VMSTATE_UINT8(command, CPUHotplugState), VMSTATE_STRUCT_VARRAY_POINTER_UINT32(devs, CPUHotplugState, dev_co= unt, diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index ba751dc60e..b2f1b13630 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -932,7 +932,7 @@ static const VMStateDescription erst_vmstate =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D erst_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(operation, ERSTDeviceState), VMSTATE_UINT8(busy_status, ERSTDeviceState), VMSTATE_UINT8(command_status, ERSTDeviceState), diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index a3d31631fe..2d6e91b124 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -312,7 +312,7 @@ static const VMStateDescription vmstate_memhp_state =3D= { .name =3D "acpi-ged/memhp", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(memhp_state, AcpiGedState), VMSTATE_END_OF_LIST() } @@ -322,7 +322,7 @@ static const VMStateDescription vmstate_ged_state =3D { .name =3D "acpi-ged-state", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(sel, GEDState), VMSTATE_END_OF_LIST() } @@ -332,7 +332,7 @@ static const VMStateDescription vmstate_ghes =3D { .name =3D "acpi-ghes", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT64(ghes_addr_le, AcpiGhesState), VMSTATE_END_OF_LIST() }, @@ -349,7 +349,7 @@ static const VMStateDescription vmstate_ghes_state =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D ghes_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(ghes_state, AcpiGedState, 1, vmstate_ghes, AcpiGhesState), VMSTATE_END_OF_LIST() @@ -360,11 +360,11 @@ static const VMStateDescription vmstate_acpi_ged =3D { .name =3D "acpi-ged", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(ged_state, AcpiGedState, 1, vmstate_ged_state, GEDS= tate), VMSTATE_END_OF_LIST(), }, - .subsections =3D (const VMStateDescription * []) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_memhp_state, &vmstate_ghes_state, NULL diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 25e2c7243e..573d032e8e 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -164,7 +164,7 @@ static const VMStateDescription vmstate_memhp_state =3D= { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vmstate_test_use_memhp, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() } @@ -181,7 +181,7 @@ static const VMStateDescription vmstate_tco_io_state = =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vmstate_test_use_tco, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(tco_regs, ICH9LPCPMRegs, 1, vmstate_tco_io_sts, TCOIORegs), VMSTATE_END_OF_LIST() @@ -208,7 +208,7 @@ static const VMStateDescription vmstate_cpuhp_state =3D= { .minimum_version_id =3D 1, .needed =3D vmstate_test_use_cpuhp, .pre_load =3D vmstate_cpuhp_pre_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_CPU_HOTPLUG(cpuhp_state, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() } @@ -226,7 +226,7 @@ static const VMStateDescription vmstate_pcihp_state =3D= { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vmstate_test_use_pcihp, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_HOTPLUG(acpi_pci_hotplug, ICH9LPCPMRegs, NULL, NULL), @@ -239,7 +239,7 @@ const VMStateDescription vmstate_ich9_pm =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D ich9_pm_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT16(acpi_regs.pm1.evt.sts, ICH9LPCPMRegs), VMSTATE_UINT16(acpi_regs.pm1.evt.en, ICH9LPCPMRegs), VMSTATE_UINT16(acpi_regs.pm1.cnt.cnt, ICH9LPCPMRegs), @@ -251,7 +251,7 @@ const VMStateDescription vmstate_ich9_pm =3D { VMSTATE_UINT32(smi_sts, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_memhp_state, &vmstate_tco_io_state, &vmstate_cpuhp_state, diff --git a/hw/acpi/ich9_tco.c b/hw/acpi/ich9_tco.c index 1540f4fd46..81606219f7 100644 --- a/hw/acpi/ich9_tco.c +++ b/hw/acpi/ich9_tco.c @@ -254,7 +254,7 @@ const VMStateDescription vmstate_tco_io_sts =3D { .name =3D "tco io device status", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT16(tco.rld, TCOIORegs), VMSTATE_UINT8(tco.din, TCOIORegs), VMSTATE_UINT8(tco.dout, TCOIORegs), diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index 0b883df813..de6f974ebb 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -317,7 +317,7 @@ static const VMStateDescription vmstate_memhp_sts =3D { .name =3D "memory hotplug device state", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(is_enabled, MemStatus), VMSTATE_BOOL(is_inserting, MemStatus), VMSTATE_UINT32(ost_event, MemStatus), @@ -330,7 +330,7 @@ const VMStateDescription vmstate_memory_hotplug =3D { .name =3D "memory hotplug state", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(selector, MemHotplugState), VMSTATE_STRUCT_VARRAY_POINTER_UINT32(devs, MemHotplugState, dev_co= unt, vmstate_memhp_sts, MemStatus), diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 4f75c873e2..5f79c9016b 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -517,7 +517,7 @@ const VMStateDescription vmstate_acpi_pcihp_pci_status = =3D { .name =3D "acpi_pcihp_pci_status", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(up, AcpiPciHpPciStatus), VMSTATE_UINT32(down, AcpiPciHpPciStatus), VMSTATE_END_OF_LIST() diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index dd523d2e4c..debe1adb84 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -147,7 +147,7 @@ static const VMStateDescription vmstate_gpe =3D { .name =3D "gpe", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_GPE_ARRAY(sts, ACPIGPE), VMSTATE_GPE_ARRAY(en, ACPIGPE), VMSTATE_END_OF_LIST() @@ -158,7 +158,7 @@ static const VMStateDescription vmstate_pci_status =3D { .name =3D "pci_status", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(up, struct AcpiPciHpPciStatus), VMSTATE_UINT32(down, struct AcpiPciHpPciStatus), VMSTATE_END_OF_LIST() @@ -189,7 +189,7 @@ static const VMStateDescription vmstate_memhp_state =3D= { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D vmstate_test_use_memhp, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, PIIX4PMState), VMSTATE_END_OF_LIST() } @@ -214,7 +214,7 @@ static const VMStateDescription vmstate_cpuhp_state =3D= { .minimum_version_id =3D 1, .needed =3D vmstate_test_use_cpuhp, .pre_load =3D vmstate_cpuhp_pre_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_CPU_HOTPLUG(cpuhp_state, PIIX4PMState), VMSTATE_END_OF_LIST() } @@ -247,7 +247,7 @@ static const VMStateDescription vmstate_acpi =3D { .version_id =3D 3, .minimum_version_id =3D 3, .post_load =3D vmstate_acpi_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState), VMSTATE_UINT16(ar.pm1.evt.sts, PIIX4PMState), VMSTATE_UINT16(ar.pm1.evt.en, PIIX4PMState), @@ -269,7 +269,7 @@ static const VMStateDescription vmstate_acpi =3D { vmstate_test_migrate_acpi_index), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_memhp_state, &vmstate_cpuhp_state, NULL diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c index a39315c1b3..e63c8af4c3 100644 --- a/hw/acpi/vmgenid.c +++ b/hw/acpi/vmgenid.c @@ -178,7 +178,7 @@ static const VMStateDescription vmstate_vmgenid =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D vmgenid_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY(vmgenid_addr_le, VmGenIdState, sizeof(uint64_t= )), VMSTATE_END_OF_LIST() }, --=20 2.34.1