From patchwork Mon Nov 6 06:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741277 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp948746wrr; Sun, 5 Nov 2023 23:10:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IErJLrQzwUkq3mLKqZ2enMyqCQ9KXZRNoJO/McthiWE4mXABIkqxO0EhZIVoDmPr+FJIbDW X-Received: by 2002:a67:b042:0:b0:452:94a4:9c59 with SMTP id q2-20020a67b042000000b0045294a49c59mr18147422vsh.10.1699254617453; Sun, 05 Nov 2023 23:10:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254617; cv=none; d=google.com; s=arc-20160816; b=jLOd1ZvVKNfasS4YUcCKGOaO2PhMN1jwGNI8W9k10axEwnQMmenMRFW7kCm8gGQAIp TwmGVIWaWnZo6HMJXr5YpaK1t5/lb0P+gdOB31l6me9VtVklVosJMqvhQJiQywTnu7zQ T4iwoT/kDVzrtyQf8vQ3VqF5ymYRKVHNewlJKnTvJhQ5VMS4bW7IUdENrA50ZnuefoZC poYsxFjiqcwVmWiQpVUg68tKpY2QG2Zc8IdwyFiGlTdH+feLoZNPHe3kk2/9Y6Ua1X0t 3I78SVellZfMk10MOPeeW5kGzO3uVK8G3ctd4ehN+Zk4n4kdr2PAepMBoE7DOFichewa Y+HQ== 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=zTfc4X0+Myi8VwONAnHbzo7jD2I4ophlWbNZWjt4wb0=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=oltcbM4czm7jdZostM9HBRbL68rKZNtHzHW+Relckf2KFd+2RWl53K7VyVm+x+1PY0 /xy/kIsFk/bf/iSr6dVC1MiN38ZmvWXX7hv9K3ZcyG6rWpQpFZ4kMv035rkghppYlRHu XZskgPVprey0i43uTkeJoONswPfhhnVx9R0LCJyj6pJgrPQKvdYig4A4kKtrz+Ikg/FO aWgneEbJoehCx24Rw1D6w5g8s1sILGKfe7UJBwLMZ3I0MsOw0jnAlXqBG8AG6F/J/+gw 3r0uHQF/+4Wf1AXMSkvAcvbN2YODtWoNLHMsePMhLegvXIjiyNIgPECmFBkHQyyTLjZp p4GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PEtGAymO; 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 d4-20020ac85ac4000000b004180054f084si4986157qtd.74.2023.11.05.23.10.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:10:17 -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=PEtGAymO; 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 1qztdp-0002P6-1p; Mon, 06 Nov 2023 02:03:21 -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 1qztd1-0000cP-4o for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:32 -0500 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztch-0001zI-GC for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:25 -0500 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2802d218242so4015451a91.1 for ; Sun, 05 Nov 2023 23:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699254130; x=1699858930; 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=zTfc4X0+Myi8VwONAnHbzo7jD2I4ophlWbNZWjt4wb0=; b=PEtGAymOWF6KPkdnN++ppaVgm7/KhpvBAxdm8HvL7O2rBjHyrkg7uuhm3yxg2CLvmd xz4qn9ftW+B71sC04p11B3nXwfBDaw77Beyv5dg5vsWAx7fLg4YG6MdfuVQ4mhEqX1PN 5G56/vfQxtRFedj7oXJ447AgwdT2Xu37BcvuVaTQY/3R3lmAqzkiHNZeHuwx5IoWLqJv VOoJME/yMPpQv4DWMlYbesWR5niWZkjikpQhlAJm/eN2mDbK+jU52o15J/8rmSHLzyd0 FS8U9w3eMfgW7/u3odDKucOtW2R1/kPtpkxPhjDdU/q2EuJEDqvMFLyuUT0yVjJDp26T stlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699254130; x=1699858930; 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=zTfc4X0+Myi8VwONAnHbzo7jD2I4ophlWbNZWjt4wb0=; b=YhXJBIIPqinrWM85QU1tC7wBUKqzVFgBM6i6t2OIC40mXIp1tsl7257C7zCLZ2bwTI PUVlNG1jLsp5kMBS3xEQn/AmYNUZTmznmx51iTdFiFp6y4+JVZaeSAEf6b+8lty9+cU2 ELu4M2WmF4Jus/pOepyxmNIbHSrb333AjBqymPWOQpaf6YHzC3c9t/fZd77443RKqZoY ATf9uib5/vN2EgRZpt4cf/IQGcp+i+RqRQLbr8UF2y9Ctvm+9JQyV+kYfEoHVcPQ96Pb FkvuB7VPPpTqzsj3huPV4yWZFQs1AhXs3sD4ysgW8qXnOgLVO42zJZI7gIk5N4yBVb/e MBvQ== X-Gm-Message-State: AOJu0Yw+SWtM3hoU/6n1v0vxH4RiGe08xJZFbQNvtJMJONYmgAAJ+npX HUjxrXsnf0y5Pi1m19e1+GHU1XEDY+jTSs41Hds= X-Received: by 2002:a17:90b:19d0:b0:268:ca76:64a with SMTP id nm16-20020a17090b19d000b00268ca76064amr23683453pjb.49.1699254129880; Sun, 05 Nov 2023 23:02:09 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 8-20020a17090a194800b0027d88387287sm5319650pjh.51.2023.11.05.23.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:02:09 -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 46/71] hw/pci-host: Constify VMState Date: Sun, 5 Nov 2023 22:58:02 -0800 Message-Id: <20231106065827.543129-47-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::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.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é --- hw/pci-host/astro.c | 4 ++-- hw/pci-host/bonito.c | 2 +- hw/pci-host/designware.c | 10 +++++----- hw/pci-host/dino.c | 2 +- hw/pci-host/gpex.c | 2 +- hw/pci-host/gt64120.c | 2 +- hw/pci-host/i440fx.c | 2 +- hw/pci-host/ppce500.c | 6 +++--- hw/pci-host/q35.c | 2 +- hw/pci-host/raven.c | 2 +- hw/pci-host/versatile.c | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c index 4b2d7caf2d..36639a010c 100644 --- a/hw/pci-host/astro.c +++ b/hw/pci-host/astro.c @@ -462,7 +462,7 @@ static const VMStateDescription vmstate_elroy = { .name = "Elroy", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(hpa, ElroyState), VMSTATE_UINT32(pci_bus_num, ElroyState), VMSTATE_UINT64(config_address, ElroyState), @@ -694,7 +694,7 @@ static const VMStateDescription vmstate_astro = { .name = "Astro", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(ioc_ctrl, AstroState), VMSTATE_UINT64(ioc_status_ctrl, AstroState), VMSTATE_UINT64_ARRAY(ioc_ranges, AstroState, (0x03d8 - 0x300) / 8), diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index bab661f3ce..1f0c435348 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -619,7 +619,7 @@ static const VMStateDescription vmstate_bonito = { .name = "Bonito", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCIBonitoState), VMSTATE_END_OF_LIST() } diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c index 6f5442f108..6c191d1e55 100644 --- a/hw/pci-host/designware.c +++ b/hw/pci-host/designware.c @@ -529,7 +529,7 @@ static const VMStateDescription vmstate_designware_pcie_msi_bank = { .name = "designware-pcie-msi-bank", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(enable, DesignwarePCIEMSIBank), VMSTATE_UINT32(mask, DesignwarePCIEMSIBank), VMSTATE_UINT32(status, DesignwarePCIEMSIBank), @@ -541,7 +541,7 @@ static const VMStateDescription vmstate_designware_pcie_msi = { .name = "designware-pcie-msi", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(base, DesignwarePCIEMSI), VMSTATE_STRUCT_ARRAY(intr, DesignwarePCIEMSI, @@ -557,7 +557,7 @@ static const VMStateDescription vmstate_designware_pcie_viewport = { .name = "designware-pcie-viewport", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(base, DesignwarePCIEViewport), VMSTATE_UINT64(target, DesignwarePCIEViewport), VMSTATE_UINT32(limit, DesignwarePCIEViewport), @@ -570,7 +570,7 @@ static const VMStateDescription vmstate_designware_pcie_root = { .name = "designware-pcie-root", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIBridge), VMSTATE_UINT32(atu_viewport, DesignwarePCIERoot), VMSTATE_STRUCT_2DARRAY(viewports, @@ -714,7 +714,7 @@ static const VMStateDescription vmstate_designware_pcie_host = { .name = "designware-pcie-host", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT(root, DesignwarePCIEHost, 1, diff --git a/hw/pci-host/dino.c b/hw/pci-host/dino.c index 82503229fa..1f84ab6147 100644 --- a/hw/pci-host/dino.c +++ b/hw/pci-host/dino.c @@ -287,7 +287,7 @@ static const VMStateDescription vmstate_dino = { .name = "Dino", .version_id = 2, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(iar0, DinoState), VMSTATE_UINT32(iar1, DinoState), VMSTATE_UINT32(imr, DinoState), diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c index a6752fac5e..e117e47fa7 100644 --- a/hw/pci-host/gpex.c +++ b/hw/pci-host/gpex.c @@ -195,7 +195,7 @@ static const VMStateDescription vmstate_gpex_root = { .name = "gpex_root", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, GPEXRootState), VMSTATE_END_OF_LIST() } diff --git a/hw/pci-host/gt64120.c b/hw/pci-host/gt64120.c index 143bf053d7..e02efc9e2e 100644 --- a/hw/pci-host/gt64120.c +++ b/hw/pci-host/gt64120.c @@ -431,7 +431,7 @@ static const VMStateDescription vmstate_gt64120 = { .version_id = 1, .minimum_version_id = 1, .post_load = gt64120_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, GT64120State, GT_REGS), VMSTATE_END_OF_LIST() } diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index 653cc3f149..4f0a0438d7 100644 --- a/hw/pci-host/i440fx.c +++ b/hw/pci-host/i440fx.c @@ -125,7 +125,7 @@ static const VMStateDescription vmstate_i440fx = { .version_id = 3, .minimum_version_id = 3, .post_load = i440fx_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCII440FXState), /* Used to be smm_enabled, which was basically always zero because * SeaBIOS hardly uses SMM. SMRAM is now handled by CPU code. diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 38814247f2..6aeba5e651 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -379,7 +379,7 @@ static const VMStateDescription vmstate_pci_outbound = { .name = "pci_outbound", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(potar, struct pci_outbound), VMSTATE_UINT32(potear, struct pci_outbound), VMSTATE_UINT32(powbar, struct pci_outbound), @@ -392,7 +392,7 @@ static const VMStateDescription vmstate_pci_inbound = { .name = "pci_inbound", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(pitar, struct pci_inbound), VMSTATE_UINT32(piwbar, struct pci_inbound), VMSTATE_UINT32(piwbear, struct pci_inbound), @@ -405,7 +405,7 @@ static const VMStateDescription vmstate_ppce500_pci = { .name = "ppce500_pci", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT_ARRAY(pob, PPCE500PCIState, PPCE500_PCI_NR_POBS, 1, vmstate_pci_outbound, struct pci_outbound), VMSTATE_STRUCT_ARRAY(pib, PPCE500PCIState, PPCE500_PCI_NR_PIBS, 1, diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 08534bc7cc..0d7d4e3f08 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -520,7 +520,7 @@ static const VMStateDescription vmstate_mch = { .version_id = 1, .minimum_version_id = 1, .post_load = mch_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, MCHPCIState), /* Used to be smm_enabled, which was basically always zero because * SeaBIOS hardly uses SMM. SMRAM is now handled by CPU code. diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index 9a11ac4b2b..b51c0ef901 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -379,7 +379,7 @@ static const VMStateDescription vmstate_raven = { .name = "raven", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(dev, RavenPCIState), VMSTATE_END_OF_LIST() }, diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index 60d4e7cd92..0e65deb3f9 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -147,7 +147,7 @@ static const VMStateDescription pci_vpb_vmstate = { .version_id = 1, .minimum_version_id = 1, .post_load = pci_vpb_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32_ARRAY(imap, PCIVPBState, 3), VMSTATE_UINT32_ARRAY(smap, PCIVPBState, 3), VMSTATE_UINT32(selfid, PCIVPBState),