From patchwork Mon Nov 6 06:58:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741263 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp947743wrr; Sun, 5 Nov 2023 23:07:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcAPJHRoJKhY+09Md4vqI7isR4EV7Tap51rD7cK6SLEslVA6HRpuo3Npyf0C/mPVe/ETWc X-Received: by 2002:ac8:5893:0:b0:418:1588:2653 with SMTP id t19-20020ac85893000000b0041815882653mr35548516qta.12.1699254431377; Sun, 05 Nov 2023 23:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254431; cv=none; d=google.com; s=arc-20160816; b=AjHigELRzSG0ir12G9x6eSOfg9Xr17ka+RQxEcn+qdO/ksgGzbXHGskyOZ4SFEGsEQ 8T2P1YrzxbvXYfaFDKXAhFtUt/Sw0zse3xOzekOmACgCIU4+i9STgmXFOTo5OfAScSXk rESLA/1ioIZ1h3qzsfnwQtsCNiwniyUV6AeTe+veWr0zyfBVZMpEDA/s+ucij9e3EDjF MwaCCVro70elDEgRxLF/qY6fnz6kQWgR2UUf0RanQ9hxa0VhzSAJPXztpcLny7J75cP7 cTawO/HNohJfm0pO3P97qQD+VKQ2tUQlQEODrjP/HTXdWUWCUmdwlb1d6T1xIRY9kq6v A1Tw== 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=wER6he+enBklnSNbIQSi4AtnKBowbxVd2VG2BjlXQmQ=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=xeUbsJ41ru8SWclCM0BLxqdUwhmoBgIgOkQylgv1yIRB41Z2jddvpieOlE694AgiW4 gHygWk/DQVvE43QXbofDAgM8ADCiaxbreQi6nbwsN94mput6+qJhR3lOJkeiKPcOnXS9 DYDAdDvtOstbVH2Gg6KTgL1cHD4V14x4wPKyLmStKXnF68WjiuIuJXOHKafZeoBeu2TJ 0xzFmTKFBnYSnJi3Nl4M/Dtvu1O/iHTPnhWdkgpNngN+vurvMC9pKaOWExoC4Y7QuFfH w5Z0vgp0+oFiuYjPWO5dtwLMz9Eff8GVCNmplJ3zQgKk1jEiJWnz1J/ZlqpJGHVkIBbO sTug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vj1GLD1O; 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 t11-20020a05622a01cb00b004180af73beasi5137385qtw.312.2023.11.05.23.07.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:07:11 -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=vj1GLD1O; 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 1qztg3-0006RZ-JA; Mon, 06 Nov 2023 02:05:40 -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-0000cV-4h for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:32 -0500 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztcr-00020p-L7 for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:29 -0500 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6c320a821c4so3710378b3a.2 for ; Sun, 05 Nov 2023 23:02:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699254140; x=1699858940; 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=wER6he+enBklnSNbIQSi4AtnKBowbxVd2VG2BjlXQmQ=; b=vj1GLD1OtZ4G00Iz6PRb8CDOwETa6Ayt8BDkw+TyT2el+a/Xd3SgN3NSQNpSG3epWQ QhnV5G4V93ZZadRacTAonq9qseJI7R0XS180Qv26PaA7WbJcIxJVsVpqR322oiwfTtV4 Vmid8RU/HRNlB29fS6WInu4a+Gp1fpuS0dypn6I4MOLdMqz1KLJXQEOOoefN/WEd0YjL a10HL2ydQ0z38tO/0mr8NKRzX/UefEAsQ+KuNPBQSk/Q9DAlyxnuawc3yQ2sXy6+Hl7u RiztgbxSvDFV/5sHBDpMA5AALxXl8fEzse9vpbSKJ/Fz2o9UrDXKzmVQxvhuIGNwJHsL rZ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699254140; x=1699858940; 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=wER6he+enBklnSNbIQSi4AtnKBowbxVd2VG2BjlXQmQ=; b=tBQ1KCK4mJTlLhZiIhgXrDyS4uPgMJ19nE5Wn2j1rWWM+XvBtB/XwoQ2nzFxMWlpfY Us+byhzgfEzJKfrooi4W2zkOhVJrq2kODoFEE3g6nOR4AcrxDBMbiIYeiIOGMVZ+iNZZ ZlKlSDaoeduEYEGEFVLmINBTsIRMVoIPm3yqwGOgaX/cdRIfdvdNHMz5EM6M5zLgCdaE 2z0O0vcAP7OK4ffYA41DoGtQzw9gZ+xIbjQhal65eblMYPjUA1g4ilOfM6/g8bgCuYof zfS6Y7Gsun6tA+5yN8vjBjI2Bxu9GpC0L/5t1wKHzV4pRQjI1gwRU8Dw2ohrXvigKsf8 zfQw== X-Gm-Message-State: AOJu0YzvvMYorkudhOkUUtmb1a+gCEmR4U9is4aEGPKbz/jROoDwfdxL cdbc4+XazegWVM6neRV9k5V/Y9dQyoTFqI+kzdc= X-Received: by 2002:a05:6a20:8406:b0:182:1c26:e01a with SMTP id c6-20020a056a20840600b001821c26e01amr6577412pzd.62.1699254139993; Sun, 05 Nov 2023 23:02:19 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 8-20020a17090a194800b0027d88387287sm5319650pjh.51.2023.11.05.23.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:02:19 -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 59/71] hw/vfio: Constify VMState Date: Sun, 5 Nov 2023 22:58:15 -0800 Message-Id: <20231106065827.543129-60-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::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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 --- 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 b27011cee7..2a9bce0041 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2695,7 +2695,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() @@ -2706,12 +2706,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 }