[PATCH v3 0/4] LongArch: KVM: Add AVEC support irqchip in kernel

Song Gao posted 4 patches 1 week, 6 days ago
arch/loongarch/include/asm/irq.h       |   8 ++
arch/loongarch/include/asm/kvm_dintc.h |  22 +++++
arch/loongarch/include/asm/kvm_host.h  |   8 ++
arch/loongarch/include/uapi/asm/kvm.h  |   4 +
arch/loongarch/kvm/Makefile            |   1 +
arch/loongarch/kvm/intc/dintc.c        | 116 +++++++++++++++++++++++++
arch/loongarch/kvm/interrupt.c         |   1 +
arch/loongarch/kvm/irqfd.c             |  45 ++++++++--
arch/loongarch/kvm/main.c              |   5 ++
arch/loongarch/kvm/vcpu.c              |  55 ++++++++++++
drivers/irqchip/irq-loongarch-avec.c   |   5 +-
include/uapi/linux/kvm.h               |   2 +
12 files changed, 263 insertions(+), 9 deletions(-)
create mode 100644 arch/loongarch/include/asm/kvm_dintc.h
create mode 100644 arch/loongarch/kvm/intc/dintc.c
[PATCH v3 0/4] LongArch: KVM: Add AVEC support irqchip in kernel
Posted by Song Gao 1 week, 6 days ago
Hi,

This series adds AVEC-related macros, implements the DINTC in-kernel irqchip device,
enables irqfd to deliver MSI to DINTC, and supports injecting MSI interrupts
to the target vCPU.


V3: Fix kvm_arch_set_irq_inatomic() missing dintc set msi.(patch3)

V2:
https://patchew.org/linux/20251128091125.2720148-1-gaosong@loongson.cn/

Thanks.
Song Gao

Song Gao (4):
  LongArch: KVM: Add some maccros for AVEC
  LongArch: KVM: Add DINTC device support
  LongArch: KVM: Add irqfd set dintc msi
  LongArch: KVM: Add dintc inject msi to the dest vcpu

 arch/loongarch/include/asm/irq.h       |   8 ++
 arch/loongarch/include/asm/kvm_dintc.h |  22 +++++
 arch/loongarch/include/asm/kvm_host.h  |   8 ++
 arch/loongarch/include/uapi/asm/kvm.h  |   4 +
 arch/loongarch/kvm/Makefile            |   1 +
 arch/loongarch/kvm/intc/dintc.c        | 116 +++++++++++++++++++++++++
 arch/loongarch/kvm/interrupt.c         |   1 +
 arch/loongarch/kvm/irqfd.c             |  45 ++++++++--
 arch/loongarch/kvm/main.c              |   5 ++
 arch/loongarch/kvm/vcpu.c              |  55 ++++++++++++
 drivers/irqchip/irq-loongarch-avec.c   |   5 +-
 include/uapi/linux/kvm.h               |   2 +
 12 files changed, 263 insertions(+), 9 deletions(-)
 create mode 100644 arch/loongarch/include/asm/kvm_dintc.h
 create mode 100644 arch/loongarch/kvm/intc/dintc.c

-- 
2.39.3
Re: [PATCH v3 0/4] LongArch: KVM: Add AVEC support irqchip in kernel
Posted by Huacai Chen 5 days, 23 hours ago
Hi, Song,

On Sat, Dec 6, 2025 at 3:11 PM Song Gao <gaosong@loongson.cn> wrote:
>
> Hi,
>
> This series adds AVEC-related macros, implements the DINTC in-kernel irqchip device,
> enables irqfd to deliver MSI to DINTC, and supports injecting MSI interrupts
> to the target vCPU.
>
>
> V3: Fix kvm_arch_set_irq_inatomic() missing dintc set msi.(patch3)
>
> V2:
> https://patchew.org/linux/20251128091125.2720148-1-gaosong@loongson.cn/
>
> Thanks.
> Song Gao
>
> Song Gao (4):
>   LongArch: KVM: Add some maccros for AVEC
The first patch has been merged.

For others, I prefer the AVEC/AVECINTC naming rather than DINTC, since
the driver name and your cover letter both call it AVEC.
But If you don't like AVEC or want to keep consistency with the user
manual, please use DMSINTC because the IOCSR feature bit is called
DMSI.

Huacai

>   LongArch: KVM: Add DINTC device support
>   LongArch: KVM: Add irqfd set dintc msi
>   LongArch: KVM: Add dintc inject msi to the dest vcpu
>
>  arch/loongarch/include/asm/irq.h       |   8 ++
>  arch/loongarch/include/asm/kvm_dintc.h |  22 +++++
>  arch/loongarch/include/asm/kvm_host.h  |   8 ++
>  arch/loongarch/include/uapi/asm/kvm.h  |   4 +
>  arch/loongarch/kvm/Makefile            |   1 +
>  arch/loongarch/kvm/intc/dintc.c        | 116 +++++++++++++++++++++++++
>  arch/loongarch/kvm/interrupt.c         |   1 +
>  arch/loongarch/kvm/irqfd.c             |  45 ++++++++--
>  arch/loongarch/kvm/main.c              |   5 ++
>  arch/loongarch/kvm/vcpu.c              |  55 ++++++++++++
>  drivers/irqchip/irq-loongarch-avec.c   |   5 +-
>  include/uapi/linux/kvm.h               |   2 +
>  12 files changed, 263 insertions(+), 9 deletions(-)
>  create mode 100644 arch/loongarch/include/asm/kvm_dintc.h
>  create mode 100644 arch/loongarch/kvm/intc/dintc.c
>
> --
> 2.39.3
>
>