[RESEND PATCH 0/2] RISC-V: KVM: Fix G-stage fault handling

From: Xie Bo

Date: Mon Aug 10 2026 - 01:17:55 EST


The original posting did not reach the mailing lists because of a sender
configuration error. There are no code changes in this resend.

Fix two error paths in RISC-V KVM's G-stage fault handler.

The first patch releases a faulted-in page as unused when an MMU
invalidation prevents the page from being installed. The second patch
translates KVM_PFN_ERR_SIGPENDING to -EINTR instead of treating an
interrupted host fault as an invalid mapping.

Both issues were found while wiring pre-fault memory support, but affect
the existing vCPU fault path independently.

Tested with a full RV64 kernel build.

Xie Bo (2):
RISC-V: KVM: Release unused page after MMU invalidation
RISC-V: KVM: Propagate interrupted G-stage faults

arch/riscv/kvm/mmu.c | 10 ++++++++--
arch/riscv/kvm/vcpu_exit.c | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)


base-commit: dfdf1374fdeccb5b7e3d35186228e01ec5ea5f01