From nobody Wed Nov 27 16:52:58 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697725382; cv=none; d=zohomail.com; s=zohoarc; b=aOxNH0LbY0WSEoO1GcDH9o2DfEsv7lnD2CWlV0lP1fzI5zQavQsVSQy6j5g3c3p/reZn+CGWbVkADGwIfd5uh1qDS1f3m5a9oWyWhNLzGNxNBe0K7Bq9KyZNZUiLuO7tygONFC0kuLWVocyjjAvtrs6JcquDu48Zjqg5fodgtjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697725382; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8v7QjsFI/UQ66aMELorogiH5Qo/GKGcFOriZN36zvBM=; b=fSmhdV43s12L9vZr9p/J5tfN3M+BGO6rDcnU7Ee/19h66Af/8oJ9hIOEfGh3HPo/s3tQJYA8aaX7hCDmo2lPGUJZ/lstqryw7BVPelFrI+ZY7kjtwnLNwWQsY30CB42OcjWtHW5cDvVhjkDJ71V8ip173JXv4kQM1FRgDK4H0kY= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697725382112430.74056214138363; Thu, 19 Oct 2023 07:23:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtSqt-0000Hp-T4; Thu, 19 Oct 2023 09:14:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtSpz-0007GG-LB for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:23 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtSpx-0002SR-8K for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:13:19 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so100502601fa.3 for ; Thu, 19 Oct 2023 06:13:16 -0700 (PDT) Received: from m1x-phil.lan (176-131-216-177.abo.bbox.fr. [176.131.216.177]) by smtp.gmail.com with ESMTPSA id m16-20020a7bca50000000b00405d9a950a2sm4335932wml.28.2023.10.19.06.13.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721195; x=1698325995; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8v7QjsFI/UQ66aMELorogiH5Qo/GKGcFOriZN36zvBM=; b=nRu+Gnd/gciYPITH+dTK5fS+368XivaJf6t7hGwXTq+NBfbzy+hFDVfHZx2v8CMdFf fNezw5ed0lZqiY8F8pIV7iwb9XGbqI+fiBNm4ubokNys44ffExuRnfAYE9l8q6TsQYog FsQYR1Eq3byBDDwzdZFYaIbnCo31YdmjIn/ZoE9xkxad4in2P7Q+ZQRNKM+HwpOIsYU/ eyIqYqZVyuUPIQbsEamfzG8Lp6N8Y158Yyf9YWOdpfvPwY1/4LeRa7FcnBjCx4yp1daH sex32oWkijOhlJe+WbRrd4gxT63ff27JhR1ihluaTwXuSqjNb98+qjFyzZhRzl/W3fYS 55Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721195; x=1698325995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8v7QjsFI/UQ66aMELorogiH5Qo/GKGcFOriZN36zvBM=; b=pqa/iQv7bhlDacvq4YpVOT9Efv4WNINy0MnZ63KrwA6z669Jd0AcokGN5uk+0cwGjx iXQIm5t+MzQNnIbGLZ/eF11zbJrS+Hf79155ULjVSoLRMRbmmO9ZzfBqcA7Ft7kAIZmL UfK6iMcL2zD4PptzrMUra6MIhdiyR9iyECbSDSSLUbHV35ECSei4la3lHn2/Y1N4/XGj 6vVME3QnAthLVH6/x4IH7+P+4XSbbQu9j5JaUAGUIy17pVWZouZQIE+rzrZw4F6SHtvy 0l8ydeys/TwpVdXoq3yb6HS/kdD51cWGvDZ1BzDCAJOpzDtBgva4VG56VfdYuWxSqoTM gdIA== X-Gm-Message-State: AOJu0YyIn84KuWILsIBOt/kPD0inT+giLfiZW8HzU2lutk9B+HJVEGL4 RYSctSyz7eCJBvw7jX5FVhtiemVbvlXjN9C87TpAQA== X-Google-Smtp-Source: AGHT+IFQcUojotVsITG3itR50XEFMK3MdBByNnXjQ2UtV/GN+El1hYU+5HLsAxqlQwO/RjEg3ish0Q== X-Received: by 2002:a2e:9b0a:0:b0:2c4:feef:852 with SMTP id u10-20020a2e9b0a000000b002c4feef0852mr1254865lji.32.1697721194948; Thu, 19 Oct 2023 06:13:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Richard Henderson , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= , Harsh Prateek Bora , David Gibson , Nicholas Piggin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , LIU Zhiwei , Daniel Henrique Barboza , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/7] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it Date: Thu, 19 Oct 2023 15:12:59 +0200 Message-ID: <20231019131305.19157-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019131305.19157-1-philmd@linaro.org> References: <20231019131305.19157-1-philmd@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.google.com 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, 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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697725384534100003 qbus_new() should not be called on unrealized device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- hw/ppc/spapr_vio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 9d4fec2c04..f8ef2b6fa8 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr_vio.c @@ -574,13 +574,14 @@ SpaprVioBus *spapr_vio_bus_init(void) =20 /* Create bridge device */ dev =3D qdev_new(TYPE_SPAPR_VIO_BRIDGE); - sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); =20 /* Create bus on bridge device */ qbus =3D qbus_new(TYPE_SPAPR_VIO_BUS, dev, "spapr-vio"); bus =3D SPAPR_VIO_BUS(qbus); bus->next_reg =3D SPAPR_VIO_REG_BASE; =20 + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); + /* hcall-vio */ spapr_register_hypercall(H_VIO_SIGNAL, h_vio_signal); =20 --=20 2.41.0