All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: riscv: Add KVM_PRE_FAULT_MEMORY support
@ 2026-08-11  6:01 ` Jinyu Tang
  0 siblings, 0 replies; 15+ messages in thread
From: Jinyu Tang @ 2026-08-11  6:01 UTC (permalink / raw)
  To: Anup Patel, Anup Patel, Paolo Bonzini, Sean Christopherson
  Cc: kvm, kvm-riscv, linux-riscv, linux-kernel, linux-kselftest,
	Shuah Khan, Atish Patra, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Andrew Jones, Conor Dooley, Yong-Xuan Wang,
	Nutty Liu, Jinyu Tang, Jinyu Tang

This series adds RISC-V support for the generic KVM_PRE_FAULT_MEMORY
vcpu ioctl and enables the existing generic KVM selftest for RISC-V.

KVM_PRE_FAULT_MEMORY lets userspace ask KVM to populate stage-2 mappings
for a GPA range before running a vCPU that is expected to access that
range.  x86 already supports the ioctl; RISC-V currently falls back to
normal first-touch G-stage faults.

Patch 1 implements the RISC-V arch hook using the existing G-stage map
path.  Patch 2 fixes the RISC-V selftest page-table walker for Sv57,
which can be selected as the default guest mode.  Patch 3 enables
pre_fault_memory_test for RISC-V.

Tested with pre_fault_memory_test on a RISC-V KVM host.

Jinyu Tang (3):
  KVM: riscv: Implement KVM_PRE_FAULT_MEMORY
  KVM: selftests: Add RISC-V Sv57 page table indexing
  KVM: selftests: Enable pre_fault_memory_test for RISC-V

 arch/riscv/kvm/Kconfig                        |  1 +
 arch/riscv/kvm/gstage.c                       |  3 ++
 arch/riscv/kvm/mmu.c                          | 33 +++++++++++++++++++
 arch/riscv/kvm/vm.c                           |  1 +
 tools/testing/selftests/kvm/Makefile.kvm      |  1 +
 .../selftests/kvm/include/riscv/processor.h   |  6 ++++
 .../selftests/kvm/lib/riscv/processor.c       |  2 ++
 .../selftests/kvm/pre_fault_memory_test.c     |  3 ++
 8 files changed, 50 insertions(+)

-- 
2.43.0

-- 
kvm-riscv mailing list
kvm-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-08-11 17:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11  6:01 [PATCH 0/3] KVM: riscv: Add KVM_PRE_FAULT_MEMORY support Jinyu Tang
2026-08-11  6:01 ` Jinyu Tang
2026-08-11  6:01 ` Jinyu Tang
2026-08-11  6:01 ` [PATCH 1/3] KVM: riscv: Implement KVM_PRE_FAULT_MEMORY Jinyu Tang
2026-08-11  6:01   ` Jinyu Tang
2026-08-11  6:01   ` Jinyu Tang
2026-08-11  6:01 ` [PATCH 2/3] KVM: selftests: Add RISC-V Sv57 page table indexing Jinyu Tang
2026-08-11  6:01   ` Jinyu Tang
2026-08-11  6:01   ` Jinyu Tang
2026-08-11  6:01 ` [PATCH 3/3] KVM: selftests: Enable pre_fault_memory_test for RISC-V Jinyu Tang
2026-08-11  6:01   ` Jinyu Tang
2026-08-11  6:01   ` Jinyu Tang
2026-08-11 17:18   ` Sean Christopherson
2026-08-11 17:18     ` Sean Christopherson
2026-08-11 17:18     ` Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.