From: Jing Liu <liujbjl@linux.vnet.ibm.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>, qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com, agraf@suse.de, jfrei@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH for-2.7 7/8] s390x/css: Factor out virtual css bridge and bus
Date: Tue, 5 Jul 2016 16:30:35 +0800 [thread overview]
Message-ID: <577B702B.4060108@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160705075628.6203-8-cornelia.huck@de.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 <cornelia.huck@de.ibm.com>
> + * Pierre Morel <pmorel@linux.vnet.ibm.com>
> + *
> + * 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
>
next prev parent reply other threads:[~2016-07-05 8:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 7:56 [Qemu-devel] [PATCH for-2.7 0/8] More s390x patches for 2.7 Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 1/8] pc-bios/s390-ccw: Pass selected SCSI device to IPL Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 2/8] pc-bios/s390-ccw.img: rebuild image Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 3/8] s390x/ipl: Support IPL from selected SCSI device Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 4/8] s390x/ipl: fix reboots for migration from different bios Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 5/8] s390x/css: factor out some generic code from virtio_ccw_device_realize() Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 6/8] s390x/css: use define for "virtual-css-bridge" literal Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 7/8] s390x/css: Factor out virtual css bridge and bus Cornelia Huck
2016-07-05 8:30 ` Jing Liu [this message]
2016-07-05 12:14 ` Cornelia Huck
2016-07-05 7:56 ` [Qemu-devel] [PATCH for-2.7 8/8] s390x/css: Unplug handler of virtual css bridge Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=577B702B.4060108@linux.vnet.ibm.com \
--to=liujbjl@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.