From: Alex Bennée Date: Thu, 16 Nov 2017 15:39:21 +0000 (+0000) Subject: kvm: arm64: handle single-step of userspace mmio instructions X-Git-Tag: v4.19~2003^2~6^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1eb591288b956bdd75e464e69b6b8207ffa6e5e3;p=platform%2Fkernel%2Flinux-rpi.git kvm: arm64: handle single-step of userspace mmio instructions The system state of KVM when using userspace emulation is not complete until we return into KVM_RUN. To handle mmio related updates we wait until they have been committed and then schedule our KVM_EXIT_DEBUG. The kvm_arm_handle_step_debug() helper tells us if we need to return and sets up the exit_reason for us. Signed-off-by: Alex Bennée Signed-off-by: Christoffer Dall --- diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index a6524ff..322c570 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -628,6 +628,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) ret = kvm_handle_mmio_return(vcpu, vcpu->run); if (ret) return ret; + if (kvm_arm_handle_step_debug(vcpu, vcpu->run)) + return 0; + } if (run->immediate_exit)