From patchwork Sat Feb 8 15:57:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24357 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1977C20967 for ; Sat, 8 Feb 2014 16:03:21 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id 131sf5770048ykp.1 for ; Sat, 08 Feb 2014 08:03:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=PAOe17+cF4PbTHsSGz+rwfwwGxjzEToLcD2aLKZjtOM=; b=XpBGBBHDr2QefLRxF8m9nCRMJCB+yhnKA4SgtP56NcBHv4IIq/Def51i1XU+KJXanf jn7xJlwH8jPqNylqSfC1gJzul2h6PhKngijfsATSXGeg0Zj3CxpdjpkFQ0YnO7fNk5Oc Lxcrg/5ZBeiHDQMOLzKA2p11jXVhSm2pePXTsops6sfPNJOQZ8dN+E9oGJGC+fBt6h9Y 3l/G/Agxg/IotQxO9Mtvld4mfkHMkoHe/O7T8dU7XHWVHnEKMtTXajAKS+nTdS8bzVTF zimY0RMDs77G3OXA5SP/2gDqjbYNLT8yJR68vt/07yEs4q8Jq7Ojb7yk2HJRSC5xztmr nsEQ== X-Gm-Message-State: ALoCoQnZ8h+LJR9wM0TMzq28Tz0KtBYgV3b0posVC7Zrnhk5+PIN1DIOCQonB6vm+35YyIAqeT6I X-Received: by 10.224.55.19 with SMTP id s19mr8311021qag.0.1391875401233; Sat, 08 Feb 2014 08:03:21 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.212 with SMTP id p78ls1469486qgd.10.gmail; Sat, 08 Feb 2014 08:03:21 -0800 (PST) X-Received: by 10.220.67.18 with SMTP id p18mr4896542vci.14.1391875401096; Sat, 08 Feb 2014 08:03:21 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id cy15si2631008veb.30.2014.02.08.08.03.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Feb 2014 08:03:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so3641914veb.25 for ; Sat, 08 Feb 2014 08:03:21 -0800 (PST) X-Received: by 10.52.251.232 with SMTP id zn8mr307415vdc.41.1391875401040; Sat, 08 Feb 2014 08:03:21 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp40508vcz; Sat, 8 Feb 2014 08:03:20 -0800 (PST) X-Received: by 10.140.47.101 with SMTP id l92mr30717611qga.9.1391875400406; Sat, 08 Feb 2014 08:03:20 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g48si6137454qge.183.2014.02.08.08.03.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 08 Feb 2014 08:03:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:47027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAND-0006m5-VA for patch@linaro.org; Sat, 08 Feb 2014 11:03:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAIe-0007rX-AE for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCAIZ-00030B-Lw for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:36 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:45684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAIZ-0002tl-GG for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:31 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WCAI9-0003Lc-Hn; Sat, 08 Feb 2014 15:58:05 +0000 From: Peter Maydell To: Anthony Liguori Date: Sat, 8 Feb 2014 15:57:53 +0000 Message-Id: <1391875084-12772-19-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> References: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 18/29] vmstate: Add uint32 2D-array support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Christoffer Dall Add support for saving VMState of 2D arrays of uint32 values. Reviewed-by: Peter Maydell Signed-off-by: Christoffer Dall Signed-off-by: Peter Maydell --- include/migration/vmstate.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index fbd16a0..ded8e23 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -656,9 +656,15 @@ extern const VMStateInfo vmstate_info_bitmap; #define VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v) \ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint32, uint32_t) +#define VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, _v) \ + VMSTATE_2DARRAY(_f, _s, _n1, _n2, _v, vmstate_info_uint32, uint32_t) + #define VMSTATE_UINT32_ARRAY(_f, _s, _n) \ VMSTATE_UINT32_ARRAY_V(_f, _s, _n, 0) +#define VMSTATE_UINT32_2DARRAY(_f, _s, _n1, _n2) \ + VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, 0) + #define VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v) \ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint64, uint64_t)