Skip to content

Commit

Permalink
kvm: arm64: handle single-step of userspace mmio instructions
Browse files Browse the repository at this point in the history
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 <alex.bennee@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
  • Loading branch information
stsquad authored and chazy committed Nov 29, 2017
1 parent 7226bc2 commit 1eb5912
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virt/kvm/arm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1eb5912

Please sign in to comment.