KVM/riscv changes for 6.17
Subsystems (3)
Anup Patel
maintainerHi Paolo,
We have the following KVM RISC-V changes for 6.17:
1) Enabled ring-based dirty memory tracking
2) Improved "perf kvm stat" to report interrupt events
3) Delegate illegal instruction trap to VS-mode
4) MMU related improvements for KVM RISC-V for the upcoming nested virtualization support
Please pull.
Regards,
Anup
The following changes since commit 4cec89db80ba81fa4524c6449c0494b8ae08eeb0:
RISC-V: KVM: Move HGEI[E|P] CSR access to IMSIC virtualization
(2025-07-11 18:33:27 +0530)
are available in the Git repository at:
https://github.com/kvm-riscv/linux.git tags/kvm-riscv-6.17-2
for you to fetch changes up to 07a289a031404ec583c01d8e87680d434fc62c1f:
RISC-V: KVM: Avoid re-acquiring memslot in kvm_riscv_gstage_map()
(2025-07-28 22:28:31 +0530)
----------------------------------------------------------------
KVM/riscv changes for 6.17
- Enabled ring-based dirty memory tracking
- Improved perf kvm stat to report interrupt events
- Delegate illegal instruction trap to VS-mode
- MMU related improvements for KVM RISC-V for upcoming nested virtualization
----------------------------------------------------------------
Anup Patel (12):
RISC-V: KVM: Check kvm_riscv_vcpu_alloc_vector_context() return value
RISC-V: KVM: Drop the return value of kvm_riscv_vcpu_aia_init()
RISC-V: KVM: Rename and move kvm_riscv_local_tlb_sanitize()
RISC-V: KVM: Replace KVM_REQ_HFENCE_GVMA_VMID_ALL with KVM_REQ_TLB_FLUSH
RISC-V: KVM: Don't flush TLB when PTE is unchanged
RISC-V: KVM: Implement kvm_arch_flush_remote_tlbs_range()
RISC-V: KVM: Use ncsr_xyz() in kvm_riscv_vcpu_trap_redirect()
RISC-V: KVM: Factor-out MMU related declarations into separate headers
RISC-V: KVM: Introduce struct kvm_gstage_mapping
RISC-V: KVM: Add vmid field to struct kvm_riscv_hfence
RISC-V: KVM: Factor-out g-stage page table management
RISC-V: KVM: Pass VMID as parameter to kvm_riscv_hfence_xyz() APIs
Clément Léger (2):
RISC-V: KVM: add SBI extension init()/deinit() functions
RISC-V: KVM: add SBI extension reset callback
Quan Zhou (4):
RISC-V: KVM: Enable ring-based dirty memory tracking
RISC-V: perf/kvm: Add reporting of interrupt events
RISC-V: KVM: Use find_vma_intersection() to search for intersecting VMAs
RISC-V: KVM: Avoid re-acquiring memslot in kvm_riscv_gstage_map()
Samuel Holland (1):
RISC-V: KVM: Fix inclusion of Smnpm in the guest ISA bitmap
Xu Lu (1):
RISC-V: KVM: Delegate illegal instruction fault to VS mode
Documentation/virt/kvm/api.rst | 2 +- arch/riscv/include/asm/kvm_aia.h | 2 +- arch/riscv/include/asm/kvm_gstage.h | 72 +++ arch/riscv/include/asm/kvm_host.h | 105 +---- arch/riscv/include/asm/kvm_mmu.h | 21 + arch/riscv/include/asm/kvm_tlb.h | 84 ++++ arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 + arch/riscv/include/asm/kvm_vmid.h | 27 ++ arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/Kconfig | 1 + arch/riscv/kvm/Makefile | 1 + arch/riscv/kvm/aia_device.c | 6 +- arch/riscv/kvm/aia_imsic.c | 12 +- arch/riscv/kvm/gstage.c | 338 ++++++++++++++ arch/riscv/kvm/main.c | 3 +- arch/riscv/kvm/mmu.c | 509 +++++---------------- arch/riscv/kvm/tlb.c | 110 ++--- arch/riscv/kvm/vcpu.c | 48 +- arch/riscv/kvm/vcpu_exit.c | 20 +- arch/riscv/kvm/vcpu_onereg.c | 83 ++-- arch/riscv/kvm/vcpu_sbi.c | 49 ++ arch/riscv/kvm/vcpu_sbi_replace.c | 17 +- arch/riscv/kvm/vcpu_sbi_sta.c | 3 +- arch/riscv/kvm/vcpu_sbi_v01.c | 25 +- arch/riscv/kvm/vm.c | 7 +- arch/riscv/kvm/vmid.c | 25 + tools/perf/arch/riscv/util/kvm-stat.c | 6 +- tools/perf/arch/riscv/util/riscv_exception_types.h | 35 -- tools/perf/arch/riscv/util/riscv_trap_types.h | 57 +++ 29 files changed, 1000 insertions(+), 681 deletions(-) create mode 100644 arch/riscv/include/asm/kvm_gstage.h create mode 100644 arch/riscv/include/asm/kvm_mmu.h create mode 100644 arch/riscv/include/asm/kvm_tlb.h create mode 100644 arch/riscv/include/asm/kvm_vmid.h create mode 100644 arch/riscv/kvm/gstage.c delete mode 100644 tools/perf/arch/riscv/util/riscv_exception_types.h create mode 100644 tools/perf/arch/riscv/util/riscv_trap_types.h
This pull request was applied to riscv/linux.git (fixes) by Paolo Bonzini <[email protected]>:
Hello:
This pull request was applied to riscv/linux.git (fixes) by Paolo Bonzini <[email protected]>:
Quoted 10 lines · On Tue, 29 Jul 2025 17:04:22 +0530 you wrote:
Hi Paolo,
We have the following KVM RISC-V changes for 6.17:
1) Enabled ring-based dirty memory tracking
2) Improved "perf kvm stat" to report interrupt events
3) Delegate illegal instruction trap to VS-mode
4) MMU related improvements for KVM RISC-V for the upcoming nested virtualization support[...]
Here is the summary with links:
- [GIT,PULL,v2] KVM/riscv changes for 6.17
https://git.kernel.org/riscv/c/65164fd0f6b5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
This pull request was applied to riscv/linux.git (for-next) by Paolo Bonzini <[email protected]>:
Hello:
This pull request was applied to riscv/linux.git (for-next) by Paolo Bonzini <[email protected]>:
Quoted 10 lines · On Tue, 29 Jul 2025 17:04:22 +0530 you wrote:
Hi Paolo,
We have the following KVM RISC-V changes for 6.17:
1) Enabled ring-based dirty memory tracking
2) Improved "perf kvm stat" to report interrupt events
3) Delegate illegal instruction trap to VS-mode
4) MMU related improvements for KVM RISC-V for the upcoming nested virtualization support[...]
Here is the summary with links:
- [GIT,PULL,v2] KVM/riscv changes for 6.17
https://git.kernel.org/riscv/c/65164fd0f6b5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html