On Fri, Jul 25, 2025 at 2:06 PM Anup Patel <anup@xxxxxxxxxxxxxx> 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) Added SBI FWFT extension for Guest/VM with misaligned > delegation and pointer masking PMLEN features > 5) MMU related improvements for KVM RISC-V for the > upcoming nested virtualization support > > Please pull. Done, thanks. Paolo > 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-1 > > for you to fetch changes up to 583c7288feb43eb8cbb18d08376d328e9a48e72d: > > RISC-V: KVM: Avoid re-acquiring memslot in kvm_riscv_gstage_map() > (2025-07-23 17:20:41 +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 > - Added SBI FWFT extension for Guest/VM with misaligned > delegation and pointer masking PMLEN features > - 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 (4): > RISC-V: KVM: add SBI extension init()/deinit() functions > RISC-V: KVM: add SBI extension reset callback > RISC-V: KVM: add support for FWFT SBI extension > RISC-V: KVM: add support for SBI_FWFT_MISALIGNED_DELEG > > 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 (2): > RISC-V: KVM: Fix inclusion of Smnpm in the guest ISA bitmap > RISC-V: KVM: Add support for SBI_FWFT_POINTER_MASKING_PMLEN > > 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 | 109 +---- > arch/riscv/include/asm/kvm_mmu.h | 21 + > arch/riscv/include/asm/kvm_tlb.h | 84 ++++ > arch/riscv/include/asm/kvm_vcpu_sbi.h | 13 + > arch/riscv/include/asm/kvm_vcpu_sbi_fwft.h | 33 ++ > arch/riscv/include/asm/kvm_vmid.h | 27 ++ > arch/riscv/include/uapi/asm/kvm.h | 2 + > arch/riscv/kvm/Kconfig | 1 + > arch/riscv/kvm/Makefile | 2 + > 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 | 84 ++-- > arch/riscv/kvm/vcpu_sbi.c | 53 +++ > arch/riscv/kvm/vcpu_sbi_fwft.c | 338 ++++++++++++++ > 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 +++ > 31 files changed, 1382 insertions(+), 682 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_vcpu_sbi_fwft.h > create mode 100644 arch/riscv/include/asm/kvm_vmid.h > create mode 100644 arch/riscv/kvm/gstage.c > create mode 100644 arch/riscv/kvm/vcpu_sbi_fwft.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 >