From patchwork Thu Feb 8 18:12:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 770858 Delivered-To: patch@linaro.org Received: by 2002:adf:9dca:0:b0:33b:4db1:f5b3 with SMTP id q10csp464647wre; Thu, 8 Feb 2024 10:14:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW4KknVZg74pgPywggQdpgbi6dnK7lnDaPiG1u3yxeFTgUm8r6Ngyf3XYjNXqe1Pmw0WhD39yJEdkNIFnC5D0qF X-Google-Smtp-Source: AGHT+IESxSLFzN1UbujliD+Jn4dBJz5tW6hVXGzjpIAk3weBu1zWMoUn2+e2TWnA3GQUhQRoD3T3 X-Received: by 2002:a05:6214:29ca:b0:686:a29b:906a with SMTP id gh10-20020a05621429ca00b00686a29b906amr88604qvb.11.1707416052485; Thu, 08 Feb 2024 10:14:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707416052; cv=none; d=google.com; s=arc-20160816; b=oDrS1tlXw+EqHBN9S/f2Us6Wg0GovdPvJGbI6WGIzCvRP/s1ZTf9IgNL1VwrjzMSKz WapUjl4xRZ/WT4uAeRi7j36ggTdHIRR3XjNfQzD7fxw1WCgKf+TgmyhgNm3y+0qnijO+ RStzDbsKM2kyuQnMW72gQlFcyf8ipB3tpqV6MGQ3tPhT8106NQRt+jVEOOB6eWFIulmb KcIq+7B4LISO4ATMiTsQgwv+xk9PbKBp3kaEse3osJhf4wH519m7VbEeI+AFTlVLjUvE iPTtx5mmwYcZ53TKabJ9iWOfRMmOozCNn6fz+Ze2cFSb0BxyaZGjzzUhU0OYkfwFKeec +Ksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oP+Zl7qTTxZCu2Jq0yM9dMIapLtMm8swkthsq2XPVBs=; fh=NE26PbRSMnt8lS/DEtZmQTOIMttjlDRW0pvm+//BuX8=; b=qdBveRF7BfFHthKdaWbcGiYV9xv2A363gZU7+UHe95IdjwDm06Obhrf+/uOSGlgXvz +AYvFy49E1pfZTEl/bXwIIXE7Z3jsN8u7fDLnsNo93WZX6TkoW+wq9s65WkXn9zryR2f fW5N01fsOxAadjWnfKYSz9YZaertFcUO8rmS13yw6vPmShZsXLryLzxHsx/UJOD393xq Vg4WofX7S79o5GQC2bUbD8FBRq40wifVAC5K6/V9RgqIZPk1M1Vjxu2hiEa32UttXrh2 PPpGMCTOXHC0yJkKTf3SU+BhM43kjxh//BApxrwszzt5vcvkEDV0z+/ancy2p8vn/fWY IEFw==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q8cpAV8v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVQ2enisbYPrTS3ATg6SxhIj5X3Nyt9Ufvr+SBz5L1lHmiuwDvALQwtGhIUXxnoPyCt2KzFRDuJ0dN1bfUFdzi0 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f13-20020a056214076d00b0068cccc21b30si48518qvz.492.2024.02.08.10.14.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2024 10:14:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q8cpAV8v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY8tq-0004vE-CE; Thu, 08 Feb 2024 13:13:26 -0500 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 1rY8to-0004nb-3t for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:24 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tk-0006n9-PF for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:23 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5601eb97b29so315540a12.0 for ; Thu, 08 Feb 2024 10:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415999; x=1708020799; 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=oP+Zl7qTTxZCu2Jq0yM9dMIapLtMm8swkthsq2XPVBs=; b=q8cpAV8vsMGa4v7NOjgzmsS+/pS+sXYH2xx9nErwIH3c2pYXpuiQgEPanqVCTbz+iL Fvu3bWo/P2etA6N/MhVCD91jdiq6LZNulQ14mzG9gPIcYyQtewhoshULxNO/WO9rMo+n 25B9ZruI1kUzM7tLw3khLQxttvBtr5jrNRPUK/9fTAmmtSNskDjg217kMsCn3+9XcnMp OaAk0t/HkxOZKnS8ecXk4C1ku63we8etVVesa16AlY9IZt4kRU/5w4C5QZo8wGOi4b6F lN5c9bI5dJOBOQMFNQqvJQrWvAKx83o+BNAnIYcPPuE4m12yoljNEnz1C3XL3KSpZhhE U8Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415999; x=1708020799; 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=oP+Zl7qTTxZCu2Jq0yM9dMIapLtMm8swkthsq2XPVBs=; b=u7FN9t3j/i6HSkj81nEgvieV1j9KDyHp6snJKJW4NEBS1c/kT4RzGe1voyIIFFXuxF 5p4lbZnL3GFmHQ90uRe9MiKV5nvj5AbxPnl7V3PTCepCa3EuUcd8iCtTFnga91V+5EP+ 0hAdEferxn4K9u/szRm6wmUndk8bNoyLLwJmhkQpw95EsXuORxxUDvBN7gSD/LINPN3t ISw5vrtCSWS85PoQcC6Hr3oZGbk/7Upb3Hl/LG/l5QQ0RtOJ2TnOjXgE0tthHHPSv4Ne 1u9sjhkJs3sTWycWKUfLTIoZPdfzpsfLOwROGvGNN5Kh096WxjW3JX7n7RJPZ9laeFAA wEMA== X-Gm-Message-State: AOJu0YztpIu8coCZdoYgqKunX6RWws2cU32nAl4rQXt1dETvLSH7CDgo g0AXRwTSAicAWwM/f1sDMvuxSGGXgEu9RIjd5Xa0QNTG7atjZfRZ7tCnJ38aRwHnAeO7R+H0OP0 vGEs= X-Received: by 2002:a05:6402:8d8:b0:560:ef1d:a9e6 with SMTP id d24-20020a05640208d800b00560ef1da9e6mr318752edz.15.1707415999180; Thu, 08 Feb 2024 10:13:19 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXQV6J/JY3fLcszotp40NVy3j7JppsbUHNDxnA1/uudNIpeBG3fM9u4JPS3GVW4p+PbeBc9Z2h66ceTx+abSJJmYx/h9HxdSDwfYTy4POyjIXsTHNkoXzPNidaLvQrc3KVrX19xYfBDE9Z0+D+4OfLVCUuYV6p63+P2xc4ukkXJu91u9wvtBlWxcmxE7sXO4zhcRIJigOfLVFl/Kd6vH6sno7A623F7B9IT1ybBcjZxNaNkv02FNNC0O/t9vWz9eRiAXnhvBF6w51SEs9N4Y4+RcLonARwLAPHCcPJk2ytVy8ZUj0oe5iyBxjcQQL5G5ZrlwzPhCp/fxcK2nttamhJhhkSQVxSX2ShGrAI= Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id x3-20020a056402414300b0056058f2603asm1071801eda.3.2024.02.08.10.13.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Herv=C3=A9_Poussineau?= Subject: [PATCH v3 05/11] hw/ppc/prep: Realize ISA bridge before accessing it Date: Thu, 8 Feb 2024 19:12:38 +0100 Message-ID: <20240208181245.96617-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -278,9 +278,9 @@ static void ibm_40p_init(MachineState *machine) /* PCI -> ISA bridge */ i82378_dev = DEVICE(pci_new(PCI_DEVFN(11, 0), "i82378")); + qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); qdev_connect_gpio_out(i82378_dev, 0, qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); - qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); isa_bus = ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0"));