From patchwork Thu Dec 21 03:16:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756970 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp687815wrw; Wed, 20 Dec 2023 19:26:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPvpE5QYnFL+DCrEdT0lAGvUzAoYDXyS1fl8/RoZuxbqAVHT9dRrA8BpWo6M3jzWAbLmYN X-Received: by 2002:a05:622a:138b:b0:425:4043:5f27 with SMTP id o11-20020a05622a138b00b0042540435f27mr30254293qtk.101.1703129162214; Wed, 20 Dec 2023 19:26:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129162; cv=none; d=google.com; s=arc-20160816; b=P+CXGVrT/n9lOnQZPJCbD9nF4f78QVBVJHNVMqyLA1qgvlU/zdP/gx1cffsm3374rf iunlraec8pqqc7b8SHeEbTWDVsjEAz1xQ++yRXQmicBO6OBcwqSIQ+cDSzQjF2Uvwpdk ybz3n5unwaQ/IBt/h6d6WqsBhow/YD/AJlG4QmSg2jN+X0fbZQSnMbBblghuUH1IX9Oy vLJG2yPgiA6w9VE7LM4BwLXqO/J17DLeZ2uWHYgbGnSFTCCF9SF2AOXIUTNUKGLUiRjq tDnzU3dqqGhdyvKcaNGtfSmIoFv+ZwKaTl07KitVg7Sz1SI5gusKfhbRJClyIJzrbjfi ibjg== 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=UFDIv+0B5QiSwQn+3TIbVlZCmdkEBrIDhqvxZY7o6rY=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=tEO3TTwzOqgOTj5Hx+/nogryZrKcdg/3p7kdPbY7aU/4u6dQIGKTgpPKEhyVWXtCxL bfTbkQeUsPB4fMUqD2ey7zTR0Gvs1vbuLPL3C97lCeHADxF6blaE/YrKcgJ6mwYFO657 jm2nWLSk9tpV5h1n693zOobiRYe52XUTpI22CzoR5Bpvn2DjVoA7soy9zmoe6Kw58JhJ fWM1YZAhd+uODLvcmGerg8yNmd+DmQhwVaJjIxWAhcqoVNnpPEDbWQFkOEnx0ZSKEyYJ 4Fu1jAyq2sFGcK94X0J07WPQ6HgXDaLICNsDD1NdUgwUB/821b8JFZ49I4tvkiDIt2XU vbKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lpyc5k9B; 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 d17-20020a05622a05d100b004277e98868fsi1228968qtb.210.2023.12.20.19.26.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:26:02 -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=lpyc5k9B; 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 1rG9fi-00021I-91; Wed, 20 Dec 2023 22:24:32 -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 1rG9fO-0001Xg-Bb for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:10 -0500 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9fM-0000qC-MZ for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:10 -0500 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-67aa9a99915so2182286d6.3 for ; Wed, 20 Dec 2023 19:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703129047; x=1703733847; 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=UFDIv+0B5QiSwQn+3TIbVlZCmdkEBrIDhqvxZY7o6rY=; b=lpyc5k9BOPbviixaFmXDhjRiko/Taxv4pPoM1LmDrLryWOd4ewNHEJKpkRlmfbs4vF 3C48WAQ1KCk6PL/LTgYsyIdmpqLOQ22PA7QrsrhI01G9M/pKaPQ5GbeLCPsAui41v8OB IZuzm2a43Pl5D1tuCLGM+zeP4tstgQtLmtns6OO1IhgayjJzWa6mTbSvhWZNsrkEwDCK nE9ldlvXk4x4aUny7O5EQDb34LfeV6VYZ5Oz1FObwGfhQ4309IqHl9j9ubLxEBBhMIb8 WRDCbZ8u8+aHyUF6VB99n+dlcBLPj37vv419p7ESub7eOXnqNd/UY/93ljCz/uAN997R VRMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703129047; x=1703733847; 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=UFDIv+0B5QiSwQn+3TIbVlZCmdkEBrIDhqvxZY7o6rY=; b=XT7UYfV2SqLZW1O3wIo8Vnk4v9dEAo0Bo0BM7wZjhHsRjUkc302vfsTr0BBPN6eTY6 zXSVGxQZoILp5GGsWBWM6jpLnrNeQS+6iVod7HA9rTnwYaSTw0MSoEtsQ0hL3HB1dQ95 Y7JuZxokiPYURepCEEZdw7KllOsBDyI4LlXNljBkl1u+h9hlojU/0tw6Zgjz+rlc74mI qo8rm9Cy8TVkl/GPtOAz7HXuzDq7ueYB8Euino45HB8umpv8ed+hYv5EnaWHpmGkezvW veupdsKctiYDSjNVPsLChCiPg50vVUAPyd8zWfnrS7Tm58RuxmPFcSD4tvZHQ9gxcgqx zyCA== X-Gm-Message-State: AOJu0YyGuZaVe8PZz7/9JV2Zuhe5bfWLdH1ohxGZ83JRQKfHqVWqq70O 0CQdRHFxNnXAxFysmKq/SQFKgIyNucg6BFgO/mhtB5G9 X-Received: by 2002:ad4:574c:0:b0:67f:d89:8f1e with SMTP id q12-20020ad4574c000000b0067f0d898f1emr16487867qvx.87.1703129047711; Wed, 20 Dec 2023 19:24:07 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id l16-20020ad44d10000000b0067f7b6318b9sm347257qvl.10.2023.12.20.19.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:24:07 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 59/71] hw/vfio: Constify VMState Date: Thu, 21 Dec 2023 14:16:40 +1100 Message-Id: <20231221031652.119827-60-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221031652.119827-1-richard.henderson@linaro.org> References: <20231221031652.119827-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf29.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: Cédric Le Goater --- hw/vfio/display.c | 2 +- hw/vfio/pci.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/vfio/display.c b/hw/vfio/display.c index 7a10fa8604..1aa440c663 100644 --- a/hw/vfio/display.c +++ b/hw/vfio/display.c @@ -560,7 +560,7 @@ const VMStateDescription vfio_display_vmstate = { .version_id = 1, .minimum_version_id = 1, .needed = migrate_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT_POINTER(ramfb, VFIODisplay, ramfb_vmstate, RAMFBState), VMSTATE_END_OF_LIST(), } diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 1874ec1aba..9f838978be 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2561,7 +2561,7 @@ const VMStateDescription vmstate_vfio_display = { .version_id = 1, .minimum_version_id = 1, .needed = vfio_display_migration_needed, - .fields = (VMStateField[]){ + .fields = (const VMStateField[]){ VMSTATE_STRUCT_POINTER(dpy, VFIOPCIDevice, vfio_display_vmstate, VFIODisplay), VMSTATE_END_OF_LIST() @@ -2572,12 +2572,12 @@ const VMStateDescription vmstate_vfio_pci_config = { .name = "VFIOPCIDevice", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(pdev, VFIOPCIDevice), VMSTATE_MSIX_TEST(pdev, VFIOPCIDevice, vfio_msix_present), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &vmstate_vfio_display, NULL }