diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2017-10-04 18:22:08 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2017-11-13 15:00:00 +0000 |
commit | 5aee01b22c98b5b732e22195d99c99678433b224 (patch) | |
tree | caff1b6f3bb80d6f136d98b91088ee6fb005ed64 | |
parent | 5c4eaa9f51a25631a6a0fd81c4653345610d267b (diff) |
kvm: arm64: handle single-step of userspace mmio instructionskvm-debug/step-emulated-insn-v3
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>
---
v2
- call helper directly from kvm_arch_vcpu_ioctl_run
v3
- return 0 (ioctl success) instead of 1
-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 95cba0799828..b40440defca1 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -625,6 +625,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) |