[PATCH] KVM: riscv: Only fast-path dirty-log write faults on host-writable leaves
Jinyu Tang
jinyu.tang at linux.dev
Fri Oct 23 04:57:47 PDT 2026
On Sat, Oct 17, 2026 at 12:09:26PM +0900, SeungJu Cheon wrote:
> + /* Let the slow path handle host-side write protection and CoW. */
> + if (!(pte_val(old_pte) & KVM_GSTAGE_PTE_HOST_WRITABLE)) {
> + ret = false;
> + break;
> + }
Thanks for fixing this.
Tested on QEMU 10.2.1 with a private memfd mapping and dirty logging.
A guest read followed by a write corrupts the shared backing without
this fix; and with it, CoW occurs and the backing stays unchanged.
Reviewed-by: Jinyu Tang <jinyu.tang at linux.dev>
Thanks,
Jinyu
More information about the kvm-riscv
mailing list