[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 01/27] hw/intc/riscv_aplic: APLICs should add child earlier tha
From: |
Alistair Francis |
Subject: |
[PULL v2 01/27] hw/intc/riscv_aplic: APLICs should add child earlier than realize |
Date: |
Mon, 3 Jun 2024 21:16:17 +1000 |
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>
---
hw/intc/riscv_aplic.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c
index fc5df0d598..32edd6d07b 100644
--- a/hw/intc/riscv_aplic.c
+++ b/hw/intc/riscv_aplic.c
@@ -1000,16 +1000,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.45.1
- [PULL v2 00/27] riscv-to-apply queue, Alistair Francis, 2024/06/03
- [PULL v2 02/27] target/riscv/kvm: Fix exposure of Zkr, Alistair Francis, 2024/06/03
- [PULL v2 01/27] hw/intc/riscv_aplic: APLICs should add child earlier than realize,
Alistair Francis <=
- [PULL v2 04/27] target/riscv/kvm: implement SBI debug console (DBCN) calls, Alistair Francis, 2024/06/03
- [PULL v2 06/27] target/riscv: change RISCV_EXCP_SEMIHOST exception number to 63, Alistair Francis, 2024/06/03
- [PULL v2 05/27] hw/riscv/boot.c: Support 64-bit address for initrd, Alistair Francis, 2024/06/03
- [PULL v2 03/27] target/riscv: Raise exceptions on wrs.nto, Alistair Francis, 2024/06/03
- [PULL v2 07/27] target/riscv/kvm: tolerate KVM disable ext errors, Alistair Francis, 2024/06/03
- [PULL v2 08/27] target/riscv/debug: set tval=pc in breakpoint exceptions, Alistair Francis, 2024/06/03
- [PULL v2 11/27] target/riscv: Add support for Zve64x extension, Alistair Francis, 2024/06/03
- [PULL v2 10/27] target/riscv: Add support for Zve32x extension, Alistair Francis, 2024/06/03
- [PULL v2 12/27] target/riscv: Relax vector register check in RISCV gdbstub, Alistair Francis, 2024/06/03
- [PULL v2 14/27] target/riscv/cpu.c: fix Zvkb extension config, Alistair Francis, 2024/06/03