Re: [PATCH v4 2/9] KVM: arm64: Drop an incomplete MMIO access when resetting a vcpu

From: Steffen Eiden

Date: Fri Dec 04 2026 - 04:25:00 EST


On Fri, Dec 04, 2026 at 11:48:06AM +0300, Dan Carpenter wrote:
> When a vcpu exits to userspace for an MMIO access, the next KVM_RUN
> completes it. So for a read, the next run increments the PC counter
> and copies data from userspace to the destination vcpu register.
>
> A reset should cancel the MMIO read/write access. Otherwise the next
> run will copy memory from userspace to the vcpu and increment the PC
> which skips the first instruction.
>
> Clear vcpu->mmio_needed in kvm_reset_vcpu().
>
> Fixes: 45e96ea6b369 ("KVM: ARM: Handle I/O aborts")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Dan Carpenter <dan@xxxxxxxx>

Reviewed-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>