From patchwork Thu Feb 8 18:12:33 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: 770853 Delivered-To: patch@linaro.org Received: by 2002:adf:9dca:0:b0:33b:4db1:f5b3 with SMTP id q10csp464265wre; Thu, 8 Feb 2024 10:13:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFC4Z5iU09Mv11yhVYtBWITK0Oukn0jbiGFx0nEoA41aepBE6j2kqqlQZ1KFkhSay9zERRO X-Received: by 2002:a67:fd81:0:b0:46d:372a:d114 with SMTP id k1-20020a67fd81000000b0046d372ad114mr509509vsq.16.1707416004741; Thu, 08 Feb 2024 10:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707416004; cv=none; d=google.com; s=arc-20160816; b=tnElFp1Unb/lGTe7874mlEtjvDkljAF+HgXgA7ZSe/UwbxRx/Yx1nh1h4usAsyre8T hZ+wHsGC3L4MDA5j3nOn4aqyrisPVPZTMHtm9CPrXAg++eG8zMyHJHXUsLsnndvQvauQ r1zN68DY+GSXDoBFj4akPK1EDynjpVFtHyRoX2eNGcu8xXZYkQHPxOQSvw0UXRh6P6aS 1oIj/9Y5M/oSbTsS33E8rJCqiCc/UywPxC3HwgLWMiQDNO3dvVg6rlCbfeFAGNITGIzX ww6KpAI6f5RORmmf0GLn4+MCPxuGdnJ1mqOmkzjIvbLx93JTPAcm9ljN74yE1N/fcIit LH4g== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=lxTc3jqSRUKEXY4j7x33THoNlB0OypgFh9Be8wo9PFw=; fh=HzoS+yylTN7JNxKsDtEGTdNmHFRZZ5jNbXRPY8N8A7s=; b=zGuWiByJjDE6tVwy7nDHms1KinmlY4/jbOfzq6zDRr+Bg1k652RD+Ri9QQH06JHowj +rVopxp8WN+Vm1Cn2p9oU0F+Bp4tKqStkSJRedYZnJIFEVZN1cXijN4BlIcPwroIOoMj D7CjxbRDRaO0HlfBIkBJhIyUgTDviTVhjOPsqIQYeYv55HAXBecdzl3UQ4gfAThJGIPF tAVaaFiQp7yyzOCL98dhn/bZODv5DGLTdViC4W2JuFAyR6J25fcOa2P6abQ4gk0/6NdN mMcwOsSEkZUvS/X1Iu76zZe8lbk0ZyzOf7sekwNzwNel/E830FY3QsUFJO5QUmUPvbE/ Q+JA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CxNWf5Eq; 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; AJvYcCV5ca86/4JFysaDgXHin6PGBOHDtklRKs5RkmXZo2LBMqAfXDVgerp6vNVW3hLNPBFwb3OFAnf+dlpMW0XbNNhL Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ij1-20020a0561025e8100b0046b12b63f57si79096vsb.667.2024.02.08.10.13.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2024 10:13:24 -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=CxNWf5Eq; 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 1rY8tL-00043a-ST; Thu, 08 Feb 2024 13:12:56 -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 1rY8tI-00043A-Ln for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:12:52 -0500 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8tG-0006jN-I6 for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:12:52 -0500 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-51168addef1so165470e87.1 for ; Thu, 08 Feb 2024 10:12:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415968; x=1708020768; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lxTc3jqSRUKEXY4j7x33THoNlB0OypgFh9Be8wo9PFw=; b=CxNWf5Eq7hYGE3BLucdav8+rxOsIyKevySChOoH6+XH1KPQtzCP4TKQ8LjWuZpaRmx aO/2UwPUJgHvg6av58vS9/B1jH1+TRezOgUPYG8bOOhSgpITj0F2CNW8qnVV1oRW5got 38HAo/aW9qs2Ug96ZwDUO8CSr8PNx6jJT1oUknKVYzYg7+5tZB7sLZBNjngzPBuWn5WF 2V/RymTLKUfLsbLW/8KUQN9EH23uSvF6HdWv3khTFk4t55AYdDu1Qxn6JtK/0PRvS2DM 63FikfnS7z217QmrfFXL2VESAC4nThnjgu0Eps8yaFvEfbExlaw/1GDXJwEfu3hD7OeX OG8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415968; x=1708020768; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lxTc3jqSRUKEXY4j7x33THoNlB0OypgFh9Be8wo9PFw=; b=vquDLDsLWjsh5mIuhWgOlyoM3CIxTMIsmlEN5v6u9huMmd9e/6jTijZQ6MpG6oztAz J+H+u7fdflKt7gWm4P2o5vp7tf37ExvHcrgWz03YoHYpE781g105RP3GDi0tgFJDfwit iB0OuFvyA38ex6GYvgke3JwgUrFE9uMW24Tsl8CmcouYjSAiOxPUTfAERoovkPgQOFtD 9ph9iJOTscepUSjbWLt+8V3idvQPlaCsUKVEsRsUTR9FsDAcPRmmV/Awir0CfUR9fB/G aH3lM2zI84woK8JvyXuv45dqa80ziEePMWZvZWGKXHjK+uFTeSRHGf8zQnML2E7MD2ga 5EZQ== X-Gm-Message-State: AOJu0YxeWihPtfnVpyq53FF6zgqqkghoNz9AzRUMgd6Wzf44+Ck4tf7g X4GbdPClDNJfqJoHqWNUCghxNa45jFr2aTNc9YxKGACkXt0/TTvC99yOOF9Vua5/AxEjnxp15KK pg64= X-Received: by 2002:a05:6512:3a86:b0:511:4a6e:59c1 with SMTP id q6-20020a0565123a8600b005114a6e59c1mr42903lfu.3.1707415968177; Thu, 08 Feb 2024 10:12:48 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUn9d8FpwwC50ysKTEoGY0+axwfWp/5cltV09CHgPYKGpS+GxoJd1XD5iKz38rUSc+KSuCpxnZLSTgTZjmsErKl3IXJ3l+LER4BEaDsZEKSHl2hmDLuoMA2ii6t6W2vNlGP6O8DNvkiI04saUlhclG/ltVKc9ShMlaLxgAQjjxr7fJEAOY0maEY0wb5Mac89LtCG4fTkFTugmEVfnn+bSyccA2nA61SyEH3nfUa1YA+9+4IVAItiJIASPTXtMfeLcHL0vFq0DSFzqco40sc/CBdEGG/7mthij/lCuaIAZmQXQnfbWaasM9Q6Z2KRtCcxBp7qEhH5A== Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id d4-20020a170907272400b00a39e0196eecsm303335ejl.26.2024.02.08.10.12.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:12:47 -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?= Subject: [PATCH v3 00/11] hw: Strengthen SysBus & QBus API Date: Thu, 8 Feb 2024 19:12:33 +0100 Message-ID: <20240208181245.96617-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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 Hi, This series ensure following is called *before* a device is realized: - qbus_new() - sysbus_init_mmio() - qdev_init_gpio_in_named_with_opaque() and these are called *after* it is: - sysbus_mmio_map() - sysbus_connect_irq(), - qdev_connect_gpio_out() - qdev_connect_gpio_out_named() Patches from v2 enforcing these checks will be posted in a separate series. Philippe Mathieu-Daudé (11): hw/ide/ich9: Use AHCIPCIState typedef hw/rx/rx62n: Reduce inclusion of 'qemu/units.h' hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary hw/i386/pc_q35: Realize LPC PCI function before accessing it hw/ppc/prep: Realize ISA bridge before accessing it hw/misc/macio: Realize IDE controller before accessing it hw/sh4/r2d: Realize IDE controller before accessing it hw/sparc/sun4m: Realize DMA controller before accessing it hw/sparc/leon3: Realize GRLIB IRQ controller before accessing it hw/sparc/leon3: Initialize GPIO before realizing CPU devices hw/sparc64/cpu: Initialize GPIO before realizing CPU devices include/hw/rx/rx62n.h | 2 -- hw/i386/pc_q35.c | 2 +- hw/ide/ich.c | 6 +++--- hw/misc/macio/macio.c | 8 +++++--- hw/ppc/prep.c | 2 +- hw/rx/rx-gdbsim.c | 1 + hw/rx/rx62n.c | 17 +++++++++-------- hw/sh4/r2d.c | 2 +- hw/sparc/leon3.c | 11 ++++++----- hw/sparc/sun4m.c | 7 +++++-- hw/sparc64/sparc64.c | 4 +++- 11 files changed, 35 insertions(+), 27 deletions(-)