aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>2024-11-19 16:17:02 -0300
committerAlistair Francis <alistair.francis@wdc.com>2024-12-20 11:22:47 +1000
commit3fd619db239fb37557dcd51a4b900417b893d706 (patch)
tree925db10f51213935bb9363dc1f9377f9040c467d /hw/riscv
parent2711e1e324a84e5ce3d7408d723c25d86fc892a8 (diff)
downloadqemu-3fd619db239fb37557dcd51a4b900417b893d706.zip
qemu-3fd619db239fb37557dcd51a4b900417b893d706.tar.gz
qemu-3fd619db239fb37557dcd51a4b900417b893d706.tar.bz2
target/riscv/kvm: consider irqchip_split() in aia_create()
Before adding support to kernel-irqchip=split when using KVM AIA we need to change how we create the in-kernel AIA device. In the use case we have so far, i.e. in-kernel irqchip without split mode, both the s-mode APLIC and IMSIC controllers are provided by the irqchip. In irqchip_split() mode we'll emulate the s-mode APLIC controller, which will send MSIs to the in-kernel IMSIC controller. To do that we need to change kvm_riscv_aia_create() to not create the in-kernel s-mode APLIC controller. In the kernel source arch/riscv/kvm/aia_aplic.c, function kvm_riscv_aia_aplic_init(), we verify that the APLIC controller won't be instantiated by KVM if we do not set 'nr_sources', which is set via KVM_DEV_RISCV_AIA_CONFIG_SRCS. For QEMU this means that we should not set 'aia_irq_num' during kvm_riscv_aia_create() in irqchip_split() mode. In this same condition, skip KVM_DEV_RISCV_AIA_ADDR_APLIC as well since it is used to set the base address for the in-kernel APLIC controller. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241119191706.718860-5-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv')
0 files changed, 0 insertions, 0 deletions