target/riscv: update APLIC and IMSIC to support KVM AIA
commit95a97b3fd25ee1c73a6bbfe0d47ac31864a95a4c
authorYong-Xuan Wang <yongxuan.wang@sifive.com>
Thu, 27 Jul 2023 10:24:36 +0000 (27 10:24 +0000)
committerAlistair Francis <alistair.francis@wdc.com>
Mon, 11 Sep 2023 01:45:55 +0000 (11 11:45 +1000)
tree85a36091eed846591e76d0d8365d99a441d65fe4
parent9634ef7eda5f5b57f03924351a213b776f6b8a23
target/riscv: update APLIC and IMSIC to support KVM AIA

KVM AIA can't emulate APLIC only. When "aia=aplic" parameter is passed,
APLIC devices is emulated by QEMU. For "aia=aplic-imsic", remove the
mmio operations of APLIC when using KVM AIA and send wired interrupt
signal via KVM_IRQ_LINE API.
After KVM AIA enabled, MSI messages are delivered by KVM_SIGNAL_MSI API
when the IMSICs receive mmio write requests.

Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Jim Shu <jim.shu@sifive.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Message-ID: <20230727102439.22554-5-yongxuan.wang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/intc/riscv_aplic.c
hw/intc/riscv_imsic.c