This fix is a port from Dan's fix to KVM/arm64. See Link. 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: 0630ce34a00d ("KVM: s390: arm64: Implement vCPU IOCTLs") Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/20261130-double_exception_v3-v3-2-864856664b26@pereq.eu Signed-off-by: Steffen Eiden --- @Dan: I copied the commit message word by word and the fix on our side is very similar to the one on KVM/arm64. I hope this is OK for you. Steffen --- arch/s390/kvm/arm64/reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/kvm/arm64/reset.c b/arch/s390/kvm/arm64/reset.c index e4cdce1dbf9d..45785da3396a 100644 --- a/arch/s390/kvm/arm64/reset.c +++ b/arch/s390/kvm/arm64/reset.c @@ -59,6 +59,8 @@ void kvm_reset_vcpu(struct kvm_vcpu *vcpu) if (current->thread.kfpu_flags) load_vx_regs(vcpu->arch.ctxt.vregs); + vcpu->mmio_needed = false; + if (loaded) vcpu_load(vcpu);