diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2017-11-16 10:39:21 -0500 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2017-11-29 10:46:21 -0500 |
commit | 1eb591288b956bdd75e464e69b6b8207ffa6e5e3 (patch) | |
tree | 6fc4a50011b82e23488977cef1eb0d91e15aff1f | |
parent | 7226bc2e126dfb6d81e85a75f373ea4cc3619406 (diff) |
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 <alex.bennee@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
-rw-r--r-- | virt/kvm/arm/arm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index a6524ff27de4..322c570d211e 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) | |||
628 | ret = kvm_handle_mmio_return(vcpu, vcpu->run); | 628 | ret = kvm_handle_mmio_return(vcpu, vcpu->run); |
629 | if (ret) | 629 | if (ret) |
630 | return ret; | 630 | return ret; |
631 | if (kvm_arm_handle_step_debug(vcpu, vcpu->run)) | ||
632 | return 0; | ||
633 | |||
631 | } | 634 | } |
632 | 635 | ||
633 | if (run->immediate_exit) | 636 | if (run->immediate_exit) |