From patchwork Sun Apr 23 22:40:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 9695321 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 985EF601AE for ; Sun, 23 Apr 2017 22:47:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A678620881 for ; Sun, 23 Apr 2017 22:47:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B37122701; Sun, 23 Apr 2017 22:47:26 +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 3996220881 for ; Sun, 23 Apr 2017 22:47:26 +0000 (UTC) Received: from localhost ([::1]:40853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2QHt-0004ie-EJ for patchwork-qemu-devel@patchwork.kernel.org; Sun, 23 Apr 2017 18:47:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2QC8-0000XQ-A7 for qemu-devel@nongnu.org; Sun, 23 Apr 2017 18:41:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2QC7-0000Th-9i for qemu-devel@nongnu.org; Sun, 23 Apr 2017 18:41:28 -0400 Received: from mail-it0-x244.google.com ([2607:f8b0:4001:c0b::244]:33562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2QC7-0000TA-3H for qemu-devel@nongnu.org; Sun, 23 Apr 2017 18:41:27 -0400 Received: by mail-it0-x244.google.com with SMTP id z67so11956163itb.0 for ; Sun, 23 Apr 2017 15:41:26 -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=Ir25NzxCp/nzdqYo0LjtTWCZ+L8LwHVurT2FW8+GdST/xKEZJWWvMIieD8umYappj8 6w+m1lfRZD3GRk4rLyTlIfbkBtmhdhR38Gk4Y6ZY8qu9kICxaYi+n3+5D49GuPTebK6K XB71IREJJolmw23SFcbKftLTY8reE0e+Gi83VERtKcwRIAYezLfFARxcQt+IYEGlegaf jlvv+EBOI2haMKLAo/pBJuUPSxx1sZKNzNd3kedxKQT6GoV/aZYjXNwxkKaUKk44uEvW qmPt+VwMVIAWeBj3urFIpiXG75hDj9iHvouze2CQVZqZAENmPRaZJZskAUoZg0+eU2pu hlZw== 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=jUnCJsH1B2Syxo4iT/enrQK7un3VZE12DuK15yrghXORvc7SsVDkIuK7L6H3WEQlF9 mPuci0QCjg5Sqqlhk1TFwhXHJI+AI7Xk8Wch/E4Ee2F+CfSB7jNfUqvem1muaQC1HiiB TC+Jzkw9/2Dqau7lISTunn7teY5DhVN4Sz7Fa2EvNCLeDiI0nnVZH4KZK7Q1Q0c76KgZ lM6Pcmmgut+LckGgTglBs2drvNzuXRx7fIQAubxfTZ3eELqwBVt2b0B5+MjCxXbecKTe DEjpX/wCvbOZyH+5kd9w7FNi0ZXkd2qQaHS5Qu3v7u3DFrBAGeNrU25LBHMBMmAAQkS0 kaSQ== X-Gm-Message-State: AN3rC/7NW6zF1TMWlXAzUVKhFz6GN19Pouz5XaYw0xCMV9KjmhTXYMkT 6JtUn3BVJeYf4A== X-Received: by 10.99.166.18 with SMTP id t18mr15675225pge.109.1492987286371; Sun, 23 Apr 2017 15:41:26 -0700 (PDT) Received: from localhost (z64.124-44-184.ppp.wakwak.ne.jp. [124.44.184.64]) by smtp.gmail.com with ESMTPSA id f124sm26911647pgc.43.2017.04.23.15.41.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Apr 2017 15:41:25 -0700 (PDT) From: Stafford Horne To: QEMU Development Date: Mon, 24 Apr 2017 07:40:53 +0900 Message-Id: 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:4001:c0b::244 Subject: [Qemu-devel] [PATCH v2 5/9] 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: Stafford Horne , Openrisc , "Tim \\'mithro\\' Ansell" 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