qemu/target
Daniel Henrique Barboza 3fd619db23 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>
2024-12-20 11:22:47 +10:00
..
alpha target/alpha: Set default NaN pattern explicitly 2024-12-11 15:31:05 +00:00
arm target/arm: Enable FEAT_XS for the max cpu 2024-12-17 15:17:46 +00:00
avr target/avr: Constify all Property 2024-12-15 12:53:54 -06:00
hexagon target/hexagon: Constify all Property 2024-12-15 12:53:57 -06:00
hppa target/hppa: Set default NaN pattern explicitly 2024-12-11 15:31:05 +00:00
i386 target/i386: Constify all Property 2024-12-15 12:54:02 -06:00
loongarch target/loongarch: Set default NaN pattern explicitly 2024-12-11 15:31:05 +00:00
m68k target/m68k: Set default NaN pattern explicitly 2024-12-11 15:31:06 +00:00
microblaze target/microblaze: Constify all Property 2024-12-15 12:54:05 -06:00
mips target/mips: Constify all Property 2024-12-15 12:54:07 -06:00
openrisc target/openrisc: Set default NaN pattern explicitly 2024-12-11 15:31:06 +00:00
ppc * rust: better integration with clippy, rustfmt and rustdoc 2024-12-12 18:40:32 -05:00
riscv target/riscv/kvm: consider irqchip_split() in aia_create() 2024-12-20 11:22:47 +10:00
rx target/rx: Set default NaN pattern explicitly 2024-12-11 15:31:07 +00:00
s390x target/s390x: Constify all Property 2024-12-15 12:54:12 -06:00
sh4 target/sh4: Set default NaN pattern explicitly 2024-12-11 15:31:06 +00:00
sparc target/sparc: Constify all Property and PropertyInfo 2024-12-15 12:54:15 -06:00
tricore target/tricore: Set default NaN pattern explicitly 2024-12-11 15:31:07 +00:00
xtensa * rust: better integration with clippy, rustfmt and rustdoc 2024-12-12 18:40:32 -05:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00