From: Jamin Lin <jamin_lin@aspeedtech.com>
To: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"philmd@oss.qualcomm.com" <philmd@oss.qualcomm.com>,
"marcelomanzo@gmail.com" <marcelomanzo@gmail.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Kane Chen" <kane_chen@aspeedtech.com>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: Jamin Lin <jamin_lin@aspeedtech.com>,
Troy Lee <troy_lee@aspeedtech.com>,
"qemu-stable@nongnu.org" <qemu-stable@nongnu.org>
Subject: [PATCH v2] hw/pci-host/aspeed_pcie: Fix global MSI setting during class initialization
Date: Tue, 20 Oct 2026 03:37:56 +0000 [thread overview]
Message-ID: <20261020033755.2618640-1-jamin_lin@aspeedtech.com> (raw)
The ASPEED PCIe class may be registered for machines that do not
instantiate a PCIe root complex. Updating the global msi_nonbroken
flag from class_init() therefore affects unrelated machines.
Defer the update to the per-device realize handler, so the flag
changes only when an ASPEED PCIe root complex is actually
instantiated.
Reported-by: Marcelo Manzo <marcelomanzo@gmail.com>
Fixes: f002aa35f320 ("hw/pci-host/aspeed: Add AST2600 PCIe config space and host bridge")
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
hw/pci-host/aspeed_pcie.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/aspeed_pcie.c b/hw/pci-host/aspeed_pcie.c
index b46eb74234..ceb010f213 100644
--- a/hw/pci-host/aspeed_pcie.c
+++ b/hw/pci-host/aspeed_pcie.c
@@ -181,6 +181,8 @@ static void aspeed_pcie_rc_realize(DeviceState *dev, Error **errp)
g_autofree char *dram_alias_name = NULL;
g_autofree char *root_bus_name = NULL;
+ msi_nonbroken = true;
+
/* PCI configuration space */
pcie_host_mmcfg_init(pex, PCIE_MMCFG_SIZE_MAX);
sysbus_init_mmio(sbd, &pex->mmio);
@@ -294,8 +296,6 @@ static void aspeed_pcie_rc_class_init(ObjectClass *klass, const void *data)
hc->root_bus_path = aspeed_pcie_rc_root_bus_path;
device_class_set_props(dc, aspeed_pcie_rc_props);
-
- msi_nonbroken = true;
}
/*
--
2.43.0
next reply other threads:[~2026-10-20 3:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 3:37 Jamin Lin [this message]
2026-10-20 10:12 ` [PATCH v2] hw/pci-host/aspeed_pcie: Fix global MSI setting during class initialization Peter Maydell
2026-10-25 21:22 ` Cédric Le Goater
2026-10-20 13:56 ` Marcelo Manzo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261020033755.2618640-1-jamin_lin@aspeedtech.com \
--to=jamin_lin@aspeedtech.com \
--cc=clg@kaod.org \
--cc=kane_chen@aspeedtech.com \
--cc=marcelomanzo@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox