Skip to content

Commit

Permalink
RISC-V: KVM: Add in-kernel emulation of AIA APLIC
Browse files Browse the repository at this point in the history
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: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Anup Patel <[email protected]>
  • Loading branch information
avpatel committed Jun 18, 2023
1 parent 89d0130 commit 74967aa
Show file tree
Hide file tree
Showing 3 changed files with 580 additions and 14 deletions.
17 changes: 3 additions & 14 deletions arch/riscv/include/asm/kvm_aia.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
u32 source, bool level)
{
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)
{
}
int kvm_riscv_aia_aplic_inject(struct kvm *kvm, u32 source, bool level);
int kvm_riscv_aia_aplic_init(struct kvm *kvm);
void kvm_riscv_aia_aplic_cleanup(struct kvm *kvm);

#ifdef CONFIG_32BIT
void kvm_riscv_vcpu_aia_flush_interrupts(struct kvm_vcpu *vcpu);
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ kvm-y += vcpu_timer.o
kvm-$(CONFIG_RISCV_PMU_SBI) += vcpu_pmu.o vcpu_sbi_pmu.o
kvm-y += aia.o
kvm-y += aia_device.o
kvm-y += aia_aplic.o
Loading

0 comments on commit 74967aa

Please sign in to comment.