On Tue, Aug 4, 2026 at 2:23 PM <[email protected]> wrote: > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) > to consider: > - [High] Write faults on write-only `VM_IO | VM_PFNMAP` VMAs are incorrectly > rejected, breaking guest writes to write-only device memory. > > If a guest performs a memory write to a guest physical address backed by a > write-only host VMA (e.g. VM_IO or VM_PFNMAP mapped with PROT_WRITE but > without PROT_READ), get_user_pages() will fail and fall back to this lookup. > > Since the write-only VMA lacks VM_READ, this check will evaluate to true and > return KVM_PFN_ERR_FAULT, skipping the VM_IO | VM_PFNMAP handler. Could this > prevent guests from writing to legitimate write-only device memory, such as > command ring buffers or write-only PCI BARs?
This is theoretical only but actually a bugfix, because KVM does not support write-only mappings and therefore it would not be possible to enforce !PROT_READ/PROT_WRITE. Paolo
