Received: from eggs.gnu.org ([2001:4830:134:3::10]:44888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmmQF-00010U-C0 for qemu-devel@nongnu.org; Mon, 27 Apr 2015 13:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmmQB-0000iA-Tr for qemu-devel@nongnu.org; Mon, 27 Apr 2015 13:02:19 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:59073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmmQB-0000hy-GA for qemu-devel@nongnu.org; Mon, 27 Apr 2015 13:02:15 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Apr 2015 18:02:14 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 888781B0804B for ; Mon, 27 Apr 2015 18:02:49 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3RH2AEd6619618 for ; Mon, 27 Apr 2015 17:02:10 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3RBuOgg003390 for ; Mon, 27 Apr 2015 07:56:24 -0400 Date: Mon, 27 Apr 2015 19:02:07 +0200 From: Cornelia Huck Message-ID: <20150427190207.0b38aaa5.cornelia.huck@de.ibm.com> In-Reply-To: <553E5277.2000504@suse.de> References: <1429257161-29597-1-git-send-email-cornelia.huck@de.ibm.com> <1429257161-29597-2-git-send-email-cornelia.huck@de.ibm.com> <55369FC2.1090508@suse.de> <20150422102501.406fc113.cornelia.huck@de.ibm.com> <55376680.3070601@suse.de> <20150422134053.262405e2.cornelia.huck@de.ibm.com> <0B8264E8-159A-4DCB-AEE2-28EBC4504B80@suse.de> <20150424110730.1e9bcc77.cornelia.huck@de.ibm.com> <553E4030.7060509@suse.de> <20150427161926.6bf5d203.cornelia.huck@de.ibm.com> <553E5277.2000504@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/6] s390x/virtio-ccw: enable has_dynamic_sysbus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: Alexander Graf , "qemu-devel@nongnu.org" , "armbru@redhat.com" , "mdroth@linux.vnet.ibm.com" , "lcapitulino@redhat.com" , "borntraeger@de.ibm.com" , "jfrei@linux.vnet.ibm.com" , Xu Wang On Mon, 27 Apr 2015 17:15:03 +0200 Andreas F=C3=A4rber wrote: > Am 27.04.2015 um 16:19 schrieb Cornelia Huck: > > On Mon, 27 Apr 2015 15:57:04 +0200 > > Alexander Graf wrote: > >> On 04/24/2015 11:07 AM, Cornelia Huck wrote: > >>> On Wed, 22 Apr 2015 14:21:36 +0200 > >>> Alexander Graf wrote: > >>>>> Am 22.04.2015 um 13:40 schrieb Cornelia Huck : > >>>>> On Wed, 22 Apr 2015 11:14:40 +0200 > >>>>> Alexander Graf wrote: > >>>>>>> On 04/22/2015 10:25 AM, Cornelia Huck wrote: > >>>>>>> On Tue, 21 Apr 2015 21:06:42 +0200 > >>>>>>> Alexander Graf wrote: > >>>>>>>>> On 04/17/2015 09:52 AM, Cornelia Huck wrote: > >>>>>>>>> From: Xu Wang > >>>>>>>>> > >>>>>>>>> We have to enable this flag to support dynamically adding devic= es to the > >>>>>>>>> sysbus. This change is needed for the the upcoming diag288 watc= hdog. > >>>>>>>> s390 doesn't have a "sysbus" per se. Please create a new bus typ= e. > >>>>>>> So what's wrong with the sysbus? I don't see why we should be dif= ferent > >>>>>>> than everyone else. > >>>>>> The idea behind sysbus is that you have MMIO, PIO and IRQ pins > >>>>>> connecting to a PIC. It provides a lot of infrastructure for those > >>>>>> interfaces. S390 doesn't use any of them and instead wants registr= ation > >>>>>> on "diag" interfaces for example which I'd put on the same layer a= s PIO > >>>>>> or MMIO registration. > >>>>> I don't think a "diag" bus makes sense. > >>>> You don't need a bus necessarily, just a parent class. > >>>> > >>>>> The individual diagnoses are > >>>>> way too heterogenous beyond the fact that they use the same base > >>>>> instruction. > >>>>> > >>>>> So where's the proper place for "misc" devices? My impression was t= hat > >>>>> they can go on the sysbus. > >>>>> > >>>> If you really don't want to create your own class, how about you inh= erit from the DeviceState class? > >>> I tried that for the watchdog, and it certainly works, but some things > >>> end up odd: > >>> > >>> - in 'info qtree', the watchdog device does not show up at all > >> > >> Please try "info qom-tree". Andreas also has a patch outstanding that= =20 > >> shows properties along the way with a verbose switch. > >=20 > > While it does show up in info qom-tree, is hiding it from info qtree a > > good idea? I'd think that it is still widely used. >=20 > That's why I proposed to drop info qtree, so that people no longer > mistakenly use it and do weird designs because of it. But there was > opposition to it and its incomplete replacements at the time - in 2.3 we > at least have the qom-tree display and an external qom-tree script to > display all the properties. >=20 > In the end, the bus view and the composition view complement each other > as long as we can't or don't want to get rid of qbuses completely. >=20 > >>> - in the list of devices printed by "-device help", diag288 is now the > >>> only device without any bus > >> > >> But it's not attached to a bus, so that's reasonable, no? > >=20 > > Hm. Are there bus-less devices on other platforms? >=20 > Take a look at the recent APIC patches, it's being converted from an ICC > bus (for making hot-add work at the time) to bus-less device. >=20 > PCMCIA is a bus-less device already IIRC. I'll take a look. >=20 > Just search for .parent =3D TYPE_DEVICE. :) >=20 > >>> I would have thought that any device not attached to a specialized bus > >>> should end up on the main system bus, which brings me back to adding = it > >>> as a sysbus device ;) > >> > >> Not really, sysbus is QEMU's wording for what Linux calls "platform=20 > >> bus". It's where devices go to that are attached to MMIO/PIO/IRQ lines= =20 > >> via some fabric that we don't model. > >=20 > > But in practice sysbus seems to be more like a catch-all: On s390x, > > there are already things like the flic, various sclp-related devices, > > the virtio bridges or the ipl device sitting on the sysbus. Should they > > really be thrown out from the sysbus and dangle as bus-less devices? I > > think there is a case to be made for a catch-all bus, even if it is not > > the sysbus. >=20 > There's a difference between "dangling" and SysBus. There cannot be > dangling QOM objects - that's part of the ongoing CPU discussion we're > having (and that people seem to keep forgetting). They need to have a > parent, i.e. a child<> property leading to them, recursively forming a > canonical path. Internal devices are usually dangling and that is > currently being caught be placing them in /machine/unattached at > realization time - much too late. Devices added via -device or > device_add are never dangling as they are placed in /machine/peripheral > or /machine/peripheral-anon. A better question is whether that is > actually desired for your PV devices or whether it should just be a > -machine option that enabled a device sitting on /machine directly or > wherever sensible. Having the devices we currently have on the sysbus controlled via machine options does not quite feel right to me at a first glance. Placing them as "peripheral" somehow does not feel quite right either, but that seems to be what we get from making it a device. I think I'll try the s390 platform bus first. But should we perhaps have something like /machine/infrastructure or so?