[PATCH 0/4] LoongArch: KVM: Code cleanup about feature detect

Bibo Mao posted 4 patches 1 week, 4 days ago
arch/loongarch/include/asm/kvm_host.h  |  5 ++++
arch/loongarch/include/asm/loongarch.h |  2 +-
arch/loongarch/kvm/interrupt.c         |  4 +--
arch/loongarch/kvm/main.c              |  8 ++++++
arch/loongarch/kvm/vcpu.c              |  6 +++--
arch/loongarch/kvm/vm.c                | 36 +++++++++++---------------
6 files changed, 35 insertions(+), 26 deletions(-)
[PATCH 0/4] LoongArch: KVM: Code cleanup about feature detect
Posted by Bibo Mao 1 week, 4 days ago
Here is code cleanup about feature detection, there is feature
initialization about host machine, feature checking about VM and host.

Also add register LOONGARCH_CSR_IPR during vCPU context switch, though
it is not used by msgint driver now, it is defined by HW and may be used
in future.

Bibo Mao (4):
  LoongArch: KVM: Move feature detection in function
    kvm_vm_init_features
  LoongArch: KVM: Add msgint registers in function kvm_init_gcsr_flag
  LoongArch: KVM: Check VM msgint feature during interrupt handling
  LoongArch: KVM: Add register LOONGARCH_CSR_IPR during vCPU context
    switch

 arch/loongarch/include/asm/kvm_host.h  |  5 ++++
 arch/loongarch/include/asm/loongarch.h |  2 +-
 arch/loongarch/kvm/interrupt.c         |  4 +--
 arch/loongarch/kvm/main.c              |  8 ++++++
 arch/loongarch/kvm/vcpu.c              |  6 +++--
 arch/loongarch/kvm/vm.c                | 36 +++++++++++---------------
 6 files changed, 35 insertions(+), 26 deletions(-)


base-commit: 1f97d9dcf53649c41c33227b345a36902cbb08ad
-- 
2.39.3
Re: [PATCH 0/4] LoongArch: KVM: Code cleanup about feature detect
Posted by Huacai Chen 1 week, 2 days ago
Series applied, thanks.

Huacai

On Wed, Jan 28, 2026 at 11:03 AM Bibo Mao <maobibo@loongson.cn> wrote:
>
> Here is code cleanup about feature detection, there is feature
> initialization about host machine, feature checking about VM and host.
>
> Also add register LOONGARCH_CSR_IPR during vCPU context switch, though
> it is not used by msgint driver now, it is defined by HW and may be used
> in future.
>
> Bibo Mao (4):
>   LoongArch: KVM: Move feature detection in function
>     kvm_vm_init_features
>   LoongArch: KVM: Add msgint registers in function kvm_init_gcsr_flag
>   LoongArch: KVM: Check VM msgint feature during interrupt handling
>   LoongArch: KVM: Add register LOONGARCH_CSR_IPR during vCPU context
>     switch
>
>  arch/loongarch/include/asm/kvm_host.h  |  5 ++++
>  arch/loongarch/include/asm/loongarch.h |  2 +-
>  arch/loongarch/kvm/interrupt.c         |  4 +--
>  arch/loongarch/kvm/main.c              |  8 ++++++
>  arch/loongarch/kvm/vcpu.c              |  6 +++--
>  arch/loongarch/kvm/vm.c                | 36 +++++++++++---------------
>  6 files changed, 35 insertions(+), 26 deletions(-)
>
>
> base-commit: 1f97d9dcf53649c41c33227b345a36902cbb08ad
> --
> 2.39.3
>