From patchwork Thu Mar 10 11:33:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 86234 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1D205B6ED0 for ; Thu, 10 Mar 2011 22:44:24 +1100 (EST) Received: from localhost ([127.0.0.1]:56715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxeI1-0004PS-Ao for incoming@patchwork.ozlabs.org; Thu, 10 Mar 2011 06:44:21 -0500 Received: from [140.186.70.92] (port=34445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pxe8H-0007ng-7H for qemu-devel@nongnu.org; Thu, 10 Mar 2011 06:34:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pxe8F-0004ru-9X for qemu-devel@nongnu.org; Thu, 10 Mar 2011 06:34:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pxe8F-0004rO-0u for qemu-devel@nongnu.org; Thu, 10 Mar 2011 06:34:15 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2ABYEei013927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Mar 2011 06:34:14 -0500 Received: from trasno.mitica ([10.3.113.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2ABY2pQ005382; Thu, 10 Mar 2011 06:34:13 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Thu, 10 Mar 2011 12:33:55 +0100 Message-Id: <282320e67ec7a7bb98f4cab7e8ef536186eda425.1299756608.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 8/9] vmstate: be able to store/save a pci device from a pointer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- hw/hw.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 9df1c2c..4e09f18 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -629,6 +629,14 @@ extern const VMStateDescription vmstate_pci_device; .offset = vmstate_offset_value(_state, _field, PCIDevice), \ } +#define VMSTATE_PCI_DEVICE_POINTER(_field, _state) { \ + .name = (stringify(_field)), \ + .size = sizeof(PCIDevice), \ + .vmsd = &vmstate_pci_device, \ + .flags = VMS_STRUCT|VMS_POINTER, \ + .offset = vmstate_offset_pointer(_state, _field, PCIDevice), \ +} + extern const VMStateDescription vmstate_pcie_device; #define VMSTATE_PCIE_DEVICE(_field, _state) { \