diff options
author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2024-11-19 16:17:03 -0300 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2024-12-20 11:22:47 +1000 |
commit | b319ef15b899c31cad985e50640393483479a3db (patch) | |
tree | 5a930029e982136792348bb5c076d717d1d24926 /tests | |
parent | 3fd619db239fb37557dcd51a4b900417b893d706 (diff) | |
download | qemu-b319ef15b899c31cad985e50640393483479a3db.zip qemu-b319ef15b899c31cad985e50640393483479a3db.tar.gz qemu-b319ef15b899c31cad985e50640393483479a3db.tar.bz2 |
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>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions