Skip to content

Commit d252435

Browse files
BillXiangavpatel
authored andcommitted
riscv: KVM: Remove unnecessary vcpu kick
Remove the unnecessary kick to the vCPU after writing to the vs_file of IMSIC in kvm_riscv_vcpu_aia_imsic_inject. For vCPUs that are running, writing to the vs_file directly forwards the interrupt as an MSI to them and does not need an extra kick. For vCPUs that are descheduled after emulating WFI, KVM will enable the guest external interrupt for that vCPU in kvm_riscv_aia_wakeon_hgei. This means that writing to the vs_file will cause a guest external interrupt, which will cause KVM to wake up the vCPU in hgei_interrupt to handle the interrupt properly. Signed-off-by: BillXiang <xiangwencheng@lanxincomputing.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Radim Krčmář <rkrcmar@ventanamicro.com> Link: https://lore.kernel.org/r/20250221104538.2147-1-xiangwencheng@lanxincomputing.com Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent 351e02b commit d252435

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/riscv/kvm/aia_imsic.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,6 @@ int kvm_riscv_vcpu_aia_imsic_inject(struct kvm_vcpu *vcpu,
974974

975975
if (imsic->vsfile_cpu >= 0) {
976976
writel(iid, imsic->vsfile_va + IMSIC_MMIO_SETIPNUM_LE);
977-
kvm_vcpu_kick(vcpu);
978977
} else {
979978
eix = &imsic->swfile->eix[iid / BITS_PER_TYPE(u64)];
980979
set_bit(iid & (BITS_PER_TYPE(u64) - 1), eix->eip);

0 commit comments

Comments
 (0)