From patchwork Fri May 5 17:35:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Halil Pasic X-Patchwork-Id: 759119 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wKJw364Bqz9s7k for ; Sat, 6 May 2017 03:36:03 +1000 (AEST) Received: from localhost ([::1]:48312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6h97-000133-6R for incoming@patchwork.ozlabs.org; Fri, 05 May 2017 13:36:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6h8W-00011x-SD for qemu-devel@nongnu.org; Fri, 05 May 2017 13:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6h8V-0005Ih-Ri for qemu-devel@nongnu.org; Fri, 05 May 2017 13:35:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6h8V-0005ID-Il for qemu-devel@nongnu.org; Fri, 05 May 2017 13:35:23 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v45HXwkp123420 for ; Fri, 5 May 2017 13:35:22 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2a8k777faj-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 05 May 2017 13:35:22 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 May 2017 18:35:19 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 5 May 2017 18:35:17 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v45HZGXA39059618; Fri, 5 May 2017 17:35:16 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97EFFAE058; Fri, 5 May 2017 18:33:42 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A9F1AE04D; Fri, 5 May 2017 18:33:42 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 5 May 2017 18:33:42 +0100 (BST) From: Halil Pasic To: Cornelia Huck Date: Fri, 5 May 2017 19:35:01 +0200 X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170505173507.74077-1-pasic@linux.vnet.ibm.com> References: <20170505173507.74077-1-pasic@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17050517-0016-0000-0000-00000493B816 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17050517-0017-0000-0000-0000278A805A Message-Id: <20170505173507.74077-5-pasic@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-05-05_14:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705050172 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 04/10] s390x/css: add vmstate macro for CcwDevice 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: qemu-devel@nongnu.org, Halil Pasic , "Dr. David Alan Gilbert" , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As a preparation for switching to a vmstate based migration let us introduce a vmstate macro for CcwDevice. No changes in behavior, we just added some dead code -- which should rise to life soon. Signed-off-by: Halil Pasic Reviewed-by: Guenther Hutzl --- hw/s390x/ccw-device.c | 10 ++++++++++ hw/s390x/ccw-device.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index fb8d640..f9bfa15 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -50,6 +50,16 @@ static void ccw_device_class_init(ObjectClass *klass, void *data) dc->props = ccw_device_properties; } +const VMStateDescription vmstate_ccw_dev = { + .name = "s390_ccw_dev", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_STRUCT_POINTER(sch, CcwDevice, vmstate_subch_dev, SubchDev), + VMSTATE_END_OF_LIST() + } +}; + static const TypeInfo ccw_device_info = { .name = TYPE_CCW_DEVICE, .parent = TYPE_DEVICE, diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h index 89c8e5d..4e6af28 100644 --- a/hw/s390x/ccw-device.h +++ b/hw/s390x/ccw-device.h @@ -27,6 +27,10 @@ typedef struct CcwDevice { CssDevId subch_id; } CcwDevice; +extern const VMStateDescription vmstate_ccw_dev; +#define VMSTATE_CCW_DEVICE(_field, _state) \ + VMSTATE_STRUCT(_field, _state, 1, vmstate_ccw_dev, CcwDevice) + typedef struct CCWDeviceClass { DeviceClass parent_class; void (*unplug)(HotplugHandler *, DeviceState *, Error **);