qemu/hw
Daniel Henrique Barboza b319ef15b8 hw/riscv/virt.c, riscv_aplic.c: add 'emulated_aplic' helpers
The current logic to determine if we don't need an emulated APLIC
controller, i.e. KVM will provide for us, is to determine if we're
running KVM, with in-kernel irqchip support, and running
aia=aplic-imsic. This is modelled by riscv_is_kvm_aia_aplic_imsic() and
virt_use_kvm_aia_aplic_imsic().

This won't suffice to support irqchip_split() mode: it will match
exactly the same conditions as the one above, but setting the irqchip to
'split' mode will now require us to emulate an APLIC s-mode controller,
like we're doing with 'aia=aplic'.

Create a new riscv_use_emulated_aplic() helper that will encapsulate
this logic. Replace the uses of "riscv_is_kvm_aia_aplic_imsic()" with
this helper every time we're taking a decision on emulate an APLIC
controller or not. Do the same in virt.c with virt_use_emulated_aplic().

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241119191706.718860-6-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2024-12-20 11:22:47 +10:00
..
9pfs hw/9pfs: Constify all Property 2024-12-15 12:54:19 -06:00
acpi hw/acpi: Constify all Property 2024-12-15 12:54:23 -06:00
adc hw/adc: Constify all Property 2024-12-15 12:54:25 -06:00
alpha alpha: switch boards to "default y" 2024-05-03 15:47:47 +02:00
arm hw/arm: Constify all Property 2024-12-15 12:54:27 -06:00
audio hw/audio: Constify all Property 2024-12-15 12:54:30 -06:00
avr hw/avr: Constify all Property 2024-12-15 12:54:33 -06:00
block hw/block: Constify all Property 2024-12-15 12:54:38 -06:00
char hw/char: Constify all Property 2024-12-15 12:54:40 -06:00
core x86/loader: fix efi binary loading 2024-12-16 14:20:33 -05:00
cpu hw/cpu: Constify all Property 2024-12-15 12:54:47 -06:00
cxl hw/cxl: Constify all Property 2024-12-15 12:54:49 -06:00
display hw/display: Constify all Property 2024-12-15 12:54:51 -06:00
dma hw/dma: Constify all Property 2024-12-15 12:54:54 -06:00
fsi hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
gpio hw/gpio: Constify all Property 2024-12-15 12:54:56 -06:00
hppa hw: Use pci_bus_add_fw_cfg_extra_pci_roots() 2024-12-14 00:16:20 +01:00
hyperv hw/hyperv: Constify all Property 2024-12-15 12:54:59 -06:00
i2c hw/i2c: Constify all Property 2024-12-15 12:55:01 -06:00
i386 x86/loader: fix efi binary loading 2024-12-16 14:20:33 -05:00
ide hw/ide: Constify all Property 2024-12-15 12:55:06 -06:00
input hw/input: Constify all Property 2024-12-15 12:55:09 -06:00
intc hw/riscv/virt.c, riscv_aplic.c: add 'emulated_aplic' helpers 2024-12-20 11:22:47 +10:00
ipack hw/ipack: Constify all Property 2024-12-15 12:55:14 -06:00
ipmi hw/ipmi: Constify all Property 2024-12-15 12:55:16 -06:00
isa hw/isa: Constify all Property 2024-12-15 12:55:19 -06:00
loongarch hw/loongarch/boot: Use warn_report when no kernel filename 2024-11-02 15:20:41 +08:00
m68k hw/m68k: Constify all Property 2024-12-15 12:55:21 -06:00
mem hw/mem: Constify all Property 2024-12-15 12:55:29 -06:00
microblaze hw/microblaze/s3adsp1800: Declare machine type using DEFINE_TYPES macro 2024-11-05 23:32:13 +00:00
mips hw/mips: Constify all Property 2024-12-15 12:55:31 -06:00
misc hw/misc: Constify all Property 2024-12-15 12:55:39 -06:00
net hw/net: Constify all Property 2024-12-15 12:55:41 -06:00
nubus hw/nubus: Constify all Property 2024-12-15 12:55:44 -06:00
nvme hw/nvme: Constify all Property 2024-12-15 12:55:46 -06:00
nvram hw/nvram: Constify all Property 2024-12-15 12:55:49 -06:00
openrisc hw/openrisc/openrisc_sim: keep serial@90000000 as default 2024-12-03 12:26:24 +01:00
pci hw/pci: Constify all Property 2024-12-15 12:55:56 -06:00
pci-bridge hw/pci-bridge: Constify all Property 2024-12-15 12:55:51 -06:00
pci-host hw/pci-host: Constify all Property 2024-12-15 12:55:54 -06:00
ppc hw/ppc: Constify all Property 2024-12-15 12:55:59 -06:00
remote hw/remote: Constify all Property 2024-12-15 12:56:01 -06:00
riscv hw/riscv/virt.c, riscv_aplic.c: add 'emulated_aplic' helpers 2024-12-20 11:22:47 +10:00
rtc hw/rtc: Constify all Property 2024-12-15 12:56:06 -06:00
rx hw/rx: Constify all Property 2024-12-15 12:56:08 -06:00
s390x hw/s390x: Constify all Property 2024-12-15 12:56:10 -06:00
scsi hw/scsi: Constify all Property 2024-12-15 12:56:12 -06:00
sd hw/sd: Constify all Property 2024-12-15 12:56:15 -06:00
sensor hw/sensor: Replace type_register() with type_register_static() 2024-12-10 18:49:25 +01:00
sh4 hw/sh4/r2d: Include missing 'exec/tswap.h' header 2024-12-14 00:16:20 +01:00
smbios smbios: make memory device size configurable per Machine 2024-07-22 20:15:41 -04:00
sparc hw/sparc: Constify all Property 2024-12-15 12:56:17 -06:00
sparc64 hw/sparc64: Constify all Property 2024-12-15 12:56:19 -06:00
ssi hw/ssi: Constify all Property 2024-12-15 12:56:22 -06:00
timer hw/timer: Constify all Property 2024-12-15 12:56:26 -06:00
tpm hw/tpm: Constify all Property 2024-12-15 12:56:29 -06:00
tricore hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
ufs hw/ufs: Constify all Property 2024-12-15 12:56:32 -06:00
usb hw/usb: Constify all Property 2024-12-15 12:56:34 -06:00
vfio hw/vfio: Constify all Property 2024-12-15 12:56:37 -06:00
virtio hw/virtio: Constify all Property 2024-12-15 12:56:40 -06:00
watchdog hw/watchdog: Constify all Property 2024-12-15 12:56:42 -06:00
xen hw/xen: Constify all Property 2024-12-15 12:56:45 -06:00
xenpv hw/xen: Register framebuffer backend via xen_backend_init() 2024-06-04 11:53:43 +02:00
xtensa hw/xtensa: Include missing 'exec/tswap.h' header 2024-12-14 00:16:20 +01:00
Kconfig hw: Remove PCMCIA subsystem 2024-10-15 15:16:17 +01:00
meson.build hw: Remove PCMCIA subsystem 2024-10-15 15:16:17 +01:00