Here make interrupt status acquire interface simpler, add new interface
kvm_vcpu_sync_intr() to sync pending interrupt to software ESTAT
register, and remove expensive vcpu_load() and vcpu_put() function call.
Also interrupt inject is handled with batch method, rather one by one.
---
v2 ... v3:
1. Split patch 1 into two smaller patches, one is smaller bugfix patch
with irq validility check in kvm_vcpu_ioctl_interrupt(), so that it
is easy to porting to old kernel.
v1 ... v2:
1. Add irq validility check in function kvm_vcpu_ioctl_interrupt().
2. Add valid bit check when set ESTAT CSR register.
3. Merge two patches about interrupt clear and set with batch method into
one.
---
Bibo Mao (6):
LoongArch: KVM: Check irq validility in kvm_vcpu_ioctl_interrupt()
LoongArch: KVM: Check msgint feature in interrupt post
LoongArch: KVM: Use existing macro about interrupt bit mask
LoongArch: KVM: Inject interrupt with batch method
LoongArch: KVM: Add valid bit check when set ESTAT CSR register
LoongArch: KVM: Simple interrupt status acquire interface
arch/loongarch/include/asm/kvm_vcpu.h | 44 +++++---
arch/loongarch/kvm/interrupt.c | 140 +++++++++++++-------------
arch/loongarch/kvm/vcpu.c | 54 ++++++----
3 files changed, 134 insertions(+), 104 deletions(-)
base-commit: 70eda68668d1476b459b64e69b8f36659fa9dfa8
--
2.39.3