From patchwork Thu May 4 00:53:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 9710689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8ECD460387 for ; Thu, 4 May 2017 00:58:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8196228678 for ; Thu, 4 May 2017 00:58:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 766AD2867D; Thu, 4 May 2017 00:58:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2C79528678 for ; Thu, 4 May 2017 00:58:02 +0000 (UTC) Received: from localhost ([::1]:39211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d655l-0003rF-E0 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 May 2017 20:58:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d651s-0001UP-QM for qemu-devel@nongnu.org; Wed, 03 May 2017 20:54:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d651s-0005zw-4B for qemu-devel@nongnu.org; Wed, 03 May 2017 20:54:00 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:33750) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d651r-0005zZ-Ud for qemu-devel@nongnu.org; Wed, 03 May 2017 20:54:00 -0400 Received: by mail-pg0-x243.google.com with SMTP id s62so797835pgc.0 for ; Wed, 03 May 2017 17:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=+4Icp+M0RQj6v24329W16eXLptpcG7P4F8rWNRb6XDQ=; b=iWmRMv5tUVnW8NqWRY8QxIoY8ybo4n47lLq2/aFrK1NpiC39mYYVHkbX6aMOlNJPRc OppRRy6Le1vbZBCWMQdkLwBZ+Z0Mb6HcaxO22qYPLWuzDFDCbuISVuhn/n6zur7cTZij nYzjKtUZk4F6n5LGK8EUdUhEzkRiZOh2rQinQBBFBYwTEHi4SXc4PcJL/Q7ZsY4Cc7No o8kXFM72hbEu1eX9DYe+gGtYXO0MJgcPhNBUV7yUfVEQOp6o7b60yeVeAKtQauZyqIuC n3oL+JTFL3VRbXNM1bqTaLvp3vX0o5WFZc/d5gMyl4xcgyv9wsYzfLcO3+sKGgghUkYB 0M4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=+4Icp+M0RQj6v24329W16eXLptpcG7P4F8rWNRb6XDQ=; b=MKsT/uD7+PSXJWnxPLrtDkiaguEOdEyUFuz0RxOvHPpUEJLo/CGG+x2GCfkeJ5sXMU wrBpAXI/pXKnHElNFnEOXo3VJnEZhQNCDSXDB2MVroIO6F4MfZR8sC9metvR2IY0A2oN KQnKCQAeuRDl1tztT3r/s7lXewW8xjTrjVEvLPBxuD0aFs8dDd0pWJ5LDyZxEgPnfMCI msj5XZjnv+FlT0IHR0T7EPC/lsnDXMDMPNCl5NoeFjAs6Ca2BYhLfQrlG7TgmrxmAu2G TXSceh77Hgyj3kcy/wZe7Y1z8EXr10EoRz5RgmUmf8hp3vm7AzWR9sbaX8Q3AbBu/Wqq ew9Q== X-Gm-Message-State: AN3rC/7my32D7FgvMWFA1fB0wfO+6tOOfyYZPRnEit4Ty1uSlUd9BT4M GogZ6nWGpvbaYHZ/ X-Received: by 10.99.60.21 with SMTP id j21mr27406914pga.99.1493859238794; Wed, 03 May 2017 17:53:58 -0700 (PDT) Received: from localhost (z209.124-44-183.ppp.wakwak.ne.jp. [124.44.183.209]) by smtp.gmail.com with ESMTPSA id o62sm506804pfj.87.2017.05.03.17.53.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2017 17:53:58 -0700 (PDT) From: Stafford Horne To: QEMU Development Date: Thu, 4 May 2017 09:53:21 +0900 Message-Id: <4597992f624c015ceb51fedb4628b3fdb1e5bbaa.1493858877.git.shorne@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PULL v2 06/11] migration: Add VMSTATE_UINTTL_2DARRAY() 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: Stefan Hajnoczi , Stafford Horne Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP In openRISC we are implementing the shadow registers as a 2d array. Using this target long method rather than direct 32-bit alternatives is consistent with the rest of our vm state serialization logic. Signed-off-by: Stafford Horne --- include/migration/cpu.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/migration/cpu.h b/include/migration/cpu.h index f3d5dfc..a40bd35 100644 --- a/include/migration/cpu.h +++ b/include/migration/cpu.h @@ -18,6 +18,8 @@ VMSTATE_UINT64_EQUAL_V(_f, _s, _v) #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v) \ VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v) +#define VMSTATE_UINTTL_2DARRAY_V(_f, _s, _n1, _n2, _v) \ + VMSTATE_UINT64_2DARRAY_V(_f, _s, _n1, _n2, _v) #define VMSTATE_UINTTL_TEST(_f, _s, _t) \ VMSTATE_UINT64_TEST(_f, _s, _t) #define vmstate_info_uinttl vmstate_info_uint64 @@ -37,6 +39,8 @@ VMSTATE_UINT32_EQUAL_V(_f, _s, _v) #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v) \ VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v) +#define VMSTATE_UINTTL_2DARRAY_V(_f, _s, _n1, _n2, _v) \ + VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, _v) #define VMSTATE_UINTTL_TEST(_f, _s, _t) \ VMSTATE_UINT32_TEST(_f, _s, _t) #define vmstate_info_uinttl vmstate_info_uint32 @@ -48,5 +52,8 @@ VMSTATE_UINTTL_EQUAL_V(_f, _s, 0) #define VMSTATE_UINTTL_ARRAY(_f, _s, _n) \ VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, 0) +#define VMSTATE_UINTTL_2DARRAY(_f, _s, _n1, _n2) \ + VMSTATE_UINTTL_2DARRAY_V(_f, _s, _n1, _n2, 0) + #endif