From nobody Mon Nov 23 04:34:30 2026 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=1793983121; cv=none; d=zohomail.com; s=zohoarc; b=E6hiDAq+q07g1M0taSjYI3zBnOymeljMB1lbmtTeR2GoERmo4qWSHZBEjBOfgx7sjXO0Wah8MClw/VG+somSddyuYTTmj9DHSXtPkJKGKW5ghhxTGioT1a2F/qeiROL/AgclqgbGN1+dM7kuxknEHyJAEfOBmHiXfGYIzPFWrOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793983121; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oUo4+D9Mg8LRDc34U8PXawCEJelkdTLuEOZ0iDVwa0o=; b=HmF4DeLRYUj4CmuIsRV04Q+8NgG8cBM7GxCN7iGcK7jTMxvT8hsBVI8DU4t7DPMWFV+X7ly5uFKmu+L3Auxw24oBkThLBOS/Jmk6isC+uEEGBWYqx6wI711VoGwl3jGze1fy3EhNqKy+jCpSQqyIueHbLTG/+YGin9hJUtZOkrs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793983121415489.04491190941724; Fri, 6 Nov 2026 08:38:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xPMwx-0005zF-R7; Fri, 06 Nov 2026 11:37:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xPMw4-0005pN-C0 for qemu-devel@nongnu.org; Fri, 06 Nov 2026 11:37:09 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xPMw1-0006P8-Dx for qemu-devel@nongnu.org; Fri, 06 Nov 2026 11:37:03 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-48fd2e38825so560390f8f.2 for ; Fri, 06 Nov 2026 08:37:01 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-492d3d60e78sm4517912f8f.1.2026.11.06.08.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2026 08:36:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1793983020; x=1794587820; 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:content-type; bh=oUo4+D9Mg8LRDc34U8PXawCEJelkdTLuEOZ0iDVwa0o=; b=wde75VUydq1NjKsbaQYp/l2wZ4G1wHI39sCx6CR4zXcqNOcce4eNDc71Qu4NiH8kSu Hqi9TPrfiFUFrjWv2KmTn8KagG2SvsBhaNpymmnGX5np+/8Hu16MsA4aJ68EIlmlwCk6 EtKGODnKGxeznTId4WtGFThpxKM2IcuEVOCK41CL48UpPbpcVX52yNF1zIRRVG/uTLHT CXN51edRu0w/MvE3VcPLbbzGryFxvTxorOTQb41ixHGSOBBfZPLvo9PSxW9zL0AjFEPX /H2jPoxHqBCf67TlkVQXhlci5C6pgiN5eYBise+xt5DEY5YPtvN6sUbnWOYFYlWzPa9P joCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793983020; x=1794587820; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=oUo4+D9Mg8LRDc34U8PXawCEJelkdTLuEOZ0iDVwa0o=; b=TVVsFFIuzxP494wPcgqHRjsvIvbpRJo109SCZj/F010HZolO3S0mfLsO2hWvXDZ/5b wuVJzBOQEQPIkjHmoS2qWGAk61hrofrvHlklWuBx3OxqF78FzPNAkCR9Ikoz9gpeOjWd WNvgxg03K5sz/F5Sgbg1Hx53pXeb9MrHP/MnnUb+rfwng7VC2txNswpe2591mLBQm1uR lSt1ZK579r0/Wcv2r9WhGJ6TBJxWLWaL9wfbPirWZ7/LFCv6AAIW58sj0vbtmzxMEjse 2PkvoASwrzJer328QifIxyOHk8wiYvFB1Kqqyb7xH2VNDPM2T3btNVc9T9Sb5XR2JMRZ wJ3A== X-Forwarded-Encrypted: i=1; AL+hErHbTATVFjLJ1GfbMnk0Y0vSPzQgSNwX9AaOTM27ElfAgj7jNHnDJHGT8p8GLpH6xpVgl+dmMg6IRTB+@nongnu.org X-Gm-Message-State: APuU4Z80WjX0c7zczvilovKALycswydfuTYshEjZ60u5QP/Gz6vnVyj9 10Oee4D5pFnDlHpj2/fKkJpsIOthfhLVmXr/lxX+9dn9HOHDSjnrKJQn5iBIUitAmBw= X-Gm-Gg: AYBFou0MWtVamPns/FXoKOIdmlarM7X+w/ryPg0d5VU3rfYTGjhZNtzi2sktO0/7h80 yOUHGTilGGeQiq+Fm2aX1UNmweVnHOqNvZ+tlEGGdzrssvcAY3EOZtGH6dq+UybVoz4y6/CejLV Mz3NCiD/LVW0m9tbH5N14xvWSZ7a/3GvrAWcnsWun2sHxRXG5nnUVDTaq0NlL/4DyM38ym9lISb nFVaLX/ES7OUJyOXLDeWPdQ5YVJVuCHPd3aYziuntAsP+FEAMGCQyBnWfRVYjwgW/3wp7L91jfg meqvi8VCh4RqdGoy77GQxDhSbf6EUtOsmgUhdaWGrGaqwSW4PEIfqu/79KaChIEWBot5bDZZ0nC W1kFK0P+qzHWwAjCCAKdhtszfthb8Kdb/6pZP47ZE7smYJW32AgJrfBNscbgOTdoOiroaWQ5TV4 0gJhNbXsggpGa1EsHkySJsItaNgYmaHMS0iQVc9YqEDFXHpAe0hqX29e3wUJetNeYxC8djl9JW9 B5dCGo8aZN3CUHSNn+J49NCB2KFO5/yIltBBiUQEsVlHxoJlbMXsciUryVlECHwrbK6Tvi7yea5 sX8OGU767qK+LcGFx3o8xyXRZqbwgkhzZEdFC6ZHvXh7qbk4tHycGRKob2zUaEG/X9906h9BWyb TtKLi70uJ0eUhm3NRMAH0Nq9xJt4Q6zWiBA== X-Received: by 2002:a05:6000:2c03:b0:493:28c4:331e with SMTP id ffacd0b85a97d-49328c435cemr3559926f8f.28.1793983019907; Fri, 06 Nov 2026 08:36:59 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Jean-Christophe Dubois , Chao Liu , Alistair Francis , "Edgar E. Iglesias" , Bernhard Beschow , Peter Xu , Fabiano Rosas Subject: [PATCH v2 for-11.2 1/2] hw/watchdog/wdt_imx2: Set vmstate minimum_version_id to 1 Date: Fri, 6 Nov 2026 16:36:56 +0000 Message-ID: <20261106163657.3825938-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261106163657.3825938-1-peter.maydell@linaro.org> References: <20261106163657.3825938-1-peter.maydell@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1793983123038158500 Content-Type: text/plain; charset="utf-8" In commit d9abd0253be90 we made a non-compatible migration state change, and set version_id to 1. However we forgot to also set minimum_version_id to 1, so the state struct now incorrectly claims it can accept migrations from the old version 0 format. Bump minimum_version_id also to 1, so that attempted migrations from the old QEMU fail cleanly. Fixes: d9abd0253be90280 ("hw/watchdog/wdt_imx2: Remove redundant attributes= ") Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis --- hw/watchdog/wdt_imx2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c index f8129625e58..abb8edfae25 100644 --- a/hw/watchdog/wdt_imx2.c +++ b/hw/watchdog/wdt_imx2.c @@ -224,6 +224,7 @@ static const MemoryRegionOps imx2_wdt_ops =3D { static const VMStateDescription vmstate_imx2_wdt =3D { .name =3D "imx2.wdt", .version_id =3D 1, + .minimum_version_id =3D 1, .fields =3D (const VMStateField[]) { VMSTATE_PTIMER(timer, IMX2WdtState), VMSTATE_PTIMER(itimer, IMX2WdtState), --=20 2.43.0 From nobody Mon Nov 23 04:34:30 2026 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=1793983085; cv=none; d=zohomail.com; s=zohoarc; b=FsMpLuBY5QBXONDfyPQnulHup88k37e5Pf7+TqS5GYlcyxpjCtnaZ2n0COyM33z3teiQ6rcwXBIIfaZ7Os6fTV5XXysXbCXiSNjKFt16SZxWHDWQAWOmXv7IsJp35U1STlhXpWd1wRSsQDb5Z9AjP0BgiRUe6kYQgDos5wKnv/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793983085; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EQXaPCL/hDktSfe0rSeHbVLMMpwdPDgo7ErChtSxbYs=; b=P99V7xSsJFdannyjSvpt9cFreaZSvFFC51aP0B8QKIZM9XLpaQKDMGwuNWvw+yGwNd65YcipFUdykgCFrWAqefWpqZurCpDQfVmfw4CrgBmMgi9Tl4uQMg76pw98y0/lhJxZMKSILs0UG0sG7TK+DJxxVZiET0Ew/IOMOM7ljfs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793983085573184.77637896063482; Fri, 6 Nov 2026 08:38:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xPMwv-0005xL-6V; Fri, 06 Nov 2026 11:37:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xPMw5-0005pT-VC for qemu-devel@nongnu.org; Fri, 06 Nov 2026 11:37:09 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xPMw2-0006PQ-Uc for qemu-devel@nongnu.org; Fri, 06 Nov 2026 11:37:04 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-490a0e72588so451162f8f.3 for ; Fri, 06 Nov 2026 08:37:02 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-492d3d60e78sm4517912f8f.1.2026.11.06.08.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2026 08:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1793983021; x=1794587821; 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:content-type; bh=EQXaPCL/hDktSfe0rSeHbVLMMpwdPDgo7ErChtSxbYs=; b=VXTuNPaCr13DtuSMx8npEYqyToLalDK6Y7ZCg2ysJqKWJX7dKo9o+YdW8g8uuYgMYN +4m4BwKm7p+xerMJINB9232/5Iua3EPVgstmmPgbpuQCcl0XMJw0UYTka++2laNDAE6U T6CkfumWA+Zl+CuP/rN4OGOJSyz/zDK1fYwgYc5sxGiZ8LJ6Rob/kT+TAipttmLz5+Vh RGVEt2vPnsjdyj/K/CsQRSubDOPcfb59b2fZF46t0/QNqQ0xGmw010gHuNDjF3O2HIIN 1PB7YPIh9tWSfdcXeesYBKA1mdSn+TxsVUaJL6tTGhCReFG8BDyuC65wSeO1h2jYwrUS hp+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793983021; x=1794587821; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=EQXaPCL/hDktSfe0rSeHbVLMMpwdPDgo7ErChtSxbYs=; b=DEuoNRkQLklMQHuPDsQ7HFMb9dsRUrcmdLIkMdY0GxcZFS85iLS6BmVOZv5XL1+nL6 1QrYLr5AQJ0wfcbhHA11cpKd5jxl0Y+A7GlJIWp95BNnDR6KkVMi8iKZ6yQgNALG7nq8 ny/KTvdxWkEjM3Q1bqOrqmBtqG4wINMDBh9TQvQ0bOxRzzv75bws5V3/rl+PBlpfGidg PG/+ScvaehP9h4OHfPlCiqFJ5hDwqEb74YyPx9QdilYG/TkM70mNJY80B10wm0b8W1KA gMJzHTa72OTuzfwQTPfzlxOJmTSfcWSUCh4ctgKhKPCWj1skLd60llP/yxWh9VlsIa4X 4rfg== X-Forwarded-Encrypted: i=1; AL+hErHG3PI1unmr5MVrv/Os/X2Iz/NgneDkQ6MqXzNPGLiir5e80wowkyaem9GP7dt27QFp83kYqlF9BDgi@nongnu.org X-Gm-Message-State: APuU4Z/YDkHTrjKe7mHq3kELpoM3QGqE1V1gdw8ZseiP0kLRZrnQpXKh slvH4Mb3zQbhIj4dY5s+Rx3H1EfVGfSDJVbuOXwo/NXQiE8LHmdYcALtv+26DrmG3M0= X-Gm-Gg: AYBFou3b5VldON7fwT2c70e4gvIsxWK9WeO/9+/WmMLchPcQDBAFC1x6SCABEyvZEXk 6LFWCWey2efPN9L7Bd+HqKknGBmSuXr4sQj3gFl2rB3d8N50+rYYZgVCltIELhy1JuAQ8veqy+X 7yxQhSLaiOjBcs/g+51B0nm0EJhZYf2AyPZal87n1IvccR9im0r+2afe6OFp/RuWBNk82q5qj7i EBZi5PmAGaE/GDTfWowSLPDbyy2gEtSAfTsFLaneRMa6XRgx5ey0JNkTIUSYpPlZP8OcXUeLrCH E3I4PAwDNQTGqjFh7XIM0GWUGtmYGt5ja36tvn7gt3JIjU2mY+tDe9grSe69QM3//pBg+3bDCOO O6ZsUkaLT13qMJj++v/eGNJv4MH6ztiimz+08pNzMujwelhJ7PwjRK0BEx/jevfnsGUrT2ZuYjt QBz3Nf/rfNwGWE5FwfzcMbOSy4eKEv8Zpu+vRRz13AwPR4v/NKOE201o3v1QyoK29WltJByL/WU zUMj2aQ/qepejvzlYZrVYaL4nYm/EtNM+mossLBP0oDb8clb5wNjQMCN8TV2JTKB0i9XXWOE8hh 1Befk3Y9bBgps1v2HShIpzWzuqW2pkrNewxOWkj+ksfd3uR/1u7d8zFI1ZXGGupH5ifPt1xI55c aqr/dJ78QudX+Nvc5S/F9eZ51K9D1Sc5MEw== X-Received: by 2002:a5d:5e8e:0:b0:48c:5304:5e50 with SMTP id ffacd0b85a97d-49278174682mr5505960f8f.0.1793983021083; Fri, 06 Nov 2026 08:37:01 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Jean-Christophe Dubois , Chao Liu , Alistair Francis , "Edgar E. Iglesias" , Bernhard Beschow , Peter Xu , Fabiano Rosas Subject: [PATCH v2 for-11.2 2/2] include/hw/core/ptimer.h: Fix 'version' argument of VMSTATE_PTIMER Date: Fri, 6 Nov 2026 16:36:57 +0000 Message-ID: <20261106163657.3825938-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261106163657.3825938-1-peter.maydell@linaro.org> References: <20261106163657.3825938-1-peter.maydell@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1793983086594158500 Content-Type: text/plain; charset="utf-8" The VMSTATE_PTIMER macro is defined to pass a 'version' argument of 1 to VMSTATE_STRUCT_POINTER_TEST_V. This means that the field will only be used in migration when the vmstate struct that uses VMSTATE_PTIMER has a version_id of at least 1. This doesn't match how we define other VMSTATE_FOO which don't take an explicit version_id, which is to use a version argument of 0 (e.g. all the common macros like VMSTATE_UINT32 are written to pass 0 to their VMSTATE_UINT32_V counterparts, and so on). It also doesn't match how we define VMSTATE_PTIMER_ARRAY. The practical effect of this is that users of VMSTATE_PTIMER in vmstate structs which explicitly or implicitly have a version_id of 0 were actually not getting their ptimers migrated. This affects: vmstate_xlnx_csu_dma in wh/dma/xlnx_csu_dma.c vmstate_k230_wdt in hw/watchdog/k230_wdt.c which are used in: * Arm Xilinx versal and zynq machines * RISC-V K230 machine Most ptimer users are unaffected because they took the usual approach of explicitly setting their starting version_id to 1. Fix the version_id in this field. This is a migration compatibility break for all the above listed devices/machines. Since the timers involved are in devices where the timer is usually stopped (e.g. the watchdogs only have the timer active when the watchdog is enabled and counting down), the consequences of the bug are likely not visible to most users. We could perhaps attempt to preserve migration compatibility here, but none of the affected machine types are versioned and so we do not promise cross-version compatibility, so do the simple thing. Bump the version_id and version_id on the two affected vmstate structs so that attempted migration between old and new QEMU fails cleanly. Fixes: 852f771ec9e5c ("vmstate: port pmtimer") Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4705 Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Reviewed-by: Bernhard Beschow --- Not cc: stable because it's a migration format change and we don't generally backport those --- include/hw/core/ptimer.h | 2 +- hw/dma/xlnx_csu_dma.c | 4 ++-- hw/watchdog/k230_wdt.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/hw/core/ptimer.h b/include/hw/core/ptimer.h index 4dc02b0de47..8513f8917e3 100644 --- a/include/hw/core/ptimer.h +++ b/include/hw/core/ptimer.h @@ -300,7 +300,7 @@ void ptimer_stop(ptimer_state *s); extern const VMStateDescription vmstate_ptimer; =20 #define VMSTATE_PTIMER(_field, _state) \ - VMSTATE_STRUCT_POINTER_V(_field, _state, 1, vmstate_ptimer, ptimer_sta= te) + VMSTATE_STRUCT_POINTER_V(_field, _state, 0, vmstate_ptimer, ptimer_sta= te) =20 #define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \ VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, 0, \ diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c index 436f9915e02..ea703dc00ce 100644 --- a/hw/dma/xlnx_csu_dma.c +++ b/hw/dma/xlnx_csu_dma.c @@ -679,8 +679,8 @@ static void xlnx_csu_dma_realize(DeviceState *dev, Erro= r **errp) =20 static const VMStateDescription vmstate_xlnx_csu_dma =3D { .name =3D TYPE_XLNX_CSU_DMA, - .version_id =3D 0, - .minimum_version_id =3D 0, + .version_id =3D 1, + .minimum_version_id =3D 1, .fields =3D (const VMStateField[]) { VMSTATE_PTIMER(src_timer, XlnxCSUDMA), VMSTATE_UINT16(width, XlnxCSUDMA), diff --git a/hw/watchdog/k230_wdt.c b/hw/watchdog/k230_wdt.c index 1f83b499e82..fba2013b8f3 100644 --- a/hw/watchdog/k230_wdt.c +++ b/hw/watchdog/k230_wdt.c @@ -234,6 +234,8 @@ static const MemoryRegionOps k230_wdt_ops =3D { =20 static const VMStateDescription vmstate_k230_wdt =3D { .name =3D "k230.wdt", + .version_id =3D 1, + .minimum_version_id =3D 1, .fields =3D (const VMStateField[]) { VMSTATE_PTIMER(timer, K230WdtState), VMSTATE_UINT32(cr, K230WdtState), --=20 2.43.0