summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-09-23 18:37:09 +0300
committerHuacai Chen <chenhuacai@kernel.org>2025-09-23 18:37:09 +0300
commiteb626c7704dc9dbc2eee2c2bee281992d36de6da (patch)
tree814e2e4dba8b29027faeb35bcd9f6a99224e963a
parent2f412eb7650c369744420cc2d06404fe3f1fb79f (diff)
downloadlinux-eb626c7704dc9dbc2eee2c2bee281992d36de6da.tar.xz
LoongArch: KVM: Add IRR and ISR register read emulation
With LS7A user manual, there are registers PCH_PIC_INT_IRR_START and PCH_PIC_INT_ISR_START. So add read access emulation in function loongarch_pch_pic_read() here. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
-rw-r--r--arch/loongarch/kvm/intc/pch_pic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/loongarch/kvm/intc/pch_pic.c b/arch/loongarch/kvm/intc/pch_pic.c
index f41ef8c42ece..c19cf9d7b08a 100644
--- a/arch/loongarch/kvm/intc/pch_pic.c
+++ b/arch/loongarch/kvm/intc/pch_pic.c
@@ -168,6 +168,12 @@ static int loongarch_pch_pic_read(struct loongarch_pch_pic *s, gpa_t addr, int l
/* we only use defalut value 0: high level triggered */
*(u32 *)val = 0;
break;
+ case PCH_PIC_INT_IRR_START:
+ data = s->irr;
+ break;
+ case PCH_PIC_INT_ISR_START:
+ data = s->isr;
+ break;
default:
ret = -EINVAL;
}