From nobody Tue Apr 15 11:33:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1564154437; cv=none; d=zoho.com; s=zohoarc; b=iBWgS9ZKjgFAIlaFYA2GhBG/yjcNUfv28gVLov3QIDGiUP5CzmmxopJagIcQISfY5GM05xfxB4wvBB0TbLuUMyWSvYmhqGKBBQM4z3M7NuZx2LU5C4J0aYFBjtAzsKY81E2IZzJalWWbKx79A3zZqK4eE6yFsFryBbs5MDwTl5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564154437; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=T/xJHFrQoJ4wgCuUOjNgn0AYtE8Gq7pDtEMvN4Sp0P4=; b=FK+bCw3dsDOzYMDvlzOfKMQweVFtcUTAdJoKvc9Is/p41W9XoQtzxodAaKT+X4rh+lEVNBV7KZjrGm20vVaBMlVswr6DB5tbzx7IYvFoSvNnVFB6elAzCDPqNi2JmISW/cqckhllkPen9whVmUWy+JMis34R6cRFI13e3t84NHY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156415443713024.698199697296445; Fri, 26 Jul 2019 08:20:37 -0700 (PDT) Received: from localhost ([::1]:41074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr21L-0002Qf-I2 for importer@patchew.org; Fri, 26 Jul 2019 11:20:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37502) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr20k-0000ld-QP for qemu-devel@nongnu.org; Fri, 26 Jul 2019 11:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr20j-0006v2-AM for qemu-devel@nongnu.org; Fri, 26 Jul 2019 11:19:58 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:37231) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr20j-0006sK-2Q for qemu-devel@nongnu.org; Fri, 26 Jul 2019 11:19:57 -0400 Received: by mail-wr1-x42b.google.com with SMTP id n9so29755678wrr.4 for ; Fri, 26 Jul 2019 08:19:56 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id v16sm32746844wrn.28.2019.07.26.08.19.54 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 08:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=T/xJHFrQoJ4wgCuUOjNgn0AYtE8Gq7pDtEMvN4Sp0P4=; b=pL+dJWWDO8lSq/SXLv2N5NtGOC3c4Uf04s1lDZjWUJJaCiP2zGoiqpaL/SC4l2g5vY ITP52zeWDOQ7CiJFsubb9Euteuh4aZj91isGqLzv9cOUL1T2npE88Ij7HuAEFbYTPpmC EZdwb38m57hzQS8ZM1ciDZJ296aJTMK33iTkNgQDayD+I6v/QqFaeSnB2ZnHGsUOvjM7 0kv05HhABn9dLf1FNuvO8FNkLYOwyeCKVxzkAg1KwxQ67w93wZwLY8V4ar+aQFBkhAPo N5Mbm1B2mZvlI2pn4W+fFWCcMei4fWSS62UK5Iu+P2t5GSHWfmC6tR6wj/UXiOPAY3HX L+eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T/xJHFrQoJ4wgCuUOjNgn0AYtE8Gq7pDtEMvN4Sp0P4=; b=d4tOwZuVm6wspFs3eROucuVXpXs0Cer/xVtmNBTsPXG/vsDRnVOWkvGyHPrJRYPu2R qcZACSJ1N6Q9Cat/5X/52FasXoNIwi1a9GnaYD8F+MhZA6b96+MpwFh1SuqOz0xBR0O7 KJOXMcoSPuTOJFaKDdBR/AEpfRsXq25zj2ldcL98Jbvtw1lk8SwAnvVx5XFFcvmq6jYd EyX2iG81k2FLOl6BEIJpfhaH1NrBw8XjvpxdM/L972vRqem89umCmtNRVi4d2eiu6Oyq y25SvwI+OonbPPJVfaxNfE1XjV//694cF37HWyDRW3u2E2W2QpaZVBd3rpYU3SiDnMMp BCsg== X-Gm-Message-State: APjAAAU5Aj0mBV+rLb3jhEO0av+bxy5+FTKFWAqLGzIgDSj+V1DmRhpk ugIhdYnswHSisC8eeZqj7h8bu+aykM1ufQ== X-Google-Smtp-Source: APXvYqxEq3otlCLAUDxob5yEP3gYI1a3UfpbOojkOTATUHI3OCwW4SILIiCdlH/rPdbRVhcvTn+qcw== X-Received: by 2002:a5d:4041:: with SMTP id w1mr91050824wrp.199.1564154395815; Fri, 26 Jul 2019 08:19:55 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 16:19:48 +0100 Message-Id: <20190726151952.1932-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190726151952.1932-1-peter.maydell@linaro.org> References: <20190726151952.1932-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b Subject: [Qemu-devel] [PULL 1/5] pl330: fix vmstate description X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Damien Hedde Fix the pl330 main and queue vmstate description. There were missing POINTER flags causing crashes during incoming migration because: + PL330State chan field is a pointer to an array + PL330Queue queue field is a pointer to an array Also bump corresponding vmsd version numbers. Signed-off-by: Damien Hedde Reviewed-by: Philippe Mathieu-Daude Acked-by: Dr. David Alan Gilbert Message-id: 20190724143553.21557-1-damien.hedde@greensocs.com Signed-off-by: Peter Maydell --- hw/dma/pl330.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 58df965a468..a56a3e77713 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -218,11 +218,12 @@ typedef struct PL330Queue { =20 static const VMStateDescription vmstate_pl330_queue =3D { .name =3D "pl330_queue", - .version_id =3D 1, - .minimum_version_id =3D 1, + .version_id =3D 2, + .minimum_version_id =3D 2, .fields =3D (VMStateField[]) { - VMSTATE_STRUCT_VARRAY_UINT32(queue, PL330Queue, queue_size, 1, - vmstate_pl330_queue_entry, PL330QueueEntr= y), + VMSTATE_STRUCT_VARRAY_POINTER_UINT32(queue, PL330Queue, queue_size, + vmstate_pl330_queue_entry, + PL330QueueEntry), VMSTATE_END_OF_LIST() } }; @@ -278,12 +279,12 @@ struct PL330State { =20 static const VMStateDescription vmstate_pl330 =3D { .name =3D "pl330", - .version_id =3D 1, - .minimum_version_id =3D 1, + .version_id =3D 2, + .minimum_version_id =3D 2, .fields =3D (VMStateField[]) { VMSTATE_STRUCT(manager, PL330State, 0, vmstate_pl330_chan, PL330Ch= an), - VMSTATE_STRUCT_VARRAY_UINT32(chan, PL330State, num_chnls, 0, - vmstate_pl330_chan, PL330Chan), + VMSTATE_STRUCT_VARRAY_POINTER_UINT32(chan, PL330State, num_chnls, + vmstate_pl330_chan, PL330Chan= ), VMSTATE_VBUFFER_UINT32(lo_seqn, PL330State, 1, NULL, num_chnls), VMSTATE_VBUFFER_UINT32(hi_seqn, PL330State, 1, NULL, num_chnls), VMSTATE_STRUCT(fifo, PL330State, 0, vmstate_pl330_fifo, PL330Fifo), --=20 2.20.1