diff options
| author | Bibo Mao <maobibo@loongson.cn> | 2025-03-08 13:51:59 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-13 13:07:40 +0100 |
| commit | 445fca44d4921de415a7c0a2c52cc3ddbc3e29a0 (patch) | |
| tree | a2eeb3c552d81d147b1b71494dd140f75ebf0f5f /arch | |
| parent | e1fce6292ce9734462d1281a63f9d2c357185afb (diff) | |
| download | linux-445fca44d4921de415a7c0a2c52cc3ddbc3e29a0.tar.gz linux-445fca44d4921de415a7c0a2c52cc3ddbc3e29a0.tar.bz2 linux-445fca44d4921de415a7c0a2c52cc3ddbc3e29a0.zip | |
LoongArch: KVM: Add interrupt checking for AVEC
commit 6fb1867d5a44b0a061cf39d2492d23d314bcb8ce upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/loongarch/kvm/vcpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/kvm/vcpu.c b/arch/loongarch/kvm/vcpu.c index d18a4a270415..153b617c115b 100644 --- a/arch/loongarch/kvm/vcpu.c +++ b/arch/loongarch/kvm/vcpu.c @@ -311,7 +311,7 @@ static int kvm_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu) { int ret = RESUME_GUEST; unsigned long estat = vcpu->arch.host_estat; - u32 intr = estat & 0x1fff; /* Ignore NMI */ + u32 intr = estat & CSR_ESTAT_IS; u32 ecode = (estat & CSR_ESTAT_EXC) >> CSR_ESTAT_EXC_SHIFT; vcpu->mode = OUTSIDE_GUEST_MODE; |
