[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.5 29/45] hw/intc/riscv_aplic: APLICs should add child earlie
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.5 29/45] hw/intc/riscv_aplic: APLICs should add child earlier than realize |
Date: |
Fri, 7 Jun 2024 22:12:48 +0300 |
From: "yang.zhang" <yang.zhang@hexintek.com>
Since only root APLICs can have hw IRQ lines, aplic->parent should
be initialized first.
Fixes: e8f79343cf ("hw/intc: Add RISC-V AIA APLIC device emulation")
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: yang.zhang <yang.zhang@hexintek.com>
Cc: qemu-stable <qemu-stable@nongnu.org>
Message-ID: <20240409014445.278-1-gaoshanliukou@163.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit c76b121840c6ca79dc6305a5f4bcf17c72217d9c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c
index 6e816e33bf..ab23399a8d 100644
--- a/hw/intc/riscv_aplic.c
+++ b/hw/intc/riscv_aplic.c
@@ -975,16 +975,16 @@ DeviceState *riscv_aplic_create(hwaddr addr, hwaddr size,
qdev_prop_set_bit(dev, "msimode", msimode);
qdev_prop_set_bit(dev, "mmode", mmode);
+ if (parent) {
+ riscv_aplic_add_child(parent, dev);
+ }
+
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
if (!is_kvm_aia(msimode)) {
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, addr);
}
- if (parent) {
- riscv_aplic_add_child(parent, dev);
- }
-
if (!msimode) {
for (i = 0; i < num_harts; i++) {
CPUState *cpu = cpu_by_arch_id(hartid_base + i);
--
2.39.2
- [Stable-8.2.5 00/45] Patch Round-up for stable 8.2.5, frozen on 2024-06-07, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 20/45] gitlab: Update msys2-64bit runner tags, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 22/45] gitlab: use $MAKE instead of 'make', Michael Tokarev, 2024/06/07
- [Stable-8.2.5 23/45] gitlab: use 'setarch -R' to workaround tsan bug, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 24/45] hvf: arm: Fix encodings for ID_AA64PFR1_EL1 and debug System registers, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 25/45] hw/intc/arm_gic: Fix handling of NS view of GICC_APR<n>, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 26/45] target/arm: Disable SVE extensions when SVE is disabled, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 27/45] qio: Inherit follow_coroutine_ctx across TLS, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 30/45] target/riscv/kvm: tolerate KVM disable ext errors, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 28/45] iotests: test NBD+TLS+iothread, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 29/45] hw/intc/riscv_aplic: APLICs should add child earlier than realize,
Michael Tokarev <=
- [Stable-8.2.5 31/45] target/riscv: Fix the element agnostic function problem, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 32/45] target/riscv/cpu.c: fix Zvkb extension config, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 33/45] target/riscv: rvv: Fix Zvfhmin checking for vfwcvt.f.f.v and vfncvt.f.f.w instructions, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 34/45] target/riscv: rvv: Check single width operator for vector fp widen instructions, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 35/45] target/riscv: rvv: Check single width operator for vfncvt.rod.f.f.w, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 36/45] target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 37/45] target/riscv: prioritize pmp errors in raise_mmu_exception(), Michael Tokarev, 2024/06/07
- [Stable-8.2.5 38/45] target/riscv: do not set mtval2 for non guest-page faults, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 39/45] target/riscv: rvzicbo: Fixup CBO extension register calculation, Michael Tokarev, 2024/06/07
- [Stable-8.2.5 40/45] target/riscv/kvm.c: Fix the hart bit setting of AIA, Michael Tokarev, 2024/06/07