From nobody Sun May 5 08:25:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1494016771071486.15836124486907; Fri, 5 May 2017 13:39:31 -0700 (PDT) Received: from localhost ([::1]:48946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6k0e-0001b3-Om for importer@patchew.org; Fri, 05 May 2017 16:39:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6jy1-0007uV-Db for qemu-devel@nongnu.org; Fri, 05 May 2017 16:36:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6jy0-0006c2-Gy for qemu-devel@nongnu.org; Fri, 05 May 2017 16:36:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6jxt-0006YY-Gv; Fri, 05 May 2017 16:36:37 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF3404E4D9; Fri, 5 May 2017 20:36:35 +0000 (UTC) Received: from localhost (ovpn-116-28.gru2.redhat.com [10.97.116.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADCC67A419; Fri, 5 May 2017 20:36:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BF3404E4D9 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BF3404E4D9 Date: Fri, 5 May 2017 17:36:20 -0300 From: Eduardo Habkost To: Cornelia Huck Message-ID: <20170505203620.GN3482@thinpad.lan.raisama.net> References: <20170503203604.31462-1-ehabkost@redhat.com> <20170503203604.31462-3-ehabkost@redhat.com> <20170505093622.37902dea.cornelia.huck@de.ibm.com> <20170505165419.GF3482@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170505165419.GF3482@thinpad.lan.raisama.net> X-Fnord: you can see the fnord User-Agent: Mutt/1.8.0 (2017-02-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 05 May 2017 20:36:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] fixup! sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE 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: Peter Maydell , Yi Min Zhao , "Michael S. Tsirkin" , Jason Wang , Pierre Morel , qemu-devel@nongnu.org, Markus Armbruster , Gerd Hoffmann , "Edgar E. Iglesias" , Rob Herring , sstabellini@kernel.org, qemu-block@nongnu.org, Alexander Graf , Christian Borntraeger , Shannon Zhao , Marcel Apfelbaum , Richard Henderson , Laszlo Ersek , Kevin Wolf , Thomas Huth , "Gabriel L . Somlo" , Alistair Francis , Beniamino Galvani , Alex Williamson , qemu-arm@nongnu.org, Paolo Bonzini , John Snow , David Gibson , Juergen Gross , Frank Blaschka , Prasad J Pandit , Max Reitz , qemu-ppc@nongnu.org, Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Fri, May 05, 2017 at 01:54:19PM -0300, Eduardo Habkost wrote: > On Fri, May 05, 2017 at 09:36:22AM +0200, Cornelia Huck wrote: > [...] > > > diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c > > > index c0f560b289..6a2eec8dd0 100644 > > > --- a/hw/core/sysbus.c > > > +++ b/hw/core/sysbus.c > > > @@ -326,6 +326,17 @@ static void sysbus_device_class_init(ObjectClass= *klass, void *data) > > > DeviceClass *k =3D DEVICE_CLASS(klass); > > > k->init =3D sysbus_device_init; > > > k->bus_type =3D TYPE_SYSTEM_BUS; > > > + /* > > > + * device_add plugs devices into suitable bus. For "real" buses, > >=20 > > s/suitable/a suitable/ >=20 > Thanks, I will fix it. >=20 > >=20 > > > + * that actually connects the device. For sysbus, the connectio= ns > > > + * need to be made separately, and device_add can't do that. The > > > + * device would be left unconnected, and will probably not work > > > + * > > > + * However, a few machines and a few devices can handle a few sy= sbus > > > + * devices. In this case, the device subclass needs to override > >=20 > > Should that rather be "a few machines can handle a few specific sysbus > > devices"? >=20 > I will extend it to "a few machines can handle device_add for a > few specific sysbus devices". Thanks for spotting it. Fixup will be included in v3, or can be applied by maintainer: Signed-off-by: Eduardo Habkost --- hw/core/sysbus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 6a2eec8dd0..5d0887f499 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -327,14 +327,14 @@ static void sysbus_device_class_init(ObjectClass *kla= ss, void *data) k->init =3D sysbus_device_init; k->bus_type =3D TYPE_SYSTEM_BUS; /* - * device_add plugs devices into suitable bus. For "real" buses, + * device_add plugs devices into a suitable bus. For "real" buses, * that actually connects the device. For sysbus, the connections * need to be made separately, and device_add can't do that. The * device would be left unconnected, and will probably not work * - * However, a few machines and a few devices can handle a few sysbus - * devices. In this case, the device subclass needs to override - * it and set user_creatable=3Dtrue. + * However, a few machines can handle device_add/-device with + * a few specific sysbus devices. In those cases, the device + * subclass needs to override it and set user_creatable=3Dtrue. */ k->user_creatable =3D false; } --=20 2.11.0.259.g40922b1