From nobody Tue Nov 4 23:53:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153158895637816.095082264280677; Sat, 14 Jul 2018 10:22:36 -0700 (PDT) Received: from localhost ([::1]:42087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feOFf-0001Xt-7F for importer@patchew.org; Sat, 14 Jul 2018 13:22:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feO9q-0005mO-NG for qemu-devel@nongnu.org; Sat, 14 Jul 2018 13:16:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1feO9o-0004Y4-Gd for qemu-devel@nongnu.org; Sat, 14 Jul 2018 13:16:34 -0400 Received: from greensocs.com ([193.104.36.180]:57252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1feO9i-0004ML-Mj; Sat, 14 Jul 2018 13:16:26 -0400 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id 32443C7AE3; Sat, 14 Jul 2018 19:16:19 +0200 (CEST) Received: from greensocs.com ([127.0.0.1]) by localhost (gs-01.greensocs.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZUA-Qmim85Te; Sat, 14 Jul 2018 19:16:18 +0200 (CEST) Received: by greensocs.com (Postfix, from userid 998) id 5B75DC7AF0; Sat, 14 Jul 2018 19:16:18 +0200 (CEST) Received: from localhost.localdomain (unknown [105.98.38.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luc.michel@greensocs.com) by greensocs.com (Postfix) with ESMTPSA id A2EACC7ADD; Sat, 14 Jul 2018 19:16:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1531588579; bh=R0qo1qb4zMgWwyZkI0Car8T0C8eMP8Rof3Obc1oH8Wc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vV4/QXMwNU/WfrOkEcLDINZVOcQM6V5jyPGDqPkyi529CUXoS8JYBl5ZuuOV/an/G iZIatPxa4K2cPoMvvOFvVFMnEO1//SIkgETe8CnkknDZmxQJTxMJe/LN0wOuroI212 3FZWJfDsyIOhZWwoeMHziWUnXiLdA0IUQYk3cDO0= X-Virus-Scanned: amavisd-new at greensocs.com Authentication-Results: gs-01.greensocs.com (amavisd-new); dkim=pass (1024-bit key) header.d=greensocs.com header.b=enhlSUeg; dkim=pass (1024-bit key) header.d=greensocs.com header.b=enhlSUeg DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1531588578; bh=R0qo1qb4zMgWwyZkI0Car8T0C8eMP8Rof3Obc1oH8Wc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=enhlSUegUdJVrF9/RvMlGwisL7rcUiCW02pZqc3GBcJfwmv0C5nCxyWBhpowhl+lF P8BvzD25zZ4FHvwyrWmkQfs65BQ3jmBtjjyHaUT480QGB0d8FNcGy6kFS9FrH4OiT2 Mkopq593x8hoXIwAmQRqscVvIjCyRJqpXHnvWXcQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1531588578; bh=R0qo1qb4zMgWwyZkI0Car8T0C8eMP8Rof3Obc1oH8Wc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=enhlSUegUdJVrF9/RvMlGwisL7rcUiCW02pZqc3GBcJfwmv0C5nCxyWBhpowhl+lF P8BvzD25zZ4FHvwyrWmkQfs65BQ3jmBtjjyHaUT480QGB0d8FNcGy6kFS9FrH4OiT2 Mkopq593x8hoXIwAmQRqscVvIjCyRJqpXHnvWXcQ= From: Luc Michel To: qemu-devel@nongnu.org Date: Sat, 14 Jul 2018 19:15:45 +0200 Message-Id: <20180714171601.5734-5-luc.michel@greensocs.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180714171601.5734-1-luc.michel@greensocs.com> References: <20180714171601.5734-1-luc.michel@greensocs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 193.104.36.180 Subject: [Qemu-devel] [PATCH v4 04/20] vmstate.h: Provide VMSTATE_UINT16_SUB_ARRAY X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , mark.burton@greensocs.com, saipava@xilinx.com, edgari@xilinx.com, qemu-arm@nongnu.org, Jan Kiszka , Luc Michel Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 2 invalid signatures) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Provide a VMSTATE_UINT16_SUB_ARRAY macro to save a uint16_t sub-array in a VMState. Signed-off-by: Luc Michel Reviewed-by: Peter Maydell --- include/migration/vmstate.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 42b946ce90..2b501d0466 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -923,6 +923,9 @@ extern const VMStateInfo vmstate_info_qtailq; #define VMSTATE_UINT16_ARRAY(_f, _s, _n) \ VMSTATE_UINT16_ARRAY_V(_f, _s, _n, 0) =20 +#define VMSTATE_UINT16_SUB_ARRAY(_f, _s, _start, _num) \ + VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_uint16, uint16= _t) + #define VMSTATE_UINT16_2DARRAY(_f, _s, _n1, _n2) \ VMSTATE_UINT16_2DARRAY_V(_f, _s, _n1, _n2, 0) =20 --=20 2.18.0