Skip to content

Commit 6fb1867

Browse files
bibo-maochenhuacai
authored andcommitted
LoongArch: KVM: Add interrupt checking for AVEC
There is a newly added macro INT_AVEC with CSR ESTAT register, which is bit 14 used for LoongArch AVEC support. AVEC interrupt status bit 14 is supported with macro CSR_ESTAT_IS, so here replace the hard-coded value 0x1fff with macro CSR_ESTAT_IS so that the AVEC interrupt status is also supported by KVM. Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 3109d5f commit 6fb1867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/loongarch/kvm/vcpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu)
311311
{
312312
int ret = RESUME_GUEST;
313313
unsigned long estat = vcpu->arch.host_estat;
314-
u32 intr = estat & 0x1fff; /* Ignore NMI */
314+
u32 intr = estat & CSR_ESTAT_IS;
315315
u32 ecode = (estat & CSR_ESTAT_EXC) >> CSR_ESTAT_EXC_SHIFT;
316316

317317
vcpu->mode = OUTSIDE_GUEST_MODE;

0 commit comments

Comments
 (0)