RISC-V: KVM: Virtualize per-HART AIA CSRs
authorAnup Patel <apatel@ventanamicro.com>
Wed, 11 Jan 2023 05:56:10 +0000 (11:26 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 21 Apr 2023 12:40:27 +0000 (18:10 +0530)
commit2f4d58f7635aec014428e73ef6120c4d0377c430
tree1b7ebc96658063067c58e7bdf88053d11a41017d
parent6b1e8ba4bac49d99232026cae7eb8db3d338f9c2
RISC-V: KVM: Virtualize per-HART AIA CSRs

The AIA specification introduce per-HART AIA CSRs which primarily
support:
* 64 local interrupts on both RV64 and RV32
* priority for each of the 64 local interrupts
* interrupt filtering for local interrupts

This patch virtualize above mentioned AIA CSRs and also extend
ONE_REG interface to allow user-space save/restore Guest/VM
view of these CSRs.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_aia.h
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/aia.c