From patchwork Mon Nov 6 06:57:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741298 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp949819wrr; Sun, 5 Nov 2023 23:13:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJeQ+WE7NAJX2dJ/oU2dC4Ototly3qaHZDIdiO5goC2hGShOmXXqFkWato3SVWYT/pbYCS X-Received: by 2002:ac8:5914:0:b0:41e:2b0b:4908 with SMTP id 20-20020ac85914000000b0041e2b0b4908mr27836859qty.57.1699254819503; Sun, 05 Nov 2023 23:13:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254819; cv=none; d=google.com; s=arc-20160816; b=drwMtLPh9hkyNLd8pcjFJ+tQQVLIxllBKwgttaion+dXz7n6LSZeYVwjtVUg1jViit b9NOKqqhQgUdNrW+mWX5ENdfNBYPuGsuVP0duPxJQYqm5AKQEpdkkyW6VZaYkU30pMLm dLy9eKJ/Ytm/G9nM8rvpHHXnTC52wbdK4CZQrMv17VebJj7EERTLPEi/L3AF3+J9K0TM 6lMCtmZhg+7gwmAMAUznaiG+GnH2AHUAvyS0WNG5pt53R0W/reGrel5kCGdFjJgA6P3A vE/cK/GD0BnGHA89yRyStJpkt1wlUcgfsc6gIx+TahELXgPLrM1G4unfwDbYP4XLAWJG vCow== 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=QZ5ZOT33XSJfzFXzv9z0z0E/PDyNVWXUtYL4PDowdaE=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=TnQWm/ReJwnlt7WRyMpgy1vrXJevGLw/Cdho3qacUsM8DAViqCtn3phPf3z/bFru/6 lcCiHEmCqqffRSVf0LAtnyRG69f3V0/Cn9om/8yn9oc1hoIDsM4ZIFrDhpF9W+ciiwux yRsxcWIsY4JFANY1kt5+zAp7HYedKsF3hRWwPHpfVi4uBdOYR60tgb5bd0uiH51GHh3h M4DFh96MhASFljKT3RqjlEto2jMm2fDzEUS0FaiEjmYm7xEjajuVxxkkYnLZWSy+hw7j dcDIWhls7c9L4glttuhLfKu/WeFhzKKVtKD/hF4XtVtGmJaCgCBKKxxuxP7CC+KltDPb p94Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PTaUSNwr; 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 s1-20020a05622a1a8100b0041e57fefd24si5460214qtc.544.2023.11.05.23.13.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:13:39 -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=PTaUSNwr; 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 1qzta4-0005JQ-OS; Mon, 06 Nov 2023 01:59:29 -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 1qztZZ-0004ZZ-9Y for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:57 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztZX-0001RH-Gu for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:57 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1c9b7c234a7so37704895ad.3 for ; Sun, 05 Nov 2023 22:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699253934; x=1699858734; 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=QZ5ZOT33XSJfzFXzv9z0z0E/PDyNVWXUtYL4PDowdaE=; b=PTaUSNwrpvF8uZO2atkEHj/6nIed6Tifeb2AdqvKuG97WcI05p566eWlKdhKM7m0/l c61C1ZuX5/dekD1N4xrOOv6lKZM6NQA8pMFv1vJU+HOWl52vmrtIEXo2E7QxMaQaN6Ra CXPYQDtkvTNN6Il+7Bf92TU0iOIBUfBJBomNXfziZC7GjjIHqh7iguc+yrg1guRWh9bb WnHvKsd9LWn44DROVstVi4c/jqVHFe2MRxiZ5Ct60YHOuKCT4xYTaG+rUPhvAzlMC1xS SBCHZoDfiIn6BtnY2OtI6kkL8No3ep4tM2QDobYS4nWdCBEhnUcSSEZNoRe7YGrYb48H 6BfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699253934; x=1699858734; 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=QZ5ZOT33XSJfzFXzv9z0z0E/PDyNVWXUtYL4PDowdaE=; b=ElnZEQST8LHm/FqqlabtOHqYZoKzdDdp3X0qB8wNuxf4iL26EtBLU+Uu3+GvlA0pO1 8THVJ8rWw55d1QJFUosXm8sZXHEJWonpR/4HtCByoL2hIdnkpLwqL8t/VVBULwrUk486 hBLhbYTv6Z8GRv03hHCrORaJTfEj1rBmzwjlSESiDCcrW3/CuHPXt+XdRfZZpFUkCq1a 8tcIwDiazbIlYoc696LbGyxJkQZziClVSAqgOKT0vwB3YsjZFxGjeO1BqxFl8Bam9Xsg RbCnn+LaLLxf3uvDcwBJY3kOnJdDfkHG5l9d8tvfS5wZRY8C0o2DYKzDM22aouSlwGcL hS4Q== X-Gm-Message-State: AOJu0YzZHRTggQrhm1o3foQa3sIqsX2oESAQj04XltNy5RyrqLtjYkX5 5EChF2GMrwZartKCNnrRD+feCYxYv0G1rel70t8= X-Received: by 2002:a17:903:807:b0:1cc:2a23:cbab with SMTP id kr7-20020a170903080700b001cc2a23cbabmr25271665plb.27.1699253934178; Sun, 05 Nov 2023 22:58:54 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id c3-20020a170902d48300b001c62e3e1286sm5167130plg.166.2023.11.05.22.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 22:58:53 -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 29/71] hw/hyperv: Constify VMState Date: Sun, 5 Nov 2023 22:57:45 -0800 Message-Id: <20231106065827.543129-30-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::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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/hyperv/vmbus.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c index 271289f902..7183f4e367 100644 --- a/hw/hyperv/vmbus.c +++ b/hw/hyperv/vmbus.c @@ -526,7 +526,7 @@ static const VMStateDescription vmstate_gpadl = { .name = "vmbus/gpadl", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(id, VMBusGpadl), VMSTATE_UINT32(child_relid, VMBusGpadl), VMSTATE_UINT32(num_gfns, VMBusGpadl), @@ -1489,7 +1489,7 @@ static const VMStateDescription vmstate_channel = { .version_id = 0, .minimum_version_id = 0, .post_load = channel_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(id, VMBusChannel), VMSTATE_UINT16(subchan_idx, VMBusChannel), VMSTATE_UINT32(open_id, VMBusChannel), @@ -2380,7 +2380,7 @@ const VMStateDescription vmstate_vmbus_dev = { .name = TYPE_VMBUS_DEVICE, .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8_ARRAY(instanceid.data, VMBusDevice, 16), VMSTATE_UINT16(num_channels, VMBusDevice), VMSTATE_STRUCT_VARRAY_POINTER_UINT16(channels, VMBusDevice, @@ -2549,7 +2549,7 @@ static const VMStateDescription vmstate_post_message_input = { .name = "vmbus/hyperv_post_message_input", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { /* * skip connection_id and message_type as they are validated before * queueing and ignored on dequeueing @@ -2572,7 +2572,7 @@ static const VMStateDescription vmstate_rx_queue = { .version_id = 0, .minimum_version_id = 0, .needed = vmbus_rx_queue_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8(rx_queue_head, VMBus), VMSTATE_UINT8(rx_queue_size, VMBus), VMSTATE_STRUCT_ARRAY(rx_queue, VMBus, @@ -2589,7 +2589,7 @@ static const VMStateDescription vmstate_vmbus = { .minimum_version_id = 0, .pre_load = vmbus_pre_load, .post_load = vmbus_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8(state, VMBus), VMSTATE_UINT32(version, VMBus), VMSTATE_UINT32(target_vp, VMBus), @@ -2598,7 +2598,7 @@ static const VMStateDescription vmstate_vmbus = { vmstate_gpadl, VMBusGpadl, link), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &vmstate_rx_queue, NULL } @@ -2643,7 +2643,7 @@ static const VMStateDescription vmstate_vmbus_bridge = { .name = TYPE_VMBUS_BRIDGE, .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT_POINTER(bus, VMBusBridge, vmstate_vmbus, VMBus), VMSTATE_END_OF_LIST() },