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 <apatel@ventanamicro.com>
  • Loading branch information
avpatel committed May 10, 2022
1 parent 12baac5 commit 84b7089
Show file tree
Hide file tree
Showing 3 changed files with 564 additions and 14 deletions.
17 changes: 3 additions & 14 deletions arch/riscv/include/asm/kvm_aia.h
Expand Up @@ -113,20 +113,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_64BIT
static inline void kvm_riscv_vcpu_aia_flush_interrupts(struct kvm_vcpu *vcpu)
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/kvm/Makefile
Expand Up @@ -26,3 +26,4 @@ kvm-y += vcpu_sbi_hsm.o
kvm-y += vcpu_timer.o
kvm-y += aia.o
kvm-y += aia_device.o
kvm-y += aia_aplic.o

0 comments on commit 84b7089

Please sign in to comment.