From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778456; cv=none; d=zohomail.com; s=zohoarc; b=OoIGYI6klorqwQbC/yu+DZPIW+DMDFGvJyX2H2du/8ZIFjcpCZCNsFnvpWVeONJ9l/hr6rIm3kk+LOjjy15XJ0u34OibWzBbCdMelbWOnpCgGEX5rU54FP2TDs4kcDgAqgJVpKidqMYlps4hnx2dxY2fcfI+d/7NdY77djxyiq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778456; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eXVMvm1PxSB5tcsPFS9fnNgDrjSKRPK4CNQ0NUGIpCA=; b=j+xIwbsisNoxs979ymKjRuNkvNtQZt+YNHn9IstHdJzc5d+zKsxECnMn/OtK18QGZSm1eAjOhhJjjk2/gfvnCV5hxkcIannMeeqp0S7odfXtnw27wsCsFGKNvPYFiQnPB0vUX24oqt+QeyHKJy1VYSO9EgnGXamMDy6cjXmohGU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778456220473.94284987469064; Sun, 17 May 2020 22:07:36 -0700 (PDT) Received: from localhost ([::1]:47644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaXzy-0005iq-VC for importer@patchew.org; Mon, 18 May 2020 01:07:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwn-0008MG-KA for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:17 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:30654 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwl-0004Jr-Kp for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-MaCBv4BTPiqywP1AHwcE_w-1; Mon, 18 May 2020 01:04:11 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB7051005512; Mon, 18 May 2020 05:04:09 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8DDC5F7EA; Mon, 18 May 2020 05:04:09 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1829911358BD; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eXVMvm1PxSB5tcsPFS9fnNgDrjSKRPK4CNQ0NUGIpCA=; b=EGhWge9BRo+X/7iaGeiK580FPPLYJoxHLLGSzdr4UYUooSEpyntMA40u2Rv9xS+e/2A4wT Epv13FOnJd8GUkQAD2MZusIuW65mErGheRzKf1qvoDpK6XRuxkqdW0KJHUGHBqk+9+W5np mODS3zUXmwiBDtDV9p04ELLTHfqG4Dw= X-MC-Unique: MaCBv4BTPiqywP1AHwcE_w-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 01/24] arm/stm32f405: Fix realization of "stm32f2xx-adc" devices Date: Mon, 18 May 2020 07:03:45 +0200 Message-Id: <20200518050408.4579-2-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , berrange@redhat.com, ehabkost@redhat.com, Alistair Francis , qemu-arm@nongnu.org, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" stm32f405_soc_initfn() creates six such devices, but stm32f405_soc_realize() realizes only one. Affects machine netduinoplus2. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing five of six such devices, yet nobody noticed. Fix stm32f405_soc_realize() to realize all six. Visible in "info qtree": bus: main-system-bus type System dev: stm32f405-soc, id "" cpu-type =3D "cortex-m4-arm-cpu" dev: stm32f2xx-adc, id "" gpio-out "sysbus-irq" 1 - mmio ffffffffffffffff/00000000000000ff + mmio 0000000040012000/00000000000000ff dev: stm32f2xx-adc, id "" gpio-out "sysbus-irq" 1 - mmio ffffffffffffffff/00000000000000ff + mmio 0000000040012000/00000000000000ff dev: stm32f2xx-adc, id "" gpio-out "sysbus-irq" 1 - mmio ffffffffffffffff/00000000000000ff + mmio 0000000040012000/00000000000000ff dev: stm32f2xx-adc, id "" gpio-out "sysbus-irq" 1 - mmio ffffffffffffffff/00000000000000ff + mmio 0000000040012000/00000000000000ff dev: stm32f2xx-adc, id "" gpio-out "sysbus-irq" 1 mmio 0000000040012000/00000000000000ff dev: stm32f2xx-adc, id "" gpio-out "sysbus-irq" 1 - mmio ffffffffffffffff/00000000000000ff + mmio 0000000040012000/00000000000000ff dev: armv7m, id "" The mmio addresses look suspicious. Fixes: 529fc5fd3e18ace8f739afd02dc0953354f39442 Cc: Alistair Francis Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis --- hw/arm/stm32f405_soc.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index 4f10ce6176..4649502711 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -185,16 +185,18 @@ static void stm32f405_soc_realize(DeviceState *dev_so= c, Error **errp) qdev_connect_gpio_out(DEVICE(&s->adc_irqs), 0, qdev_get_gpio_in(armv7m, ADC_IRQ)); =20 - dev =3D DEVICE(&(s->adc[i])); - object_property_set_bool(OBJECT(&s->adc[i]), true, "realized", &err); - if (err !=3D NULL) { - error_propagate(errp, err); - return; + for (i =3D 0; i < STM_NUM_ADCS; i++) { + dev =3D DEVICE(&(s->adc[i])); + object_property_set_bool(OBJECT(&s->adc[i]), true, "realized", &er= r); + if (err !=3D NULL) { + error_propagate(errp, err); + return; + } + busdev =3D SYS_BUS_DEVICE(dev); + sysbus_mmio_map(busdev, 0, ADC_ADDR); + sysbus_connect_irq(busdev, 0, + qdev_get_gpio_in(DEVICE(&s->adc_irqs), i)); } - busdev =3D SYS_BUS_DEVICE(dev); - sysbus_mmio_map(busdev, 0, ADC_ADDR); - sysbus_connect_irq(busdev, 0, - qdev_get_gpio_in(DEVICE(&s->adc_irqs), i)); =20 /* SPI devices */ for (i =3D 0; i < STM_NUM_SPIS; i++) { --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778876; cv=none; d=zohomail.com; s=zohoarc; b=iQSk/cNV6SDsuRl7AC4ipSCm27Il+ZBFBBCU4dUOcB7ClGs6lL3Ak4pSKxc9q/c1KM1hhplFErJfUImkohWcPkALPSXSM96Hu669PFzeXp3YXgnYKXYQrzyJmZdXs3zwct8Ue10M5J9h+5fI8nTZc81HaUiEDbHLmXZsXiGtZ24= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778876; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dTynOku05k030QBAXzjtmPBoO1zSrlKNW32vohlg27w=; b=YJCP/7BamU3p0DJQo4iLVfc96TOJfxupCTR/ADIuMxOdBUI9J2g+JtfW2r7i2B0j5+gPOXSG2mKHZOr5u5HwTsFK13F7S0fP9w0ca7rdG5/8cyqvLJ4dGmOPtyUL3UE0aQNafr0wUClH3AYqooDXhXSsXgdaLlERG+lV3zk8xl8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778876895372.1895860519294; Sun, 17 May 2020 22:14:36 -0700 (PDT) Received: from localhost ([::1]:48988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY6l-00012j-E1 for importer@patchew.org; Mon, 18 May 2020 01:14:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwp-0008PS-Ee for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:19 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:57359 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwl-0004Jk-5e for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-ESUCu2i9PI2aTMHpNAz1oQ-1; Mon, 18 May 2020 01:04:11 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EE9F1800706; Mon, 18 May 2020 05:04:10 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 984958208F; Mon, 18 May 2020 05:04:09 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1B52F11358BE; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dTynOku05k030QBAXzjtmPBoO1zSrlKNW32vohlg27w=; b=QAjsgSNk4zgKAcy2R/EWg6C2anJfAqDZuwoQIkpmyx5rxFkDFg5Bz3XN8Pn7GPoNgSE1Nj Lamk2lljx7KrEuPlGLdbQ9QXd/xPifdmrMzP5hhTzertDBQ5eG/ZVX83Pd+Umel6DPR3qt WR2LqCGf7RMUmO3J/Kyypa4Y4O9JN2s= X-MC-Unique: ESUCu2i9PI2aTMHpNAz1oQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 02/24] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge" Date: Mon, 18 May 2020 07:03:46 +0200 Message-Id: <20200518050408.4579-3-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , berrange@redhat.com, ehabkost@redhat.com, Alistair Francis , qemu-arm@nongnu.org, pbonzini@redhat.com, "Edgar E. Iglesias" , KONRAD Frederic Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" xlnx_dp_init() creates these two devices, but they're never realized. Affects machine xlnx-zcu102. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing these two devices, yet nobody noticed. Fix by realizing them in xlnx_dp_realize(). Fixes: 58ac482a66de09a7590f705e53fc6a3fb8a055e8 Cc: KONRAD Frederic Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- hw/display/xlnx_dp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 3e5fb44e06..bdc229a51e 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -1264,9 +1264,13 @@ static void xlnx_dp_realize(DeviceState *dev, Error = **errp) DisplaySurface *surface; struct audsettings as; =20 + qdev_init_nofail(DEVICE(s->aux_bus->bridge)); + qdev_init_nofail(DEVICE(s->dpcd)); aux_map_slave(AUX_SLAVE(s->dpcd), 0x0000); =20 + qdev_init_nofail(DEVICE(s->edid)); + s->console =3D graphic_console_init(dev, 0, &xlnx_dp_gfx_ops, s); surface =3D qemu_console_surface(s->console); xlnx_dpdma_set_host_data_location(s->dpdma, DP_GRAPHIC_DMA_CHANNEL, --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778342; cv=none; d=zohomail.com; s=zohoarc; b=AtBewKaULUUN5cKzf4N66HuxkWMHDm4wdNa2gbUHyySgfciMenxFDS8HxRAHbym+wCUAW3osiCuglc893hK2fc78qY4FouK5katg83WOCkKEMQWapNpEA1Kyc3n91Rbk4Hgln6yF+kXnfhJQjAoO54mJfmk+Q5cu0X6LcgKP6vI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778342; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xRs+DjLR3Y4rVR+MfxAtvurXdFDZgeO6io8w2miIdIQ=; b=W1NF8i3jV5V8b98VNSPOEN8+tw2IW9SrjQsptovsQuhZVeE2GpfYT1vfQ577DqhbVDZs1FSKIi1SFiTblkW+ChxPXvQKWSWVtS/UjmXnEQTddLWRsQp69r4pMryXXNDwcLst5JxQyH19LVxgGaUiy76rD96eD0qS3HVZvTcRpAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778342596839.4361381526435; Sun, 17 May 2020 22:05:42 -0700 (PDT) Received: from localhost ([::1]:38198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaXy9-0001yJ-5R for importer@patchew.org; Mon, 18 May 2020 01:05:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwl-0008Kn-Jv for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:15 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:37338 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwj-0004JV-WE for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:15 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-2y-88NA9NP-feCjgufqn3w-1; Mon, 18 May 2020 01:04:10 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD9CD872FE0; Mon, 18 May 2020 05:04:09 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F9F3600E5; Mon, 18 May 2020 05:04:09 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1EA3811358BF; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xRs+DjLR3Y4rVR+MfxAtvurXdFDZgeO6io8w2miIdIQ=; b=eYd/3LF1bYUnkWLHp4Lz1KB3MA1GZ5z3/+9TbgH1gYEFS8qzwyMxDyhE4ro3qzCCnkb2EF 1q09iEeYI57RP43Y0nHpW9F/jtTk+JRyuXYzDddERqjSRTfA+unAo8QT4HsNyN6484WtSy HeEP+MhSoMJLwtvFEp5B34ULyiwNML4= X-MC-Unique: 2y-88NA9NP-feCjgufqn3w-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 03/24] sd/pxa2xx_mmci: Fix to realize "pxa2xx-mmci" device Date: Mon, 18 May 2020 07:03:47 +0200 Message-Id: <20200518050408.4579-4-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , berrange@redhat.com, ehabkost@redhat.com, qemu-arm@nongnu.org, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" pxa2xx_mmci_init() creates a "pxa2xx-mmci" device, but neglects to realize it. Affects machines akita, borzoi, connex, mainstone, spitz, terrier, tosa, verdex, and z2. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing the device, yet nobody noticed. Fix by realizing it right away. Visible in "info qom-tree"; here's the change for akita: /machine (akita-machine) [...] /unattached (container) [...] + /device[5] (pxa2xx-mmci) + /pxa2xx-mmci[0] (qemu:memory-region) + /sd-bus (pxa2xx-mmci-bus) [rest of device[*] renumbered...] Fixes: 7a9468c92517e19037bfe2272f64f5dadaf9db15 Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- hw/sd/pxa2xx_mmci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c index 8f9ab0ec16..6a80181bc9 100644 --- a/hw/sd/pxa2xx_mmci.c +++ b/hw/sd/pxa2xx_mmci.c @@ -492,6 +492,7 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem, sysbus_connect_irq(sbd, 0, irq); qdev_connect_gpio_out_named(dev, "rx-dma", 0, rx_dma); qdev_connect_gpio_out_named(dev, "tx-dma", 0, tx_dma); + qdev_init_nofail(dev); =20 /* Create and plug in the sd card */ carddev =3D qdev_create(qdev_get_child_bus(dev, "sd-bus"), TYPE_SD_CAR= D); --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778617; cv=none; d=zohomail.com; s=zohoarc; b=i9CVh0MjvCwQS2NcShwjKumw7C04yj4DJ3ZqvxRxNi/36aHoIy/SMzHS+GWDiEVC+sPzJubFA8Ft+C3BgleKYzunWtMvvNUEJQqOJ2F7++9hfjZ5Z5n+KsvZHUntxJ1625cJHoqArl0bZZgpMTqPfotC1wtjaVVEwjKOc4Mjon0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778617; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bq/vFGJHbHphE0awvKup1uIh4VSJsjPyfBqgWMSJ2I8=; b=Qd3t9LzcJvp+FgrE174hByADTkA/lqe4YCR4ohj7bmr8DwSR4JzXSTfrx6ut+neHXcSa2AGNdkQCf/8/SXw4lh84t1u1IWG5LZDFYoGe5pr5HZXw4u78frB6GXKy1Y0jyeHZ9Pn361TX3SyZafjzeDdBq3gxVCw3WOTyc4ybbVE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778617755601.4529726940162; Sun, 17 May 2020 22:10:17 -0700 (PDT) Received: from localhost ([::1]:34482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY2a-0003RY-H1 for importer@patchew.org; Mon, 18 May 2020 01:10:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0008NI-9Y for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33917 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwl-0004KA-Sy for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-by4MJa-nOs-HiWC9z31mng-1; Mon, 18 May 2020 01:04:11 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08CA2107ACCD; Mon, 18 May 2020 05:04:10 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FF7279587; Mon, 18 May 2020 05:04:09 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 21D8111358C0; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bq/vFGJHbHphE0awvKup1uIh4VSJsjPyfBqgWMSJ2I8=; b=W75rXim2K4G2p3noIi1atRVqQFMrZOnL8ln5ZI1CqHL9+Ocs/uhZxvXinyaslxT22Vmlda 8SDnAPpRQCO0usF7SQdE8hHkgGdbY56D/nX2tv617YwXwmyyY6r2m0DnyCPVRLa/wkx8O3 KavLcVcZHaT+qVPG0vawbinbRlSmssw= X-MC-Unique: by4MJa-nOs-HiWC9z31mng-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 04/24] aspeed: Don't create unwanted "ftgmac100", "aspeed-mmi" devices Date: Mon, 18 May 2020 07:03:48 +0200 Message-Id: <20200518050408.4579-5-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , berrange@redhat.com, ehabkost@redhat.com, Andrew Jeffery , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , pbonzini@redhat.com, Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) These devices are optional, and controlled by @nb_nics. aspeed_soc_ast2600_init() and aspeed_soc_init() create the maximum supported number. aspeed_soc_ast2600_realize() and aspeed_soc_realize() realize only the wanted number. Works, although it can leave unrealized devices hanging around in the QOM composition tree. Affects machines ast2500-evb, ast2600-evb, palmetto-bmc, romulus-bmc, swift-bmc, tacoma-bmc, and witherspoon-bmc. Make the init functions create only the wanted ones. Visible in "info qom-tree"; here's the change for ast2600-evb: /machine (ast2600-evb-machine) [...] /soc (ast2600-a1) [...] /ftgmac100[0] (ftgmac100) /ftgmac100[0] (qemu:memory-region) - /ftgmac100[1] (ftgmac100) - /ftgmac100[2] (ftgmac100) - /ftgmac100[3] (ftgmac100) /gpio (aspeed.gpio-ast2600) [...] /mii[0] (aspeed-mmi) /aspeed-mmi[0] (qemu:memory-region) - /mii[1] (aspeed-mmi) - /mii[2] (aspeed-mmi) - /mii[3] (aspeed-mmi) /rtc (aspeed.rtc) I'm not sure creating @nb_nics devices makes sense. How many does the physical chip provide? Cc: "C=C3=A9dric Le Goater" Cc: Peter Maydell Cc: Andrew Jeffery Cc: Joel Stanley Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/aspeed_ast2600.c | 2 +- hw/arm/aspeed_soc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 71a0acfe26..0a6a77dd54 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -188,7 +188,7 @@ static void aspeed_soc_ast2600_init(Object *obj) sizeof(s->wdt[i]), typename); } =20 - for (i =3D 0; i < sc->macs_num; i++) { + for (i =3D 0; i < nb_nics && i < sc->macs_num; i++) { sysbus_init_child_obj(obj, "ftgmac100[*]", OBJECT(&s->ftgmac100[i]= ), sizeof(s->ftgmac100[i]), TYPE_FTGMAC100); =20 diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index cf6b6dd116..7ca860392a 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -203,7 +203,7 @@ static void aspeed_soc_init(Object *obj) sizeof(s->wdt[i]), typename); } =20 - for (i =3D 0; i < sc->macs_num; i++) { + for (i =3D 0; i < nb_nics && i < sc->macs_num; i++) { sysbus_init_child_obj(obj, "ftgmac100[*]", OBJECT(&s->ftgmac100[i]= ), sizeof(s->ftgmac100[i]), TYPE_FTGMAC100); } --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589779317; cv=none; d=zohomail.com; s=zohoarc; b=fcZfG2MjXAW599rOFQ9tKjCNtOB/D4oR732BzmmjqaY1F5S6jkGUku1RnIT2s9unbCE4oTyY69M3DTb2qaAAggQvo8phGZQIT797EvK61HdW+PP/YzX66Pmplegm0tWz0Yfb0tOzvHrr3zTWEqfze3ww6AaELq/XZUtnaZABrtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589779317; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OAi9EUCPLhJvfOSGj2kGGrtspMXz0+eDeEMBqbWPO+k=; b=cCRQSFbKCSO4HlMN41NYC/zsrzDaAiox1azq1WmdoHQ4wbyJ/EUHojfZRpkP8rjRPMRwMNkF0L1SXz4zNxtqg3j7r38o6ZGUq0RvR42JpBs9TNnamb+1bcE5rc1GkptBJ+vCzsv899okoRDjUL6Fgn6/RLgmMkcqUY3ZTZ55itU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589779317207920.885933819034; Sun, 17 May 2020 22:21:57 -0700 (PDT) Received: from localhost ([::1]:40996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaYDq-0001WS-QU for importer@patchew.org; Mon, 18 May 2020 01:21:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwv-0000Dv-0z for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:25 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:25492 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXws-0004Ol-Mj for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:24 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-oqoSJTA2NSqhwhsZv4yYsA-1; Mon, 18 May 2020 01:04:13 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7FC79EC1A2; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 333796298C; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2515911358C1; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OAi9EUCPLhJvfOSGj2kGGrtspMXz0+eDeEMBqbWPO+k=; b=eEz6ZI0udab5FR7aOSCml9PmWBEWxWyjfbDPZfT7GSEuFZl2EWSaDmR+Afl+2Bgq/Zuqq8 oWHag+6sFXHg+AaKzheDzJPyUab7S2C7tk8sCex1zvvhGi5X/Te0unDaATLWL7F5DAD4wF b0nR7TP1lsNpy+VlZEcU7rlbxkVrnM8= X-MC-Unique: oqoSJTA2NSqhwhsZv4yYsA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 05/24] aspeed: Don't create unwanted "cortex-a7-arm-cpu" devices Date: Mon, 18 May 2020 07:03:49 +0200 Message-Id: <20200518050408.4579-6-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , berrange@redhat.com, ehabkost@redhat.com, Andrew Jeffery , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , pbonzini@redhat.com, Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The number of CPUs is controlled by property "num-cpus". aspeed_soc_ast2600_init() creates the maximum supported number. aspeed_soc_ast2600_realize() realizes only the wanted number. Works, although it leaves unrealized devices hanging around in the QOM composition tree. Affects machines ast2600-evb and tacoma-bmc. Make the init functions create only the wanted ones. Visible in "info qom-tree"; here's the change for ast2600-evb: /machine (ast2600-evb-machine) [...] /soc (ast2600-a1) [...] /cpu[0] (cortex-a7-arm-cpu) /unnamed-gpio-in[0] (irq) /unnamed-gpio-in[1] (irq) /unnamed-gpio-in[2] (irq) /unnamed-gpio-in[3] (irq) - /cpu[1] (cortex-a7-arm-cpu) - /unnamed-gpio-in[0] (irq) - /unnamed-gpio-in[1] (irq) - /unnamed-gpio-in[2] (irq) - /unnamed-gpio-in[3] (irq) /ehci[0] (platform-ehci-usb) Cc: "C=C3=A9dric Le Goater" Cc: Peter Maydell Cc: Andrew Jeffery Cc: Joel Stanley Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast2600.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 0a6a77dd54..6ffa587a7f 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -287,6 +287,9 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev= , Error **errp) return; } } + for (; i < sc->num_cpus; i++) { + object_unparent(OBJECT(&s->cpu[i])); + } =20 /* A7MPCORE */ object_property_set_int(OBJECT(&s->a7mpcore), s->num_cpus, "num-cpu", --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778694; cv=none; d=zohomail.com; s=zohoarc; b=m55E5Y0cxkm111exZz0ScAwpwrorjAGbDEgNTrmrN4MSjY/hPlbhzXnr55nGqN3pPBKt0mqpap1iY2/0vQ7UhqcBi1W0JZhkNHOgW43qag4m3AswuRgwe/0T6twt4Go7Rg4TjFoldmc8RnOKR7E7EouskOWdQSJ1e5X2K+5Y5XY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778694; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Yy3PIImVsbXqEhIo2STPg20+OkvHlpicStcv34m1EmQ=; b=Nz4EpLQANd4XneJHfJ7s8yOTW7SSe11r5nKmSGXXMDrLTaoYBnC82giTOiOlo0cbwqy17qtcPWKmGMOQEjkqv44oJ0eJ8O+MECfBthD9MgrKNFCZMcoROhD+zRqVHd1uaogSx55W3REsrumKjrroCFfAFkDOdJy2DTvC8HMBy/8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778694256347.03348608500096; Sun, 17 May 2020 22:11:34 -0700 (PDT) Received: from localhost ([::1]:39564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY3p-0005XZ-0Q for importer@patchew.org; Mon, 18 May 2020 01:11:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXws-00005V-8i for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:32365 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0004Mz-Jj for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-JeayjZhHOJ61gwgW2v5kzQ-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 592F8872FEB; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2926A600E5; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 285DE11358C2; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yy3PIImVsbXqEhIo2STPg20+OkvHlpicStcv34m1EmQ=; b=ffqY7gXgp6zNtI0SQuhppthmYo0iCAi1uKQY8ZJOj53uRvClsiHS1z/Yhmo7R66P8r0OoQ 7+xzd7Qj9zPnHmaIcqPlhSnV4xuhDUegpnYjaHCxJ/sns2IQ1ZkKTHMLfYuYhJtjygajPC QiICEQUtTkeDrISJRu6LaCkjCCWhxaM= X-MC-Unique: JeayjZhHOJ61gwgW2v5kzQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 06/24] armv7m: Bury unwanted "ARM,bitband-memory" devices Date: Mon, 18 May 2020 07:03:50 +0200 Message-Id: <20200518050408.4579-7-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, qemu-arm@nongnu.org, berrange@redhat.com, ehabkost@redhat.com, Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" These devices are optional, and enabled by property "enable-bitband". armv7m_instance_init() creates them unconditionally, because the property has not been set then. armv7m_realize() realizes them only when the property is true. Works, although it leaves unrealized devices hanging around in the QOM composition tree. Affects machines microbit, mps2-an505, mps2-an521, musca-a, and musca-b1. Bury the unwanted devices by making armv7m_realize() unparent them. Visible in "info qom-tree"; here's the change for microbit: /machine (microbit-machine) /microbit.twi (microbit.i2c) /microbit.twi[0] (qemu:memory-region) /nrf51 (nrf51-soc) /armv6m (armv7m) /armv7m-container[0] (qemu:memory-region) - /bitband[0] (ARM,bitband-memory) - /bitband[0] (qemu:memory-region) - /bitband[1] (ARM,bitband-memory) - /bitband[0] (qemu:memory-region) /cpu (cortex-m0-arm-cpu) Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Markus Armbruster --- hw/arm/armv7m.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 7da57f56d3..f930619f53 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -245,8 +245,8 @@ static void armv7m_realize(DeviceState *dev, Error **er= rp) memory_region_add_subregion(&s->container, 0xe000e000, sysbus_mmio_get_region(sbd, 0)); =20 - if (s->enable_bitband) { - for (i =3D 0; i < ARRAY_SIZE(s->bitband); i++) { + for (i =3D 0; i < ARRAY_SIZE(s->bitband); i++) { + if (s->enable_bitband) { Object *obj =3D OBJECT(&s->bitband[i]); SysBusDevice *sbd =3D SYS_BUS_DEVICE(&s->bitband[i]); =20 @@ -265,6 +265,8 @@ static void armv7m_realize(DeviceState *dev, Error **er= rp) =20 memory_region_add_subregion(&s->container, bitband_output_addr= [i], sysbus_mmio_get_region(sbd, 0)); + } else { + object_unparent(OBJECT(&s->bitband[i])); } } } --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778354; cv=none; d=zohomail.com; s=zohoarc; b=NM8KVQOmiV0owD5yAEmW4QPyBw1J5JsGdRmel9tCloWjMJy3s36FWktgQxFKd0Bd3fq65D8WW8Er6JrXxghtIYuSZs08/cOuJ05Q4BHPDx9e278xPuGprrpVNKuJsJiPhNnj8Wz8MkdTcrd0F2ppqj/V15dea04GaeUor0u0FlU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778354; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bg7NXxiDlEIOS/MbUrg1kB3Gx2ztYbFLRI2y5bCpkPQ=; b=neDaTenvwmGlkPEBxH1Gzheysd8SBp3w+hojoCTI50jluQrX7NuVqwxGkyDfXnMczwmx7e6m3tH5blxMTNFbjaQ4b+r7mzbBkK7JnKyml+nE2A2WQgO01EYahfbWCM/MmFeT/HwM3ghN1gGHXeEPGbPE8TvhAhMhtetTttcV3sU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778353865944.1560571130859; Sun, 17 May 2020 22:05:53 -0700 (PDT) Received: from localhost ([::1]:39266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaXyK-0002Q5-I1 for importer@patchew.org; Mon, 18 May 2020 01:05:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0008NP-Ev for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:38074 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004KU-54 for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-483-nE9e42ErOLGuXHESuSiWjg-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4528A474; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31F535C1C8; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2BB4311358C3; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bg7NXxiDlEIOS/MbUrg1kB3Gx2ztYbFLRI2y5bCpkPQ=; b=Vq9rUDsXCDEUWKNM5XzYRw1DNvZB+Y+0QxEAGGTp6gZRjkgWyziCuEI7ymuqhReM5Uj3EC etQxZfZGfbufRAvc8kwZpy3BcE28Xt/z3MnhoJNY8PJ7SJQhg8tLVBYKImMArCwHvqqDNR SO/ocWUk3UO0LSbee/Ei3MaBBmqNBI0= X-MC-Unique: nE9e42ErOLGuXHESuSiWjg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 07/24] auxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave Date: Mon, 18 May 2020 07:03:51 +0200 Message-Id: <20200518050408.4579-8-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com, KONRAD Frederic Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We plug aux-to-i2c-bridge into the aux-bus, even though its DeviceClass member bus_type is null, not TYPE_AUX_BUS. Fix that by deriving it from TYPE_AUX_SLAVE instead of TYPE_DEVICE. Cc: KONRAD Frederic Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/misc/auxbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c index f8e7b97971..5e4794f0ac 100644 --- a/hw/misc/auxbus.c +++ b/hw/misc/auxbus.c @@ -244,7 +244,7 @@ static inline I2CBus *aux_bridge_get_i2c_bus(AUXTOI2CSt= ate *bridge) =20 static const TypeInfo aux_to_i2c_type_info =3D { .name =3D TYPE_AUXTOI2C, - .parent =3D TYPE_DEVICE, + .parent =3D TYPE_AUX_SLAVE, .class_init =3D aux_bridge_class_init, .instance_size =3D sizeof(AUXTOI2CState), .instance_init =3D aux_bridge_init --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778684; cv=none; d=zohomail.com; s=zohoarc; b=QBT3eDt/zBIw73e09qPc8jtJwe2X5UYWy0yVCLyfJyxEUVdjgLdUIYU2lTudYm8ldx0XX6lrpibUEW0TfPggZwkXmS9dV6Z4VuQbL7zzV0LSnIeUZ42m/Scj5AkguUQF3OGGZqFHMV0VYXv7iHnpqsgA+zhrAjmc01dY9ITMReo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778684; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CtEvIlWbqhqGbHRVosFJQi8OcMstNLV0Zi3H/Us5Ry8=; b=O1VpkcP9GvYGTPzQhnuX5mLcpxBhbOdJu0H2XzO/W1GP99Uohp9JpEwaZnfUi4/V9YvDXsIzb0YZLcvBw0aC4hBYkg3D7QPAy9WLoJO1fMnA6zUXcJpBsSATD53HBQc42mnmEDxnAn2ZMgx76uVcvmsyd2d+zkRL6xj0+tRqJow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778684761768.399874439316; Sun, 17 May 2020 22:11:24 -0700 (PDT) Received: from localhost ([::1]:39012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY3f-0005Jw-Gu for importer@patchew.org; Mon, 18 May 2020 01:11:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0008NJ-Ad for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59250 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004K5-1w for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-13nZ3pErMKGs6GVwgP5fjw-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44B4C80058A; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 217EF2E05F; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2EE9411358C4; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CtEvIlWbqhqGbHRVosFJQi8OcMstNLV0Zi3H/Us5Ry8=; b=Ke6g/adP2gg6WIimXku7L5IOYsatLe2ZiHASqpkRD2Rv/Jdow7nW61/g+++lbPA8XfwQGR LiI8zVq5sji7VdmfyJkBuQwkMZDEJvxEiaWi7377bYMEdj+aW3k1PvhtrZ9mrE51KXHzR1 dEShmEPec2SJroMZCFr9d+qFI3gn89w= X-MC-Unique: 13nZ3pErMKGs6GVwgP5fjw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 08/24] mac_via: Fix to realize "mos6522-q800-via*" devices Date: Mon, 18 May 2020 07:03:52 +0200 Message-Id: <20200518050408.4579-9-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com, Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" mac_via_realize() creates a "mos6522-q800-via1" and a "mos6522-q800-via2" device, but neglects to realize them. Affects machine q800. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing these two devices, yet nobody noticed. Fix by realizing them right away. Fixes: 6dca62a0000f95e0b7020aa00d0ca9b2c421f341 Cc: Laurent Vivier Signed-off-by: Markus Armbruster Reviewed-by: Mark Cave-Ayland --- hw/misc/mac_via.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index e05623d730..ee32f72d75 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -890,6 +890,9 @@ static void mac_via_realize(DeviceState *dev, Error **e= rrp) object_property_add_alias(OBJECT(dev), "irq[1]", OBJECT(ms), SYSBUS_DEVICE_GPIO_IRQ "[0]"); =20 + qdev_init_nofail(DEVICE(&m->mos6522_via1)); + qdev_init_nofail(DEVICE(&m->mos6522_via2)); + /* Pass through mos6522 input IRQs */ qdev_pass_gpios(DEVICE(&m->mos6522_via1), dev, "via1-irq"); qdev_pass_gpios(DEVICE(&m->mos6522_via2), dev, "via2-irq"); --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778757; cv=none; d=zohomail.com; s=zohoarc; b=l+Fi4modFQHycaMgo2mcKGI1aRxaLNuZLdok8bIdRz8aDjSKslLtQWKmcBVFQUrZBiJw1l4pE91i2r0Zk5Md4uOSNcy7FSUoAySiXn2DeUEaRK1u4yHZjsz4RMp1ChceXog7bBXGX3PrSo2+BZGwcfrBY4/C5AJ7DAAlfWDVZxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778757; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=emXT/wmPpZzn/OIwnrOBOwLJv1UDO9e9ek3pHIpAiwc=; b=QVZPwd+j06lwAiL1dZQdtEBCitbdS3BWy84z/V8uLP9BKS4YVg2Pvdl2wkPr//rmrkDCsfx4KhMo6fdsWgLR+uMMjs3lD6Er1ZjXdb4pPkCIUZNbcc7sAZlUul1MwTkfG1bO2XuHldlIiBo4zT4bQYpeqr1r5GKloJTOmeRaGOw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15897787578841016.373264796725; Sun, 17 May 2020 22:12:37 -0700 (PDT) Received: from localhost ([::1]:43270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY4q-00073b-NR for importer@patchew.org; Mon, 18 May 2020 01:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0008OY-Vc for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:23632 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004LK-BW for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-467-E3IuQ-qoOUCx6RushafO5g-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44941107ACCD; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 317CF5D9DD; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 3229211358C5; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=emXT/wmPpZzn/OIwnrOBOwLJv1UDO9e9ek3pHIpAiwc=; b=i6GeDbyir4gmUbHrUtObVl8Ak84f3PAj2meCGQSvGe2kC2FDV2ufIdpH08Ik/yr4Bo/Jjq 1YliZ3bimSV1EmpQkMQkYg+eZYX7LTkmSiw+jfUwpdZJjTk4/1w4vIyuwcb/AyNyMMVuE9 XTt53z8Nr5URsRixa6z6PluVcWYKyQA= X-MC-Unique: E3IuQ-qoOUCx6RushafO5g-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 09/24] macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices Date: Mon, 18 May 2020 07:03:53 +0200 Message-Id: <20200518050408.4579-10-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com, Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" cuda_init() creates a "mos6522-cuda" device, but it's never realized. Affects machines mac99 with via=3Dcuda (default) and g3beige. pmu_init() creates a "mos6522-pmu" device, but it's never realized. Affects machine mac99 with via=3Dpmu and via=3Dpmu-adb, I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing these devices, yet nobody noticed. Fix by realizing them in cuda_realize() and pmu_realize(), respectively. Fixes: 6dca62a0000f95e0b7020aa00d0ca9b2c421f341 Cc: Laurent Vivier Signed-off-by: Markus Armbruster --- hw/misc/macio/cuda.c | 8 +++----- hw/misc/macio/pmu.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index e0cc0aac5d..6d4d135f71 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -523,15 +523,13 @@ static void cuda_realize(DeviceState *dev, Error **er= rp) { CUDAState *s =3D CUDA(dev); SysBusDevice *sbd; - MOS6522State *ms; - DeviceState *d; struct tm tm; =20 + qdev_init_nofail(DEVICE(&s->mos6522_cuda)); + /* Pass IRQ from 6522 */ - d =3D DEVICE(&s->mos6522_cuda); - ms =3D MOS6522(d); sbd =3D SYS_BUS_DEVICE(s); - sysbus_pass_irq(sbd, SYS_BUS_DEVICE(ms)); + sysbus_pass_irq(sbd, SYS_BUS_DEVICE(&s->mos6522_cuda)); =20 qemu_get_timedate(&tm, 0); s->tick_offset =3D (uint32_t)mktimegm(&tm) + RTC_OFFSET; diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index 9a9cd427e1..e29ca5e6cc 100644 --- a/hw/misc/macio/pmu.c +++ b/hw/misc/macio/pmu.c @@ -740,15 +740,13 @@ static void pmu_realize(DeviceState *dev, Error **err= p) { PMUState *s =3D VIA_PMU(dev); SysBusDevice *sbd; - MOS6522State *ms; - DeviceState *d; struct tm tm; =20 + qdev_init_nofail(DEVICE(&s->mos6522_pmu)); + /* Pass IRQ from 6522 */ - d =3D DEVICE(&s->mos6522_pmu); - ms =3D MOS6522(d); sbd =3D SYS_BUS_DEVICE(s); - sysbus_pass_irq(sbd, SYS_BUS_DEVICE(ms)); + sysbus_pass_irq(sbd, SYS_BUS_DEVICE(&s->mos6522_pmu)); =20 qemu_get_timedate(&tm, 0); s->tick_offset =3D (uint32_t)mktimegm(&tm) + RTC_OFFSET; --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589779139; cv=none; d=zohomail.com; s=zohoarc; b=fkt8dZCmENwnyJfNaIOlIuXpNXplEMpdtViqdE24AvvzDM1xVDryw9a4HdafDzuW5mnaL7kI1bodTEO4fhVoou9y2shn1EANWk7HIeqdzpi9RCB+YIjzPd2d6DRbuLrO/Sl8rJgbcQCDUKGMkTeufcGUEx454858SrNJrfLLBGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589779139; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OioZl/z9okXj3cXRGV6HDNjM4w0fv0+qgLDIx26LQEw=; b=lzwifsgNK9Fj67MnMGCvswa/w578F4xZq4JuQ7EjtD1FQAFDDz6GWN3vjOi6mH5BvKMT9zgqAYHYWefLpSzcZT77XLLQdc2Tu0DDozfeepjamAK41zCSfKTZQOJRFS6Cem+HX/LQulRQf2mEsc8uWsKlMckSWlQN+6lBZ10/81g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589779139970915.7625948302565; Sun, 17 May 2020 22:18:59 -0700 (PDT) Received: from localhost ([::1]:58266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaYB0-0005DF-Mv for importer@patchew.org; Mon, 18 May 2020 01:18:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXws-00005e-3Y for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33471 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0004Mi-9y for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-290-kQWNStPbM6yDJ1lzACH-pQ-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48CE4805722; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D23160CC0; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 356B911358C6; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OioZl/z9okXj3cXRGV6HDNjM4w0fv0+qgLDIx26LQEw=; b=JJ9Entu/Atdf33oiRtJaC2fFcGfYn4bpxpWzxYjOdVdox+GXDq457NjOxVtFuu93+WzknD 68ARrAs7F+rsTbirV2HNYZVZcgByrZFVOwhg1W+UIYDxdqOZIPB6Dydm6XwgA5cGCKGOeC Da+Sop1Ypa8hPy2FdSdwm54OIWElo4A= X-MC-Unique: kQWNStPbM6yDJ1lzACH-pQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 10/24] macio: Bury unwanted "macio-gpio" devices Date: Mon, 18 May 2020 07:03:54 +0200 Message-Id: <20200518050408.4579-11-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Mark Cave-Ayland , qemu-ppc@nongnu.org, pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" These devices go with the "via-pmu" device, which is controlled by property "has-pmu". macio_newworld_init() creates it unconditionally, because the property has not been set then. macio_newworld_realize() realizes it only when the property is true. Works, although it can leave an unrealized device hanging around in the QOM composition tree. Affects machine mac99 with via=3Dcuda (default). Bury the unwanted device by making macio_newworld_realize() unparent it. Visible in "info qom-tree": /machine (mac99-machine) [...] /unattached (container) /device[9] (macio-newworld) [...] /escc-legacy-port[8] (qemu:memory-region) /escc-legacy-port[9] (qemu:memory-region) /escc-legacy[0] (qemu:memory-region) - /gpio (macio-gpio) - /gpio[0] (qemu:memory-region) /ide[0] (macio-ide) /ide.0 (IDE) /pmac-ide[0] (qemu:memory-region) Cc: Mark Cave-Ayland Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster --- hw/misc/macio/macio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 3779865ab2..b3dddf8be7 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -368,6 +368,8 @@ static void macio_newworld_realize(PCIDevice *d, Error = **errp) memory_region_add_subregion(&s->bar, 0x16000, sysbus_mmio_get_region(sysbus_dev, 0)); } else { + object_unparent(OBJECT(&ns->gpio)); + /* CUDA */ object_initialize_child(OBJECT(s), "cuda", &s->cuda, sizeof(s->cud= a), TYPE_CUDA, &error_abort, NULL); --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778820; cv=none; d=zohomail.com; s=zohoarc; b=oA6qBXSii9vgmXFZcfPerfUeg38Do8tD138HMgnGmdnBUwWviM3r6MS498AcBHyfq/2XwVi0AH7g6Y6HVWMLA0Owys+b1796ZVaTnmc1QPbRf7081Hbp5l4QO61ByKXyRww9NJl5NKenQ05fnydGSgJmia6eR1X0Z+nx8OsTI5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778820; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1K6O/zox7EjOUyOTTH1db7YtCR92qCVauB09g8MwOZA=; b=k7D/7fga8tmOy5s8m2gvNw1FZ+QIrdjTfi4FIFvDc7XHWmh8ct2mBRM/upx5L4woyJUgVvVITAt/G8e5Fp5g43/evMKCc9lssUkXWx/drti667GzhlQQbhoUW5ja/Nqxzc7c9S49voATcwjvwutf1fZAvtMmC1aYSFyh8LLR8jI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778820813951.5389805206936; Sun, 17 May 2020 22:13:40 -0700 (PDT) Received: from localhost ([::1]:46834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY5r-00008o-LV for importer@patchew.org; Mon, 18 May 2020 01:13:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwp-0008P0-7k for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:19 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45689 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004LX-DF for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-1pTQrExOOBOxh0TIZRMUew-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4972E180071D; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D28F60FB9; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 38A8B11358C7; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1K6O/zox7EjOUyOTTH1db7YtCR92qCVauB09g8MwOZA=; b=djeW98jIjmNeDtocbZaKAdrwjFgvWUNzp/VCPYTYBKMnbb6cikntinwDFdNiVd4k48Ao5a g/kW5iklKYkSkZvpCG40alQbPwjb/brAE31jposAnLQ3Pt0nwRqTlcW2dAbDT60/5mC7S+ nIY/X0Rvz9q67cEBTmPzHFCZ+oHVwfs= X-MC-Unique: 1pTQrExOOBOxh0TIZRMUew-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 11/24] pnv/phb4: Bury unwanted "pnv-phb4-pec-stack" devices Date: Mon, 18 May 2020 07:03:55 +0200 Message-Id: <20200518050408.4579-12-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The number of stacks is controlled by property "num-stacks". pnv_pec_instance_init() creates the maximum supported number, because the property has not been set then. pnv_pec_realize() realizes only the wanted number. Works, although it can leave unrealized devices hanging around in the QOM composition tree. Affects machine powernv9. Bury the unwanted devices by making pnv_pec_realize() unparent them. Visible in "info qom-tree": /machine (powernv9-machine) /chip[0] (power9_v2.0-pnv-chip) [...] /pec[0] (pnv-phb4-pec) /stack[0] (pnv-phb4-pec-stack) [...] - /stack[1] (pnv-phb4-pec-stack) - /phb (pnv-phb4) - /pcie-mmcfg-mmio[0] (qemu:memory-region) - /root (pnv-phb4-root-port) - /source (xive-source) - /stack[2] (pnv-phb4-pec-stack) - /phb (pnv-phb4) - /pcie-mmcfg-mmio[0] (qemu:memory-region) - /root (pnv-phb4-root-port) - /source (xive-source) /xscom-pec-0.0-nest[0] (qemu:memory-region) /xscom-pec-0.0-pci[0] (qemu:memory-region) /pec[1] (pnv-phb4-pec) /stack[0] (pnv-phb4-pec-stack) [...] /stack[1] (pnv-phb4-pec-stack) [...] - /stack[2] (pnv-phb4-pec-stack) - /phb (pnv-phb4) - /pcie-mmcfg-mmio[0] (qemu:memory-region) - /root (pnv-phb4-root-port) - /source (xive-source) /xscom-pec-0.1-nest[0] (qemu:memory-region) /xscom-pec-0.1-pci[0] (qemu:memory-region) /pec[2] (pnv-phb4-pec) /stack[0] (pnv-phb4-pec-stack) [...] /stack[1] (pnv-phb4-pec-stack) [...] /stack[2] (pnv-phb4-pec-stack) [...] Cc: C=C3=A9dric Le Goater Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz --- hw/pci-host/pnv_phb4_pec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c index 911d147ffd..565345a018 100644 --- a/hw/pci-host/pnv_phb4_pec.c +++ b/hw/pci-host/pnv_phb4_pec.c @@ -397,6 +397,9 @@ static void pnv_pec_realize(DeviceState *dev, Error **e= rrp) return; } } + for (; i < PHB4_PEC_MAX_STACKS; i++) { + object_unparent(OBJECT(&pec->stacks[i])); + } =20 /* Initialize the XSCOM regions for the PEC registers */ snprintf(name, sizeof(name), "xscom-pec-%d.%d-nest", pec->chip_id, --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778458; cv=none; d=zohomail.com; s=zohoarc; b=QM+8W9jAez/KgF02ue97cuKLB/Ps6Czx1DSuyP+LZRnMfC+MwlwnPIpTK26ATDNDOwg/rJsK/tW0zHG+zayf86AA1jJ2YSPcgUYQyimWbCNQzaXP1nj8S1JYsKcSKWoSMvS77b8g9tOZ46yfGAnlvSiABWX/01V1tiZzCVdmzZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778458; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J68hb3oY3uxJJFxvtt209MJvIgPE7+RPkdffT+KVHEM=; b=gJ2GBdV1BSLH57cf/qhnOEmSFneV7PkdFB7LeK4lZGe+YS+rEC5OjTuXiwOH278+DI0erqrgXQ5GmyfMQj5lCONOS4XbI/OdPfMrCqR85K0MtmOcj72aHP963Nco5hKvzKTH65VVf/nzM6rSAu0Zd0Ique+p/jFnABCaCflHQ+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778458240379.01933420309274; Sun, 17 May 2020 22:07:38 -0700 (PDT) Received: from localhost ([::1]:47844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY00-0005nw-U0 for importer@patchew.org; Mon, 18 May 2020 01:07:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0008OG-PI for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:31703 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004Kl-57 for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:18 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-udPoWdWzPpeWuK9bqSJDTQ-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE6A7107ACCA; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D0D78206B; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 3BE8811358C8; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J68hb3oY3uxJJFxvtt209MJvIgPE7+RPkdffT+KVHEM=; b=D6USTbt1H12L1qwQkrSCmWB93+L9g1yAIZzjRwefznfMxHzwXmRljAHW3ecwwWPtuQqwZY T7LQonry0Rrb0wBV1UuUmI5yRTGk1BQGn6KTCqf9G7xP0aiMMaHla/E56HAkNbwoZ9f8Qb E33mJ9xhZQO/J2rtqTvTKzcW8t/mUy4= X-MC-Unique: udPoWdWzPpeWuK9bqSJDTQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 12/24] MAINTAINERS: Make section PowerNV cover pci-host/pnv* as well Date: Mon, 18 May 2020 07:03:56 +0200 Message-Id: <20200518050408.4579-13-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Cc: C=C3=A9dric Le Goater Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster Acked-by: David Gibson --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 47ef3139e6..074dc7f023 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1207,7 +1207,9 @@ S: Maintained F: hw/ppc/pnv* F: hw/intc/pnv* F: hw/intc/xics_pnv.c +F: hw/pci-host/pnv* F: include/hw/ppc/pnv* +F: include/hw/pci-host/pnv* F: pc-bios/skiboot.lid F: tests/qtest/pnv* =20 --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589779078; cv=none; d=zohomail.com; s=zohoarc; b=eFmFQNGjHJFqikuL7NR7s9gGV3W4q/hPdqlBrZLmKASvaTjWbJGt04V0dIMCoYa7LIPps58Bak919H/yif9BZRNkTOi3IgRDujR8XPKLw/d9JzV244q1LLjiElqImwWkqUzPkdCzUlesjGEEVWsMwgtmR+rMExmvyoSh4KIUoIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589779078; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UsAv/bgnHykNzduPwvkuhFwRe3NU9ni7q/NMPUd4MVw=; b=kr0azDJouXQOJhKTNG7qLTAVfKqSYPOCU2OP3s0V6Nvqpp/nwNs1D+w+l+3DRR82kxZqAibL5yYoqSRSrA7Ox8UC6up/3u6uf9Bjxl29VAnty0ijnJkkPaAmXRtUHbp2Mf6qC6hwemS/MDwhZW5a6kc8h1K9LYAyF6B6aAR1NaI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589779078855771.398934765771; Sun, 17 May 2020 22:17:58 -0700 (PDT) Received: from localhost ([::1]:56136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaYA1-0004KA-GN for importer@patchew.org; Mon, 18 May 2020 01:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwr-0008VT-OA for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:28694 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0004Me-2N for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-80zTJOd5PGW50U9P0ir-Dw-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A34A1054F90; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 186355D9E2; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 3F46C11358CA; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UsAv/bgnHykNzduPwvkuhFwRe3NU9ni7q/NMPUd4MVw=; b=Fjfn+XEV9eqz4yB0DPH1CS6TBuPUKGBfYTVW7ARSa2dItOkujO5j2JDVmuprztvCuQ90uC pqvYPYwZXiSWH5PB7moHXl9jix7mikFbsdJUd9Ejwpw4zbJxMvjxTLIqldTfPFr9XtCvqd DPGPuX7R2rrQ1UGaYV3Ew4saocuHZ24= X-MC-Unique: 80zTJOd5PGW50U9P0ir-Dw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 13/24] ppc4xx: Drop redundant device realization Date: Mon, 18 May 2020 07:03:57 +0200 Message-Id: <20200518050408.4579-14-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" object_property_set_bool(OBJECT(dev), true, "realized", ...) right after qdev_init_nofail(dev) does nothing, because qdev_init_nofail() already realizes. Drop. Cc: BALATON Zoltan Signed-off-by: Markus Armbruster Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- hw/ppc/ppc440_uc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index b30e093cbb..dc318c7aa7 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -1370,12 +1370,10 @@ void ppc460ex_pcie_init(CPUPPCState *env) dev =3D qdev_create(NULL, TYPE_PPC460EX_PCIE_HOST); qdev_prop_set_int32(dev, "dcrn-base", DCRN_PCIE0_BASE); qdev_init_nofail(dev); - object_property_set_bool(OBJECT(dev), true, "realized", NULL); ppc460ex_pcie_register_dcrs(PPC460EX_PCIE_HOST(dev), env); =20 dev =3D qdev_create(NULL, TYPE_PPC460EX_PCIE_HOST); qdev_prop_set_int32(dev, "dcrn-base", DCRN_PCIE1_BASE); qdev_init_nofail(dev); - object_property_set_bool(OBJECT(dev), true, "realized", NULL); ppc460ex_pcie_register_dcrs(PPC460EX_PCIE_HOST(dev), env); } --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778541; cv=none; d=zohomail.com; s=zohoarc; b=diwxWZ7RhgCfXsPGy5rV9AIhMAoWzpQpNSmNzW6JtFyYDOTgytsLK8uOmB4eeSkUu6n7vOye/uBRUYKDkhjFbyOr3NbLYsibAaspQ/Q+peTVuIiG0tlE21C/sz4ngGgVb9ntxGGDipJS8M3sBvpJ0TzLiFdvsx348lmFZm6Jvm4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778541; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lDmc7nKe6Zv3JD0j0riQDZWnP4g045LiGPRH8eY269M=; b=Itgca1Xd0JYaPtjY6fZj8TFthqnZ50Gd3ylX6x2j1/u6C5GUKgW3R2IRZSywXh/JJSoKUUek6AZlfg+DAgup+5eo/Yi+vysCVPgYHgm9GIyujZ/RsYlo18DloGtSn2TKyG91grCx5ON4EKBmz336+rJXEVCNNYerEuzjRKHnBY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778541177991.5768743867596; Sun, 17 May 2020 22:09:01 -0700 (PDT) Received: from localhost ([::1]:56220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY1L-0000rI-Vx for importer@patchew.org; Mon, 18 May 2020 01:09:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwn-0008MU-St for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:17 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:41837 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwl-0004Jv-EA for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-BecJXWToMh6kOuSWLur7gA-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DBCF11005512; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D00D5F7EA; Mon, 18 May 2020 05:04:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 48FD411358CB; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lDmc7nKe6Zv3JD0j0riQDZWnP4g045LiGPRH8eY269M=; b=Q75070SdCQ539fZGJrtbd4pwC+qylPvuoukzFJ6pJ/0ZxNk0qLZOZY9GqKjjYQwbwf7jVC n/58b4iJzRfEGLV7l++SBLmvYWm10SdKS44EiJCwleRaL9NWzf/VD4Fp6A3cRI2OhDkfjZ SZ0+LgOFn+xU11AuC3GdXrvKKehTuwg= X-MC-Unique: BecJXWToMh6kOuSWLur7gA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 14/24] macio: Put "macio-nvram" device on the macio bus Date: Mon, 18 May 2020 07:03:58 +0200 Message-Id: <20200518050408.4579-15-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 23:32:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Mark Cave-Ayland , qemu-ppc@nongnu.org, pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" macio_oldworld_init() creates a "macio-nvram", sysbus device, but neglects to but it on a bus. Put it on the macio bus. Affects machine g3beige. Visible in "info qtree": bus: macio.0 type macio-bus [...] + dev: macio-nvram, id "" + size =3D 8192 (0x2000) + it_shift =3D 4 (0x4) This also makes it a QOM child of macio-oldworld. Visible in "info qom-tree": /machine (g3beige-machine) [...] /unattached (container) [...] /device[6] (macio-oldworld) [...] - /device[7] (macio-nvram) - /macio-nvram[0] (qemu:memory-region) + /nvram (macio-nvram) + /macio-nvram[0] (qemu:memory-region) [rest of device[*] renumbered...] Cc: Mark Cave-Ayland Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Mark Cave-Ayland --- hw/misc/macio/macio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index b3dddf8be7..ebc96cc8f6 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -245,7 +245,8 @@ static void macio_oldworld_init(Object *obj) =20 macio_init_child_obj(s, "cuda", &s->cuda, sizeof(s->cuda), TYPE_CUDA); =20 - object_initialize(&os->nvram, sizeof(os->nvram), TYPE_MACIO_NVRAM); + macio_init_child_obj(s, "nvram", &os->nvram, sizeof(os->nvram), + TYPE_MACIO_NVRAM); dev =3D DEVICE(&os->nvram); qdev_prop_set_uint32(dev, "size", 0x2000); qdev_prop_set_uint32(dev, "it_shift", 4); --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778549; cv=none; d=zohomail.com; s=zohoarc; b=XEBepFdmLQuEqUbvGyGCmyQvraKvgnzG4x51AMs/+u6EBZBaPDaEGSOuyMfiz4mQuyGFGjzlnBdRXlsY9sVD8AtWnjccHZ1LhJJXnb1ZSh2rPEMMBZLfxlSMWbuMHKm+9aAvLQkllmDOyjaXIlG+pR4pf/nf7o6M6tVGg+fJRs0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778549; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m8JJv8K4KGYmo0R3+OjES4UjC3PSxppyqDh+UB0efcc=; b=nGPx8dhAE5omGIzUNDdEhE6qjL5E0rp+w+dlGrRAwBmlB+1sTa+Kv+UXSu5mcYDQYJTEJ+FEeVSx2NZ8I+HSrX1RVcfWUw0KLjcDppB741+2CaPw9p7MsMg1XCKiyq2GTQX/QcyOLH6Klz1qxtfkfVcPyI/KUVIb2CWpzk55ync= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778549286190.45932873227355; Sun, 17 May 2020 22:09:09 -0700 (PDT) Received: from localhost ([::1]:57168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY1U-0001EL-1H for importer@patchew.org; Mon, 18 May 2020 01:09:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwq-0008SJ-Jp for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:20 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:49104 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwn-0004Lp-3R for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:20 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-IRy8805bNKODnk2qb8UeBg-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C693F872FE4; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 958C079587; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 4ECCE11358CC; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8JJv8K4KGYmo0R3+OjES4UjC3PSxppyqDh+UB0efcc=; b=ZG606/s+3gHQuV7LbXidzzrVwAhi3VQvEhCTxj0p9lJukODoQ6Ssy6fXCG1X28n9FRQAoG NrbAedr51rP+AREVEXREOn4/qGPQSIu47o0alV++/9EWTnSH8xjQZBEXERANEku3k92anS roNYRdWSmKXciJDV46ZIlZGrS+gvD+c= X-MC-Unique: IRy8805bNKODnk2qb8UeBg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 15/24] macio: Fix macio-bus to be a subtype of System bus Date: Mon, 18 May 2020 07:03:59 +0200 Message-Id: <20200518050408.4579-16-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Mark Cave-Ayland , qemu-ppc@nongnu.org, pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The devices we plug into the macio-bus are all sysbus devices (DeviceClass member bus_type is TYPE_SYSTEM_BUS), but macio-bus does not derive from TYPE_SYSTEM_BUS. Fix that. "info qtree" now shows the devices' mmio ranges, as it should Cc: Mark Cave-Ayland Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/misc/macio/macio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index ebc96cc8f6..53a9fd5696 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -492,7 +492,7 @@ static void macio_class_init(ObjectClass *klass, void *= data) =20 static const TypeInfo macio_bus_info =3D { .name =3D TYPE_MACIO_BUS, - .parent =3D TYPE_BUS, + .parent =3D TYPE_SYSTEM_BUS, .instance_size =3D sizeof(MacIOBusState), }; =20 --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778384; cv=none; d=zohomail.com; s=zohoarc; b=DLD6sHl+0JwYemX+f2RM8lqKvvEo6zuwuZi0paX9YD5nMUo3P3GGHEz6lYrTDkXiDUmPVz+gGa9Fg17LB6ok0P2eUe1fy4HCFp6iFyhLbSiu2z9GWE0BuEoQvdFd7fxoxJW655axqicdqP1Pl8Y4h4ru8MitkdvZ0kuV6rfhdQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778384; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t4O5dU6OXScPqqUWYQSyYlMZ+HtADWQ8rEMv7vhvyQI=; b=PnBATVL5CXyV39PQDZpBgRr2rTSIv6qGD9rJzFZ57Rvxex46FDVLH8ZKFCy0Px1ggTH269tUytQjkXUtIU4e8id54mMEulrgvuLvh4MkzT5Q+Ga6ic4S3suTNTJOLmSGwRamg6+93Wca39f++apOtF3bk2T+OdFs7zqK6Fyz0rY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778384666474.4382267363678; Sun, 17 May 2020 22:06:24 -0700 (PDT) Received: from localhost ([::1]:42532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaXyp-0003hu-F2 for importer@patchew.org; Mon, 18 May 2020 01:06:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwt-0000A6-Og for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:51472 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXws-0004Og-GB for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:23 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-CWtNukdVOO6sZWFhOa3X2Q-1; Mon, 18 May 2020 01:04:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D112EEC1A6; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FC1B79589; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 5496111358CD; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t4O5dU6OXScPqqUWYQSyYlMZ+HtADWQ8rEMv7vhvyQI=; b=Kfq81pOmVXTy24fMWOgkhewL9XEM+Yr9/9Tn9GoypYlZysKiE366BZHznI3ud0PCP3eJe6 /MjOKszluWqB8Xb6R73tCrBsFXWhtIxDFYY7Z9PpHXd4CRwFCAD7x+7pW61/Pt6bruojjf DfCSctiiGkEKXvPeiV1z7IOBBvz0Pjk= X-MC-Unique: CWtNukdVOO6sZWFhOa3X2Q-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 16/24] ppc/pnv: Put "*-pnv-chip" and "pnv-xive" on the main system bus Date: Mon, 18 May 2020 07:04:00 +0200 Message-Id: <20200518050408.4579-17-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) pnv_init() creates "power10_v1.0-pnv-chip", "power8_v2.0-pnv-chip", "power8e_v2.1-pnv-chip", "power8nvl_v1.0-pnv-chip", or "power9_v2.0-pnv-chip" sysbus devices in a way that leaves them unplugged. pnv_chip_power9_instance_init() creates a "pnv-xive" sysbus device in a way that leaves it unplugged. Create them the common way that puts them into the main system bus. Affects machines powernv8, powernv9, and powernv10. Visible in "info qtree". Here's the change for powernv9: bus: main-system-bus type System + dev: power9_v2.0-pnv-chip, id "" + chip-id =3D 0 (0x0) + ram-start =3D 0 (0x0) + ram-size =3D 1879048192 (0x70000000) + nr-cores =3D 1 (0x1) + cores-mask =3D 72057594037927935 (0xffffffffffffff) + nr-threads =3D 1 (0x1) + num-phbs =3D 6 (0x6) + mmio 000603fc00000000/0000000400000000 [...] + dev: pnv-xive, id "" + ic-bar =3D 1692157036462080 (0x6030203100000) + vc-bar =3D 1689949371891712 (0x6010000000000) + pc-bar =3D 1690499127705600 (0x6018000000000) + tm-bar =3D 1692157036986368 (0x6030203180000) Cc: "C=C3=A9dric Le Goater" Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: C=C3=A9dric Le Goater --- hw/ppc/pnv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index da637822f9..8d4fc8109a 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -818,7 +818,7 @@ static void pnv_init(MachineState *machine) pnv->chips =3D g_new0(PnvChip *, pnv->num_chips); for (i =3D 0; i < pnv->num_chips; i++) { char chip_name[32]; - Object *chip =3D object_new(chip_typename); + Object *chip =3D OBJECT(qdev_create(NULL, chip_typename)); =20 pnv->chips[i] =3D PNV_CHIP(chip); =20 @@ -1317,8 +1317,8 @@ static void pnv_chip_power9_instance_init(Object *obj) PnvChipClass *pcc =3D PNV_CHIP_GET_CLASS(obj); int i; =20 - object_initialize_child(obj, "xive", &chip9->xive, sizeof(chip9->xive), - TYPE_PNV_XIVE, &error_abort, NULL); + sysbus_init_child_obj(obj, "xive", &chip9->xive, sizeof(chip9->xive), + TYPE_PNV_XIVE); object_property_add_alias(obj, "xive-fabric", OBJECT(&chip9->xive), "xive-fabric"); =20 --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778455; cv=none; d=zohomail.com; s=zohoarc; b=nXpSdwDPhSdC8IwOiPSLzNf8eINGIh1Kdm7R8TFXPYSAbmGm6jjy0ue1Qkia+voQ5WdDrI3RKCvQEQzcwBSWgDxlQqI6SwXxJU1l4meM1hF0UX7wPnItGiOtJx5u9VldpkL8rDgoHw2lxHLQSQCQnO3QihOMKKjpBzcA0sn8quA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778455; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oKoLA3+5cDM+3L1JuuaNKpcwhLMW7ikXXPHGdkiSkcA=; b=kDo+aQ0H2QiIBVHvymUprK2z4PiKawz4pRGdcgIzUCBcvEYZb+TtKOPEUe0DwP+HX88t/QdIDkqD6OcQbFxGlMZ/GU0dU7riB5nBXpDZNByiqcm1C/ge7WQyc5Sc5P/2L1CuY0nJNaSFNRgxc0YUJKjZlLA8K+knqmSHbac6SQ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778455002780.8867872691884; Sun, 17 May 2020 22:07:35 -0700 (PDT) Received: from localhost ([::1]:47460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaXzx-0005ei-Mb for importer@patchew.org; Mon, 18 May 2020 01:07:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwp-0008QD-Q6 for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:19 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45009 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004Ll-Ib for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:19 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-346-nSwRtfM7PdCeoUGYY-Ybqw-1; Mon, 18 May 2020 01:04:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EEDCC8018A6; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB38E60C05; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 5AA1511358CE; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oKoLA3+5cDM+3L1JuuaNKpcwhLMW7ikXXPHGdkiSkcA=; b=e1d5sAIF4QVG+ZzdR9LKUUrSCiai4PYJra7S0QUedMeEJt9Qdrqfdx9Yc8uvNXJWLJ2cqq d6uNnPRwzd59DbKGiUQLLBDpg10k/G5G7zax4mIhSfkFAKjYx6xhf1URd7DdaTApbKVoMR ph4FiLZckeLyvgltJan7GbrMtj8h0XY= X-MC-Unique: nSwRtfM7PdCeoUGYY-Ybqw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 17/24] pnv/psi: Correct the pnv-psi* devices not to be sysbus devices Date: Mon, 18 May 2020 07:04:01 +0200 Message-Id: <20200518050408.4579-18-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:51:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , pbonzini@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) pnv_chip_power8_instance_init() creates a "pnv-psi-POWER8" sysbus device in a way that leaves it unplugged. pnv_chip_power9_instance_init() and pnv_chip_power10_instance_init() do the same for "pnv-psi-POWER9" and "pnv-psi-POWER10", respectively. These devices aren't actually sysbus devices. Correct that. Cc: "C=C3=A9dric Le Goater" Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: C=C3=A9dric Le Goater --- include/hw/ppc/pnv_psi.h | 2 +- hw/ppc/pnv_psi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h index f0f5b55197..979fc59f33 100644 --- a/include/hw/ppc/pnv_psi.h +++ b/include/hw/ppc/pnv_psi.h @@ -31,7 +31,7 @@ #define PSIHB_XSCOM_MAX 0x20 =20 typedef struct PnvPsi { - SysBusDevice parent; + DeviceState parent; =20 MemoryRegion regs_mr; uint64_t bar; diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index cfd5b7bc25..82f0769465 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -943,7 +943,7 @@ static void pnv_psi_class_init(ObjectClass *klass, void= *data) =20 static const TypeInfo pnv_psi_info =3D { .name =3D TYPE_PNV_PSI, - .parent =3D TYPE_SYS_BUS_DEVICE, + .parent =3D TYPE_DEVICE, .instance_size =3D sizeof(PnvPsi), .class_init =3D pnv_psi_class_init, .class_size =3D sizeof(PnvPsiClass), --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778766; cv=none; d=zohomail.com; s=zohoarc; b=WWdZ8moAS87PM29a5GfOewIEFgVRTsByCaI3mpT8ycnj2uxP+6me2NBX6GU8JMzAT25u6Hn3vba7y48JI26gIUDifTsp+Ji6sx7QrHi6RF236J5hoC9c4pKhkwOlYZFmWWvfdJeT8M0Epc9EkYt477MaTW351P/LDpGz1TDaBMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778766; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=H5bAYuq8IxFxTWuifcj2i+IDfMnIMKYSHgvtt2OggQw=; b=mrOOum8WCFrTFJNW9oBGJnfFJSWri8Qkg9LW9KKLMWLgDsef6Pm6SqRu26dekgbQUTS/bbORJC2Tgwxvf4cTz9v9oSzRUp4WRgGhAtxZYLxVokqqVDG8B979OOU9EiZnSGs0kX7tCB4cqRSvwOLkwm9YCyLQNZA3FjcwYDH7aDE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778766127226.70375429403498; Sun, 17 May 2020 22:12:46 -0700 (PDT) Received: from localhost ([::1]:43848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY4y-0007Ir-VT for importer@patchew.org; Mon, 18 May 2020 01:12:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwt-000088-4p for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:23 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:22081 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwp-0004NU-FJ for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:22 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-4BFTv4l5NjSRv0HB5f7jPQ-1; Mon, 18 May 2020 01:04:14 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08CEA805731; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C91EF8208F; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 60EBC11358CF; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H5bAYuq8IxFxTWuifcj2i+IDfMnIMKYSHgvtt2OggQw=; b=HF4M4GPsWQBB51HPLmEePFqf876pjUGY0LJ7ApJLK33h69vlJkrqYYM+ogzzlmoagSkIId MSAPwFu+VVIE4VdDfo7uuDzACC9iiYyjBKpUNMGKdCkg8mFpXP1+A8f/bEONTQrfKmx/kh 4yQNHLO8AbyhO+qvtmARfNiwsyx900E= X-MC-Unique: 4BFTv4l5NjSRv0HB5f7jPQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 18/24] display/sm501 display/ati: Fix to realize "i2c-ddc" Date: Mon, 18 May 2020 07:04:02 +0200 Message-Id: <20200518050408.4579-19-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 23:32:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Magnus Damm , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , qemu-ppc@nongnu.org, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) sm501_init() and ati_vga_realize() create an "i2c-ddc" device, but neglect to realize it. Affects machines sam460ex, shix, r2d, and fulong2e. I wonder how this ever worked. If the "device becomes real only on realize" thing actually works, then we've always been missing the device, yet nobody noticed. Fix by realizing it right away. Visible in "info qom-tree"; here's the change for sam460ex: /machine (sam460ex-machine) [...] /unattached (container) [...] - /device[14] (sii3112) + /device[14] (i2c-ddc) + /device[15] (sii3112) [rest of device[*] renumbered...] Fixes: 4a1f253adb45ac6019971193d5077c4d5d55886a Fixes: 4a1f253adb45ac6019971193d5077c4d5d55886a Cc: BALATON Zoltan Cc: qemu-ppc@nongnu.org Cc: Magnus Damm Cc: Philippe Mathieu-Daud=C3=A9 Cc: Aleksandar Markovic Signed-off-by: Markus Armbruster Tested-by: BALATON Zoltan --- hw/display/ati.c | 1 + hw/display/sm501.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/display/ati.c b/hw/display/ati.c index 58ec8291d4..7c2177d7b3 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -929,6 +929,7 @@ static void ati_vga_realize(PCIDevice *dev, Error **err= p) bitbang_i2c_init(&s->bbi2c, i2cbus); I2CSlave *i2cddc =3D I2C_SLAVE(qdev_create(BUS(i2cbus), TYPE_I2CDDC)); i2c_set_slave_address(i2cddc, 0x50); + qdev_init_nofail(DEVICE(i2cddc)); =20 /* mmio register space */ memory_region_init_io(&s->mm, OBJECT(s), &ati_mm_ops, s, diff --git a/hw/display/sm501.c b/hw/display/sm501.c index acc692531a..132e75b641 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1816,6 +1816,7 @@ static void sm501_init(SM501State *s, DeviceState *de= v, /* ddc */ I2CDDCState *ddc =3D I2CDDC(qdev_create(BUS(s->i2c_bus), TYPE_I2CDDC)); i2c_set_slave_address(I2C_SLAVE(ddc), 0x50); + qdev_init_nofail(DEVICE(ddc)); =20 /* mmio */ memory_region_init(&s->mmio_region, OBJECT(dev), "sm501.mmio", MMIO_SI= ZE); --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589779008; cv=none; d=zohomail.com; s=zohoarc; b=P9h3XiC1WAYxa6wlp6oPaP3MzoXgB+QQZY9m+DJ5MEBvsCF06Kh7ukO6zSQElYbSRaSOtd88YeFFpmXRhPQqu7SzJ/JtFRILqLdnm3ddyNsMCK0KjST5a5l/PL/2g1zM93lhHwR1bXr0xQ73hzjUydZi895irZVoHBVTOZA4ufM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589779008; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QbsYhSE9ioLVhX+DtBofO92ZG8VtpgL76ljwlEnma5Q=; b=c71Mw3pd+/+3fM3EgUhpQ4B6fAlhr1QZSGZvvw55TNLkDiXb8EgqTp9QwNUyXijPLR4i2qEZ5B0oqK5V079WcHeXqNDsAj0ujcljwsFc4Bgc24xWClCKQTJZiKV2uk5jPLC57LcLQf36ftH9ytJvTMeUiOMZ+HE70Rv8bqSyD7k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589779008499153.66508464662138; Sun, 17 May 2020 22:16:48 -0700 (PDT) Received: from localhost ([::1]:53770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY8t-0003GL-28 for importer@patchew.org; Mon, 18 May 2020 01:16:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwr-0008VB-HW for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:57031 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwn-0004ML-7S for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-BcmzM-rEPKaiBwjeMWtUbA-1; Mon, 18 May 2020 01:04:14 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80FE01800707; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA7D72D0A8; Mon, 18 May 2020 05:04:12 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 66F4411358D0; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbsYhSE9ioLVhX+DtBofO92ZG8VtpgL76ljwlEnma5Q=; b=UMu4COF9brY200KTZjJSfCwNK48GQYAuTwoOgdVj8pDW9s1wf1pwpQ8Myll/jH3xiMm3d6 BuUTqaris5+gXiS9fDbQGvip2HAotuNNRXm3Gs/QLbl2wxyn3JWpj4Rt4y/uIzl4LOpB7N c/yCgDO+7E+bPHcHmGxfgxyev4sf2hM= X-MC-Unique: BcmzM-rEPKaiBwjeMWtUbA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 19/24] riscv: Fix to put "riscv.hart_array" devices on sysbus Date: Mon, 18 May 2020 07:04:03 +0200 Message-Id: <20200518050408.4579-20-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Sagar Karandikar , Bastian Koppelmann , Alistair Francis , qemu-riscv@nongnu.org, pbonzini@redhat.com, Palmer Dabbelt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" riscv_sifive_e_soc_init(), riscv_sifive_u_soc_init(), spike_board_init(), spike_v1_10_0_board_init(), spike_v1_09_1_board_init(), and riscv_virt_board_init() create "riscv-hart_array" sysbus devices in a way that leaves them unplugged. Create them the common way that puts them into the main system bus. Affects machines sifive_e, sifive_u, spike, spike_v1.10, spike_v1.9.1, and virt. Visible in "info qtree", here's the change for sifive_e: bus: main-system-bus type System + dev: riscv.hart_array, id "" + num-harts =3D 1 (0x1) + hartid-base =3D 0 (0x0) + cpu-type =3D "sifive-e31-riscv-cpu" dev: sifive_soc.gpio, id "" Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: qemu-riscv@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis --- hw/riscv/sifive_e.c | 5 ++--- hw/riscv/sifive_u.c | 14 ++++++-------- hw/riscv/spike.c | 12 ++++++------ hw/riscv/virt.c | 4 ++-- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index b53109521e..8831e6728e 100644 --- a/hw/riscv/sifive_e.c +++ b/hw/riscv/sifive_e.c @@ -120,9 +120,8 @@ static void riscv_sifive_e_soc_init(Object *obj) MachineState *ms =3D MACHINE(qdev_get_machine()); SiFiveESoCState *s =3D RISCV_E_SOC(obj); =20 - object_initialize_child(obj, "cpus", &s->cpus, - sizeof(s->cpus), TYPE_RISCV_HART_ARRAY, - &error_abort, NULL); + sysbus_init_child_obj(obj, "cpus", &s->cpus, + sizeof(s->cpus), TYPE_RISCV_HART_ARRAY); object_property_set_int(OBJECT(&s->cpus), ms->smp.cpus, "num-harts", &error_abort); sysbus_init_child_obj(obj, "riscv.sifive.e.gpio0", diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 4299bdf480..bb69fd8e48 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -491,10 +491,9 @@ static void riscv_sifive_u_soc_init(Object *obj) &error_abort, NULL); qdev_prop_set_uint32(DEVICE(&s->e_cluster), "cluster-id", 0); =20 - object_initialize_child(OBJECT(&s->e_cluster), "e-cpus", - &s->e_cpus, sizeof(s->e_cpus), - TYPE_RISCV_HART_ARRAY, &error_abort, - NULL); + sysbus_init_child_obj(OBJECT(&s->e_cluster), "e-cpus", + &s->e_cpus, sizeof(s->e_cpus), + TYPE_RISCV_HART_ARRAY); qdev_prop_set_uint32(DEVICE(&s->e_cpus), "num-harts", 1); qdev_prop_set_uint32(DEVICE(&s->e_cpus), "hartid-base", 0); qdev_prop_set_string(DEVICE(&s->e_cpus), "cpu-type", SIFIVE_E_CPU); @@ -504,10 +503,9 @@ static void riscv_sifive_u_soc_init(Object *obj) &error_abort, NULL); qdev_prop_set_uint32(DEVICE(&s->u_cluster), "cluster-id", 1); =20 - object_initialize_child(OBJECT(&s->u_cluster), "u-cpus", - &s->u_cpus, sizeof(s->u_cpus), - TYPE_RISCV_HART_ARRAY, &error_abort, - NULL); + sysbus_init_child_obj(OBJECT(&s->u_cluster), "u-cpus", + &s->u_cpus, sizeof(s->u_cpus), + TYPE_RISCV_HART_ARRAY); qdev_prop_set_uint32(DEVICE(&s->u_cpus), "num-harts", ms->smp.cpus - 1= ); qdev_prop_set_uint32(DEVICE(&s->u_cpus), "hartid-base", 1); qdev_prop_set_string(DEVICE(&s->u_cpus), "cpu-type", SIFIVE_U_CPU); diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index d0c4843712..01d52e758e 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -169,8 +169,8 @@ static void spike_board_init(MachineState *machine) unsigned int smp_cpus =3D machine->smp.cpus; =20 /* Initialize SOC */ - object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc= ), - TYPE_RISCV_HART_ARRAY, &error_abort, NULL); + sysbus_init_child_obj(OBJECT(machine), "soc", &s->soc, sizeof(s->soc), + TYPE_RISCV_HART_ARRAY); object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type", &error_abort); object_property_set_int(OBJECT(&s->soc), smp_cpus, "num-harts", @@ -275,8 +275,8 @@ static void spike_v1_10_0_board_init(MachineState *mach= ine) } =20 /* Initialize SOC */ - object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc= ), - TYPE_RISCV_HART_ARRAY, &error_abort, NULL); + sysbus_init_child_obj(OBJECT(machine), "soc", &s->soc, sizeof(s->soc), + TYPE_RISCV_HART_ARRAY); object_property_set_str(OBJECT(&s->soc), SPIKE_V1_10_0_CPU, "cpu-type", &error_abort); object_property_set_int(OBJECT(&s->soc), smp_cpus, "num-harts", @@ -365,8 +365,8 @@ static void spike_v1_09_1_board_init(MachineState *mach= ine) } =20 /* Initialize SOC */ - object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc= ), - TYPE_RISCV_HART_ARRAY, &error_abort, NULL); + sysbus_init_child_obj(OBJECT(machine), "soc", &s->soc, sizeof(s->soc), + TYPE_RISCV_HART_ARRAY); object_property_set_str(OBJECT(&s->soc), SPIKE_V1_09_1_CPU, "cpu-type", &error_abort); object_property_set_int(OBJECT(&s->soc), smp_cpus, "num-harts", diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index c695a44979..0f93e0d9c8 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -485,8 +485,8 @@ static void riscv_virt_board_init(MachineState *machine) unsigned int smp_cpus =3D machine->smp.cpus; =20 /* Initialize SOC */ - object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc= ), - TYPE_RISCV_HART_ARRAY, &error_abort, NULL); + sysbus_init_child_obj(OBJECT(machine), "soc", &s->soc, sizeof(s->soc), + TYPE_RISCV_HART_ARRAY); object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type", &error_abort); object_property_set_int(OBJECT(&s->soc), smp_cpus, "num-harts", --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778505; cv=none; d=zohomail.com; s=zohoarc; b=Cdn4A+lGuCORYoxWn7x4smfT9bTRScx6aZDrpx0TBXyCaE9U0KkPAMnNWDGq2XhbAkWvVJRdPZnJx0lRq5r+1VGqhuWE2ZqRcOvx+8Ziap3cZbG3lQ9VhMyxlyd8O1b9Y4HFCF6++vwaD04/rq8yLWLY2vQo382BzlmOc3EXr1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778505; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lVJABTHqDjEOYxKEc1EKWKTlkF5He+2BOTdJVrP8bcs=; b=Udxqis4Sy3oPlcZOG57+vlroWQYgQn9wzRAUsCo7PJwX5gSj/r5rm0GUoYDLyPy5UCs3jESpYhbR8fkR8JMm8FnoGzpl2N3aDeORp5AcVDbqP85jssBM6SB7geQHfh82651Gm0PQoP8NzGZrSmKVVE4fklCvA0i2/a8olkwxyVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778505975235.41707978173258; Sun, 17 May 2020 22:08:25 -0700 (PDT) Received: from localhost ([::1]:52152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY0m-0007Wq-O5 for importer@patchew.org; Mon, 18 May 2020 01:08:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwu-0000DJ-RN for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:24 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:59669 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwp-0004NL-9U for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:24 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-XQL1WfbDP6Of9tEapURBlw-1; Mon, 18 May 2020 01:04:14 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 69603EC1A9; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 029CD1001B2B; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6CE0F11358D1; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lVJABTHqDjEOYxKEc1EKWKTlkF5He+2BOTdJVrP8bcs=; b=f0G7RD4ppoukTgrRj+ZylxG4q9WKZbfTLa61Ebskkd0TeMxHV5tGKsG6hXOaKo1INKL8bZ T1+Uow0asfDseIADhlpylHR41hJOJEp/DnrqcDySPHUSOpoTZXXZA7d/9I30CImivaVhFe p1T0JZL6BVBDP1amP2eM7wENV47Hwhk= X-MC-Unique: XQL1WfbDP6Of9tEapURBlw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 20/24] riscv: Fix type of SiFive[EU]SocState, member parent_obj Date: Mon, 18 May 2020 07:04:04 +0200 Message-Id: <20200518050408.4579-21-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Sagar Karandikar , Bastian Koppelmann , Alistair Francis , qemu-riscv@nongnu.org, pbonzini@redhat.com, Palmer Dabbelt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Device "riscv.sifive.e.soc" is a direct subtype of TYPE_DEVICE, but its instance struct SiFiveESoCState's member @parent_obj is SysBusDevice instead of DeviceState. Correct that. Same for "riscv.sifive.u.soc"'s instance struct SiFiveUSoCState. Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: qemu-riscv@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/riscv/sifive_e.h | 2 +- include/hw/riscv/sifive_u.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/riscv/sifive_e.h b/include/hw/riscv/sifive_e.h index 25ce7aa9d5..f05644df7c 100644 --- a/include/hw/riscv/sifive_e.h +++ b/include/hw/riscv/sifive_e.h @@ -29,7 +29,7 @@ =20 typedef struct SiFiveESoCState { /*< private >*/ - SysBusDevice parent_obj; + DeviceState parent_obj; =20 /*< public >*/ RISCVHartArrayState cpus; diff --git a/include/hw/riscv/sifive_u.h b/include/hw/riscv/sifive_u.h index 16c297ec5f..5f62cf5f85 100644 --- a/include/hw/riscv/sifive_u.h +++ b/include/hw/riscv/sifive_u.h @@ -31,7 +31,7 @@ =20 typedef struct SiFiveUSoCState { /*< private >*/ - SysBusDevice parent_obj; + DeviceState parent_obj; =20 /*< public >*/ CPUClusterState e_cluster; --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589779198; cv=none; d=zohomail.com; s=zohoarc; b=N7fQgmFjr1mts74Ert6WGvwgeroWq/d4SF3P7MxQzXo4gK7Fj4BzqBfD/HirenUqy2UDH1nIcgD+7XsAb6zQ6q8UMj8CyhYr/TOv+szroCjMNAcbopzaEvrfKfDV+yUqBiQbmWr+/0R1Jy/hmDRKAUiAcKOs3lLFHhVKXLkA8b0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589779198; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=P94U20LYuAeV1P/fzoOqSMl+y60Cy8yJ6i9oCIIMJ/U=; b=TBlBGO+IG80mSxb+ZzHoJQeg9zxysarfJK9wYSv2nmCfb/ejAo8YUjwi1wbnPFGsTrUIJPjhDyMP836IWs0D4SwskEf8dqhGACFAcV9EVxj+woLQrr0aUmlHvMFs8aagIPYeZAt18ZjpDe9u+3HzdVi2wuEfHgMKMKcOfJegwvI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589779198769431.22050650282836; Sun, 17 May 2020 22:19:58 -0700 (PDT) Received: from localhost ([::1]:60400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaYBx-000671-9u for importer@patchew.org; Mon, 18 May 2020 01:19:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXws-00006S-Hb for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:22 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:58636 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwo-0004NF-VR for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-174-BjDC9FgVOuGH-m2qu1p6qQ-1; Mon, 18 May 2020 01:04:14 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79B09872FF2; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31F978208F; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 72A3D11358D2; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P94U20LYuAeV1P/fzoOqSMl+y60Cy8yJ6i9oCIIMJ/U=; b=XK0Rl0tjMoP4vuZ5VDWoJ8V9TCqUZ6MXQcA0RDTNcqeltXZs3i1NZXqtCqW7ZVUiDydjze LFwD8Nj8/tVDAdUqIOK0FH9PHcYEMWswbioiQaF+chAS6+kyBvwFn+cP4A93Y5I+HLpfrj sXy247y7Lu4a8j5O6uptJsokRy3XBGA= X-MC-Unique: BjDC9FgVOuGH-m2qu1p6qQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 21/24] sparc/leon3: Fix to put grlib,* devices on sysbus Date: Mon, 18 May 2020 07:04:05 +0200 Message-Id: <20200518050408.4579-22-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 23:32:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, Mark Cave-Ayland , Fabien Chouteau , KONRAD Frederic , pbonzini@redhat.com, Artyom Tarasenko Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" leon3_generic_hw_init() creates a "grlib,ahbpnp" and a "grlib,apbpnp" sysbus device in a way that leaves them unplugged. Create them the common way that puts them into the main system bus. Affects machine leon3_generic. Visible in "info qtree": bus: main-system-bus type System + dev: grlib,ahbpnp, id "" + mmio 00000000fffff000/0000000000001000 + dev: grlib,apbpnp, id "" + mmio 00000000800ff000/0000000000001000 dev: grlib,irqmp, id "" Cc: Fabien Chouteau Cc: KONRAD Frederic Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Signed-off-by: Markus Armbruster Reviewed-by: KONRAD Frederic Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/sparc/leon3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 8f024dab7b..3facb8c2ae 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -213,14 +213,14 @@ static void leon3_generic_hw_init(MachineState *machi= ne) reset_info->sp =3D LEON3_RAM_OFFSET + ram_size; qemu_register_reset(main_cpu_reset, reset_info); =20 - ahb_pnp =3D GRLIB_AHB_PNP(object_new(TYPE_GRLIB_AHB_PNP)); + ahb_pnp =3D GRLIB_AHB_PNP(qdev_create(NULL, TYPE_GRLIB_AHB_PNP)); object_property_set_bool(OBJECT(ahb_pnp), true, "realized", &error_fat= al); sysbus_mmio_map(SYS_BUS_DEVICE(ahb_pnp), 0, LEON3_AHB_PNP_OFFSET); grlib_ahb_pnp_add_entry(ahb_pnp, 0, 0, GRLIB_VENDOR_GAISLER, GRLIB_LEON3_DEV, GRLIB_AHB_MASTER, GRLIB_CPU_AREA); =20 - apb_pnp =3D GRLIB_APB_PNP(object_new(TYPE_GRLIB_APB_PNP)); + apb_pnp =3D GRLIB_APB_PNP(qdev_create(NULL, TYPE_GRLIB_APB_PNP)); object_property_set_bool(OBJECT(apb_pnp), true, "realized", &error_fat= al); sysbus_mmio_map(SYS_BUS_DEVICE(apb_pnp), 0, LEON3_APB_PNP_OFFSET); grlib_ahb_pnp_add_entry(ahb_pnp, LEON3_APB_PNP_OFFSET, 0xFFF, --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778630; cv=none; d=zohomail.com; s=zohoarc; b=fKT1ZSIaQKKkVSjw5NcYezoetCwC4PRpJRNL5EbM7cr8C1gRzFRa8Oo1m8/vWU0awlJUxoewHyMAlafLsOpE/67CFRXQO4pnZFiti9a4+0ggEReEvNo0+UQlVhkb3YA2VK6qxrMoVOLt/06I5UzsjTHZcHbrXzepP4hHhTud8tA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778630; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gvf+NuZKEgoIDtlGvhFH6oRIyWOBESwNssKiFmLd5IM=; b=ZV21urRJpcT8e/HqUQbXXNuGt0LO2haHi3wTEoT+xFgsc960tdnFLcIWD1OOK8t0y8vGBc4TOCDrhxPS5R/cHvpsFdzx6vgJIUBh7rCnGo9fCJfhypjRVqnb4r16Nlu0RZ48O+AGvp9GCOnkWuSUw3o1Cdr4j+4fmE4BYPOP9ig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778630606466.4023848226378; Sun, 17 May 2020 22:10:30 -0700 (PDT) Received: from localhost ([::1]:35300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY2n-0003lL-Di for importer@patchew.org; Mon, 18 May 2020 01:10:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwr-0008Tp-3n for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:21 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:48435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004M7-SY for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:20 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-7-U_nfTuEwOl-AKwG3n3L7xg-1; Mon, 18 May 2020 01:04:14 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E6D7107ACF4 for ; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2DAB42E163; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7A20911358D3; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gvf+NuZKEgoIDtlGvhFH6oRIyWOBESwNssKiFmLd5IM=; b=ejLgkzyAF3s7iaCtXpbaHEWBycJ8s/RN1eg/nS1QacXgHg75SVeH+Djijgtmec9ixZd+xU +2DB1U7MSuwpa4l6I/KaGYkfGQwYj3whfMGRPD5v/FvCDEzdwTSLAEWCeq3AjijmPug+xz fmhbdASOc8+Tk/sM+w47yq3U8f2AqUI= X-MC-Unique: U_nfTuEwOl-AKwG3n3L7xg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 22/24] qdev: Assert devices are plugged into a bus that can take them Date: Mon, 18 May 2020 07:04:06 +0200 Message-Id: <20200518050408.4579-23-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This would have caught some of the bugs I just fixed. Signed-off-by: Markus Armbruster Reviewed-by: Mark Cave-Ayland --- hw/core/qdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 9e5538aeae..0df995eb94 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -97,6 +97,11 @@ static void bus_add_child(BusState *bus, DeviceState *ch= ild) void qdev_set_parent_bus(DeviceState *dev, BusState *bus) { BusState *old_parent_bus =3D dev->parent_bus; + DeviceClass *dc =3D DEVICE_GET_CLASS(dev); + + assert(dc->bus_type + ? bus && object_dynamic_cast(OBJECT(bus), dc->bus_type) + : !bus); =20 if (old_parent_bus) { trace_qdev_update_parent_bus(dev, object_get_typename(OBJECT(dev)), --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778540; cv=none; d=zohomail.com; s=zohoarc; b=JZNz9CsxIDj602gjqjeOycR2l/LkVfiXVbVDzPdgXUy0BfE1lr5p1PZlZ0V22ralEtgq4KnVb6+i9WgKUQUWc0JyGxtpFF6kyYNLvzGPY0MWFqjMK8+o4N1yYIaTHrv2lAqyo1rD1tPdbufHBSw2jHQoEAHZU9odx2xCgbkkgo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778540; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zvHFdYt9se6trCGNkT8DFxWg/8xnuhIkc1P7DAzYEmM=; b=JNG1FiB372fg3pIgT9nx06tHuLPitY2Kl3eUBP0Bzpkv9dl+6A7Xu2Jit74Da03u7z28A4V1AU6mqkj/3ohCHToalE/Xwkg7g0i+yWAvhKbrh/aHAUHFcYNnlxpMW5PHXp+o7T4qQCLXMN6TUR/+AG78v4r7keha4OT3m/xBc7I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158977854064661.06876378706636; Sun, 17 May 2020 22:09:00 -0700 (PDT) Received: from localhost ([::1]:56120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY1L-0000ob-AR for importer@patchew.org; Mon, 18 May 2020 01:08:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwq-0008T5-Ok for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:20 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:60134 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwn-0004MH-5N for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:20 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-DbNtq3SVP06XQnEyHGZLZA-1; Mon, 18 May 2020 01:04:14 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D79F78014D7 for ; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E9D452FB4; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8008C11358D4; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zvHFdYt9se6trCGNkT8DFxWg/8xnuhIkc1P7DAzYEmM=; b=O+FuX3q+O4SEhjOx8o1enc3fOHcWZbGisGxA9LUb2yZ/JJY6tYzCyaoGt/WQ2OdaTCBXMD AUun9BClWYdOPgJH9PkMi9ID46u+XLz0IbZuLmf4FEaFBmuaj1WPgjucVOr7R87toNR3CU btG5M9XPjjB7dAWthwisV63DBMifcnk= X-MC-Unique: DbNtq3SVP06XQnEyHGZLZA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 23/24] sd: Hide the qdev-but-not-quite thing created by sd_init() Date: Mon, 18 May 2020 07:04:07 +0200 Message-Id: <20200518050408.4579-24-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 00:53:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Commit 260bc9d8aa "hw/sd/sd.c: QOMify" QOMified only the device itself, not its users. It kept sd_init() around for non-QOMified users. More than four years later, three such users remain: omap1 (machines cheetah, sx1, sx1-v1) and omap2 (machines n800, n810) are not QOMified, and pl181 (machines integratorcp, realview-eb, realview-eb-mpcore, realview-pb-a8 realview-pbx-a9, versatileab, versatilepb, vexpress-a15, vexpress-a9) is not QOMified properly. The issue I presently have with this: an "sd-card" device should plug into an "sd-bus" (its DeviceClass member bus_type says so), but sd_init() leaves it unplugged. This is normally a bug (I just fixed some instances), and I'd like to assert proper pluggedness to prevent regressions. However, the qdev-but-not-quite thing returned by sd_init() would fail the assertion. Meh. Make sd_init() hide it from QOM/qdev. Visible in "info qom-tree", here's the change for cheetah: /machine (cheetah-machine) [...] /unattached (container) [...] /device[5] (serial-mm) /serial (serial) /serial[0] (qemu:memory-region) - /device[6] (sd-card) - /device[7] (omap-gpio) + /device[6] (omap-gpio) [rest of device[*] renumbered...] Cc: "Philippe Mathieu-Daud=C3=A9" Signed-off-by: Markus Armbruster --- hw/sd/sd.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 71a9af09ab..d7d8b82dfd 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -83,6 +83,10 @@ enum SDCardStates { struct SDState { DeviceState parent_obj; =20 + /* If true, created by sd_init() for a non-qdevified caller */ + /* TODO purge them with fire */ + bool me_no_qdev_me_kill_mammoth_with_rocks; + /* SD Memory Card Registers */ uint32_t ocr; uint8_t scr[8]; @@ -129,6 +133,8 @@ struct SDState { bool cmd_line; }; =20 +static void sd_realize(DeviceState *dev, Error **errp); + static const char *sd_state_name(enum SDCardStates state) { static const char *state_name[] =3D { @@ -590,7 +596,7 @@ static void sd_cardchange(void *opaque, bool load, Erro= r **errp) { SDState *sd =3D opaque; DeviceState *dev =3D DEVICE(sd); - SDBus *sdbus =3D SD_BUS(qdev_get_parent_bus(dev)); + SDBus *sdbus; bool inserted =3D sd_get_inserted(sd); bool readonly =3D sd_get_readonly(sd); =20 @@ -601,19 +607,17 @@ static void sd_cardchange(void *opaque, bool load, Er= ror **errp) trace_sdcard_ejected(); } =20 - /* The IRQ notification is for legacy non-QOM SD controller devices; - * QOMified controllers use the SDBus APIs. - */ - if (sdbus) { - sdbus_set_inserted(sdbus, inserted); - if (inserted) { - sdbus_set_readonly(sdbus, readonly); - } - } else { + if (sd->me_no_qdev_me_kill_mammoth_with_rocks) { qemu_set_irq(sd->inserted_cb, inserted); if (inserted) { qemu_set_irq(sd->readonly_cb, readonly); } + } else { + sdbus =3D SD_BUS(qdev_get_parent_bus(dev)); + sdbus_set_inserted(sdbus, inserted); + if (inserted) { + sdbus_set_readonly(sdbus, readonly); + } } } =20 @@ -697,6 +701,7 @@ SDState *sd_init(BlockBackend *blk, bool is_spi) { Object *obj; DeviceState *dev; + SDState *sd; Error *err =3D NULL; =20 obj =3D object_new(TYPE_SD_CARD); @@ -707,13 +712,24 @@ SDState *sd_init(BlockBackend *blk, bool is_spi) return NULL; } qdev_prop_set_bit(dev, "spi", is_spi); - object_property_set_bool(obj, true, "realized", &err); + + /* + * Realizing the device properly would put it into the QOM + * composition tree even though it is not plugged into an + * appropriate bus. That's a no-no. Hide the device from + * QOM/qdev, and call its qdev realize callback directly. + */ + object_ref(obj); + object_unparent(obj); + sd_realize(dev, &err); if (err) { error_report("sd_init failed: %s", error_get_pretty(err)); return NULL; } =20 - return SD_CARD(dev); + sd =3D SD_CARD(dev); + sd->me_no_qdev_me_kill_mammoth_with_rocks =3D true; + return sd; } =20 void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert) --=20 2.21.1 From nobody Fri Nov 14 18:17:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1589778934; cv=none; d=zohomail.com; s=zohoarc; b=PA/qDXtgwTDQvnlCYJe5h8cvvd3LgbZec9giyxTNc93VgChmDWpJhnuA3xAu2nYwk9EAkgglzjgJxC4CcFJrTLgoQNQCmfHnouyXKOJEMrPLn207simJU4VIwMukKAkSXNzk3AwzzUUGiI6JNZvAESh9uAKyrYREdBtJQ0KfRJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589778934; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R5E6uW3t84il5PgRddNK0eX2QICClvdmWrIitYIgusE=; b=YCIxuhHG8Kbb5u1z0wV9yxnu2fkn9OlapRblFjdKk4OELcbna0now7QObxUpcGlR1q/ZaqhK6u+JbHDjYgdCf8qPgeI24aeI09btYy8qGHvuTl4uaGY4KadEpV45HxS5EitLde2CAw+L5LnaT2EBlHOzd5OrKJBdZZ85HWrNp8c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589778934182650.3153611602653; Sun, 17 May 2020 22:15:34 -0700 (PDT) Received: from localhost ([::1]:51414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaY7g-00025Y-Sk for importer@patchew.org; Mon, 18 May 2020 01:15:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaXwp-0008Qd-TI for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:19 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:50480 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jaXwm-0004M3-Pm for qemu-devel@nongnu.org; Mon, 18 May 2020 01:04:19 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-rGikMu1cPNWD6X9AkDMFQA-1; Mon, 18 May 2020 01:04:14 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0BDC872FF4 for ; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F1845D9DC; Mon, 18 May 2020 05:04:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 85D2E11358D5; Mon, 18 May 2020 07:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589778256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R5E6uW3t84il5PgRddNK0eX2QICClvdmWrIitYIgusE=; b=WjfiDAHc5CqfkcX1VSZf29vUAWXuQxYMffYNFT15Hci3302FWPXgc1khWMWh2vJeaevO4b do9Il3ZBvA4J8eDfEW3wz1sW4CbDpgewj72SCnUIrUIubmKChOSba+ae6f7WfxLXhQQhGU 8H9VHfNTsnj/vMQ9oc9N/FG3blvKXWk= X-MC-Unique: rGikMu1cPNWD6X9AkDMFQA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 24/24] qdev: Assert onboard devices all get realized properly Date: Mon, 18 May 2020 07:04:08 +0200 Message-Id: <20200518050408.4579-25-armbru@redhat.com> In-Reply-To: <20200518050408.4579-1-armbru@redhat.com> References: <20200518050408.4579-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 22:52:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This would have caught some of the bugs I just fixed. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/qdev.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 0df995eb94..fe2dea8968 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -429,6 +429,19 @@ void qdev_init_nofail(DeviceState *dev) object_unref(OBJECT(dev)); } =20 +static int qdev_assert_realized_properly(Object *obj, void *opaque) +{ + DeviceState *dev =3D DEVICE(object_dynamic_cast(obj, TYPE_DEVICE)); + DeviceClass *dc; + + if (dev) { + dc =3D DEVICE_GET_CLASS(dev); + assert(dev->realized); + assert(dev->parent_bus || !dc->bus_type); + } + return 0; +} + void qdev_machine_creation_done(void) { /* @@ -436,6 +449,9 @@ void qdev_machine_creation_done(void) * only create hotpluggable devices */ qdev_hotplug =3D true; + + object_child_foreach_recursive(object_get_root(), + qdev_assert_realized_properly, NULL); } =20 bool qdev_machine_modified(void) --=20 2.21.1