Commit 74967aa2 authored by Anup Patel's avatar Anup Patel Committed by Anup Patel

RISC-V: KVM: Add in-kernel emulation of AIA APLIC

There is no virtualization support in AIA APLIC so we add in-kernel
emulation of AIA APLIC which only supports MSI-mode (i.e. wired
interrupts forwarded to AIA IMSIC as MSIs).
Signed-off-by: default avatarAnup Patel <apatel@ventanamicro.com>
Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent 89d01306
...@@ -129,20 +129,9 @@ static inline void kvm_riscv_vcpu_aia_imsic_cleanup(struct kvm_vcpu *vcpu) ...@@ -129,20 +129,9 @@ static inline void kvm_riscv_vcpu_aia_imsic_cleanup(struct kvm_vcpu *vcpu)
{ {
} }
static inline int kvm_riscv_aia_aplic_inject(struct kvm *kvm, int kvm_riscv_aia_aplic_inject(struct kvm *kvm, u32 source, bool level);
u32 source, bool level) int kvm_riscv_aia_aplic_init(struct kvm *kvm);
{ void kvm_riscv_aia_aplic_cleanup(struct kvm *kvm);
return 0;
}
static inline int kvm_riscv_aia_aplic_init(struct kvm *kvm)
{
return 0;
}
static inline void kvm_riscv_aia_aplic_cleanup(struct kvm *kvm)
{
}
#ifdef CONFIG_32BIT #ifdef CONFIG_32BIT
void kvm_riscv_vcpu_aia_flush_interrupts(struct kvm_vcpu *vcpu); void kvm_riscv_vcpu_aia_flush_interrupts(struct kvm_vcpu *vcpu);
......
...@@ -28,3 +28,4 @@ kvm-y += vcpu_timer.o ...@@ -28,3 +28,4 @@ kvm-y += vcpu_timer.o
kvm-$(CONFIG_RISCV_PMU_SBI) += vcpu_pmu.o vcpu_sbi_pmu.o kvm-$(CONFIG_RISCV_PMU_SBI) += vcpu_pmu.o vcpu_sbi_pmu.o
kvm-y += aia.o kvm-y += aia.o
kvm-y += aia_device.o kvm-y += aia_device.o
kvm-y += aia_aplic.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment