From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLkn-000465-Lm for qemu-devel@nongnu.org; Tue, 05 Jul 2016 04:30:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKLkj-0003jY-VD for qemu-devel@nongnu.org; Tue, 05 Jul 2016 04:30:48 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9775 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLkj-0003jO-PW for qemu-devel@nongnu.org; Tue, 05 Jul 2016 04:30:45 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u658SrmD081033 for ; Tue, 5 Jul 2016 04:30:43 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 23x6hxjjsg-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 05 Jul 2016 04:30:43 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Jul 2016 02:30:42 -0600 References: <20160705075628.6203-1-cornelia.huck@de.ibm.com> <20160705075628.6203-8-cornelia.huck@de.ibm.com> From: Jing Liu Date: Tue, 5 Jul 2016 16:30:35 +0800 MIME-Version: 1.0 In-Reply-To: <20160705075628.6203-8-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <577B702B.4060108@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH for-2.7 7/8] s390x/css: Factor out virtual css bridge and bus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, agraf@suse.de, jfrei@linux.vnet.ibm.com Dear Conny, On 07/05/2016 03:56 PM, Cornelia Huck wrote: > + > +static const TypeInfo virtual_css_bridge_info = { > + .name = TYPE_VIRTUAL_CSS_BRIDGE, > + .parent = TYPE_SYS_BUS_DEVICE, > + .instance_size = sizeof(SysBusDevice), So we do not use VirtualCssBridge macro which includes max_queue for 2.7? Just curious that in this way, how to deal with the compat for 2.6, 2.5 ...? Jing > + .class_init = virtual_css_bridge_class_init, > + .interfaces = (InterfaceInfo[]) { > + { TYPE_HOTPLUG_HANDLER }, > + { } > + } > +}; > - > -static const TypeInfo virtual_css_bridge_info = { > - .name = TYPE_VIRTUAL_CSS_BRIDGE, > - .parent = TYPE_SYS_BUS_DEVICE, > - .instance_size = sizeof(SysBusDevice), > - .class_init = virtual_css_bridge_class_init, > - .interfaces = (InterfaceInfo[]) { > - { TYPE_HOTPLUG_HANDLER }, > - { } > - } > -}; > - > /* virtio-ccw-bus */ > > > -/* virtual css bridge type */ > -#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge" > - > -/* virtual css bus type */ > -typedef struct VirtualCssBus { > - BusState parent_obj; > -} VirtualCssBus; > - > -#define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus" > -#define VIRTUAL_CSS_BUS(obj) \ > - OBJECT_CHECK(VirtualCssBus, (obj), TYPE_VIRTUAL_CSS_BUS) > +void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev, > + DeviceState *dev, Error **errp); > > /* virtio-scsi-ccw */ > > @@ -192,7 +183,6 @@ typedef struct VirtIORNGCcw { > VirtIORNG vdev; > } VirtIORNGCcw; > > -VirtualCssBus *virtual_css_bus_init(void); > void virtio_ccw_device_update_status(SubchDev *sch); > VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch); > > diff --git a/include/hw/s390x/css-bridge.h b/include/hw/s390x/css-bridge.h > new file mode 100644 > index 0000000..ad73c1f > --- /dev/null > +++ b/include/hw/s390x/css-bridge.h > @@ -0,0 +1,31 @@ > +/* > + * virtual css bridge definition > + * > + * Copyright 2012,2016 IBM Corp. > + * Author(s): Cornelia Huck > + * Pierre Morel > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or (at > + * your option) any later version. See the COPYING file in the top-level > + * directory. > + */ > + > +#ifndef HW_S390X_CSS_BRIDGE_H > +#define HW_S390X_CSS_BRIDGE_H > +#include "qom/object.h" > +#include "hw/qdev-core.h" > + > +/* virtual css bridge */ > +#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge" > + > +/* virtual css bus type */ > +typedef struct VirtualCssBus { > + BusState parent_obj; > +} VirtualCssBus; > + > +#define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus" > +#define VIRTUAL_CSS_BUS(obj) \ > + OBJECT_CHECK(VirtualCssBus, (obj), TYPE_VIRTUAL_CSS_BUS) > +VirtualCssBus *virtual_css_bus_init(void); > + > +#endif >