- tests: bump QOS_PATH_MAX_ELEMENT_SIZE again - softmmu/physmem: fix memory leak in dirty_memory_extend() - crypto: run qcrypto_pbkdf2_count_iters in a new thread - hw/audio/virtio-sound: fix heap buffer overflow - hw/intc/arm_gic: fix spurious level triggered interrupts - ui/sdl2: set swap interval explicitly when OpenGL is enabled - target/riscv/kvm: tolerate KVM disable ext errors - virtio: remove virtio_tswap16s() call in vring_packed_event_read() - block: fix -Werror=maybe-uninitialized false-positive - hw/remote/vfio-user: Fix config space access byte order - hw/loongarch/virt: Fix memory leak - hw/intc/riscv_aplic: APLICs should add child earlier than realize - stdvga: fix screen blanking - ui/gtk: Draw guest frame at refresh cycle - target/i386: fix size of EBP writeback in gen_enter() - virtio-net: drop too short packets early - target/ppc: Fix lxv/stxv MSR facility check - target/ppc: Fix lxvx/stxvx facility check - virtio-snd: add max size bounds check in input cb(CVE-2024-7730) Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit e2eb79f1867bb8d8d870e758f06d2a32b3a4fc8a)
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From 8ee63ce50289adb4ea346901366bd30aa23e412a Mon Sep 17 00:00:00 2001
|
|
From: "yang.zhang" <yang.zhang@hexintek.com>
|
|
Date: Tue, 9 Apr 2024 09:44:45 +0800
|
|
Subject: [PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than
|
|
realize
|
|
|
|
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: zhujun2 <zhujun2_yewu@cmss.chinamobile.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 c677b5cfbb..2fdf85444e 100644
|
|
--- a/hw/intc/riscv_aplic.c
|
|
+++ b/hw/intc/riscv_aplic.c
|
|
@@ -974,16 +974,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.41.0.windows.1
|
|
|