On Thu, 17 Sep 2026 00:14:09 +0530, Manish Honap wrote:
> +     * Record the base the guest programs into a decoder so the commit 
> handler
> +     * can reject a base other than the device's CFMWS window. The base low
[...]
> +        vdev->cxl.guest_base_lo = (uint32_t)data & 
> VFIO_CXL_HDM_BASE_LOW_MASK;
> +        vdev->cxl.guest_base_written = true;

This answered my v1 question for the kernel v4 FSM model.  With v5
(20/27) the kernel gives a live read-only view and leaves any write
virtualization to the VMM, and what QEMU shows the guest is a
committed, locked decoder at the window base.  A locked decoder
ignores a base write, but here it is recorded, and if it differs from
the window base the next rescan unmaps while reads still return
Committed at the window base.  That is the mismatch the check was
meant to prevent.  A current Linux guest never writes a locked
decoder, so it won't trip this.

Is the guest-written base still meant to matter in this model?  If
not, guest_base_{lo,hi,written} can go.

> +     * The kernel runs the lock-on-commit FSM in the write above, so the
> +     * committed state is settled by now; a control write on any decoder can

Stale now that the kernel no longer acts on the write?

Junjie

Reply via email to