From patchwork Thu Jan 3 14:52:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fred.konrad@greensocs.com X-Patchwork-Id: 209273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E4BA22C0085 for ; Fri, 4 Jan 2013 02:22:50 +1100 (EST) Received: from localhost ([::1]:35416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqmAt-0001cn-Jf for incoming@patchwork.ozlabs.org; Thu, 03 Jan 2013 09:53:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqmAC-0008CY-Dt for qemu-devel@nongnu.org; Thu, 03 Jan 2013 09:52:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqmAB-0005UU-7R for qemu-devel@nongnu.org; Thu, 03 Jan 2013 09:52:56 -0500 Received: from greensocs.com ([87.106.252.221]:53349 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqmAA-0005TH-Js for qemu-devel@nongnu.org; Thu, 03 Jan 2013 09:52:55 -0500 Received: from localhost (unknown [127.0.0.1]) by s15328186.onlinehome-server.info (Postfix) with ESMTP id 0F566439E3B; Thu, 3 Jan 2013 14:52:54 +0000 (UTC) Received: from s15328186.onlinehome-server.info ([127.0.0.1]) by localhost (s15328186.onlinehome-server.info [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NyWhK1WqSU7T; Thu, 3 Jan 2013 15:52:53 +0100 (CET) Received: by s15328186.onlinehome-server.info (Postfix, from userid 491) id B99A9439E38; Thu, 3 Jan 2013 15:52:53 +0100 (CET) Received: from compaq.katmai.xl.cx.katmai.xl.cx (lan31-11-83-155-143-136.fbx.proxad.net [83.155.143.136]) by s15328186.onlinehome-server.info (Postfix) with ESMTPSA id 8C80C439E3B; Thu, 3 Jan 2013 15:52:52 +0100 (CET) From: fred.konrad@greensocs.com To: qemu-devel@nongnu.org Date: Thu, 3 Jan 2013 15:52:19 +0100 Message-Id: <1357224744-14443-8-git-send-email-fred.konrad@greensocs.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1357224744-14443-1-git-send-email-fred.konrad@greensocs.com> References: <1357224744-14443-1-git-send-email-fred.konrad@greensocs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 87.106.252.221 Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, e.voevodin@samsung.com, mark.burton@greensocs.com, agraf@suse.de, stefanha@redhat.com, cornelia.huck@de.ibm.com, afaerber@suse.de, fred.konrad@greensocs.com Subject: [Qemu-devel] [RFC V9 07/12] virtio-s390-device : create a virtio-s390-bus during init. 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: KONRAD Frederic A virtio-s390-bus is created during the init. So one VirtIODevice can be connected on the virtio-s390-device through this bus. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 2 ++ hw/s390-virtio-bus.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index 67ecb3a..4e8471b 100644 --- a/hw/s390-virtio-bus.c +++ b/hw/s390-virtio-bus.c @@ -489,6 +489,8 @@ static int s390_virtio_busdev_init(DeviceState *dev) VirtIOS390Device *_dev = (VirtIOS390Device *)dev; VirtIOS390DeviceClass *_info = VIRTIO_S390_DEVICE_GET_CLASS(dev); + _dev->bus = virtio_s390_bus_new(_dev); + return _info->init(_dev); } diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index d5a6f9b..c585888 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-bus.h @@ -92,6 +92,7 @@ struct VirtIOS390Device { virtio_net_conf net; VirtIOSCSIConf scsi; VirtIORNGConf rng; + VirtioBusState *bus; }; typedef struct VirtIOS390Bus {