From nobody Wed Feb 11 03:25:56 2026 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1532685478086911.5972399167292; Fri, 27 Jul 2018 02:57:58 -0700 (PDT) Received: from localhost ([::1]:40050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fizVL-0005xm-St for importer@patchew.org; Fri, 27 Jul 2018 05:57:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fizSg-0003f7-Hb for qemu-devel@nongnu.org; Fri, 27 Jul 2018 05:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fizSf-0006IU-0C for qemu-devel@nongnu.org; Fri, 27 Jul 2018 05:55:02 -0400 Received: from greensocs.com ([193.104.36.180]:47470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fizSY-00064D-1Q; Fri, 27 Jul 2018 05:54:54 -0400 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id D43C744354B; Fri, 27 Jul 2018 11:54:45 +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 GijnWCfS8mRU; Fri, 27 Jul 2018 11:54:45 +0200 (CEST) Received: by greensocs.com (Postfix, from userid 998) id 9D21B400DC8; Fri, 27 Jul 2018 11:54:44 +0200 (CEST) Received: from michell-laptop.bar.greensocs.com (antfield.tima.u-ga.fr [147.171.129.253]) (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 48D83443485; Fri, 27 Jul 2018 11:54:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1532685285; bh=1o4L6CAB0JKgZyTsEhAHf1uW//RbD8il0hTMwxGh2Zw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=V1ROwyx1b2c3tqnNOCC+wktuyVNa3DD7sx0OHNFD9vaU/5svcde4G/zaBsoytwKXo l8uDOkf1nZiz20UdyyALXFPBBFhaZAKepiAKgCvnzclq9xdZyZulgQNPX6CGpE+W4B xBfS0uPjuZs6uLi5TdcuQIbL6OFEwa51dlFANYi8= 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=tBNFROtm; dkim=pass (1024-bit key) header.d=greensocs.com header.b=tBNFROtm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1532685284; bh=1o4L6CAB0JKgZyTsEhAHf1uW//RbD8il0hTMwxGh2Zw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tBNFROtmSMhKVrhArjPLqpFlnK3vMuFoN0PHG0Cz8pn9SPWIAbSQs4iPwxf75y1GH tV2k5lgdzscC+5+s9wj37w3DfrVmSbqfcEtScMdu5+CQ4+Ol6Ex4pPRA20qjPBOk1g +4doZOTxKOHi4xub5Gy8KFhQTso4L9J+gOamObbg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1532685284; bh=1o4L6CAB0JKgZyTsEhAHf1uW//RbD8il0hTMwxGh2Zw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tBNFROtmSMhKVrhArjPLqpFlnK3vMuFoN0PHG0Cz8pn9SPWIAbSQs4iPwxf75y1GH tV2k5lgdzscC+5+s9wj37w3DfrVmSbqfcEtScMdu5+CQ4+Ol6Ex4pPRA20qjPBOk1g +4doZOTxKOHi4xub5Gy8KFhQTso4L9J+gOamObbg= From: Luc Michel To: qemu-devel@nongnu.org Date: Fri, 27 Jul 2018 11:54:05 +0200 Message-Id: <20180727095421.386-5-luc.michel@greensocs.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180727095421.386-1-luc.michel@greensocs.com> References: <20180727095421.386-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 v5 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 @@ -921,10 +921,13 @@ extern const VMStateInfo vmstate_info_qtailq; VMSTATE_2DARRAY(_f, _s, _n1, _n2, _v, vmstate_info_uint16, uint16_t) =20 #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 #define VMSTATE_UINT8_2DARRAY_V(_f, _s, _n1, _n2, _v) \ VMSTATE_2DARRAY(_f, _s, _n1, _n2, _v, vmstate_info_uint8, uint8_t) --=20 2.18.0