diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-12-27 09:02:02 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-12-27 09:02:02 +0100 |
commit | 7ad3423ebb02f340671f70a916bdc8dbec7573ee (patch) | |
tree | b9168d363c24f2af2626e63011ec1f6c81e81d09 /arch/arm64/kvm/debug.c | |
parent | 56a23ee52611ca76421f3d7cac100e1616716dae (diff) | |
parent | 44be77c590f381bc629815ac789b8b15ecc4ddcf (diff) | |
download | talos-op-linux-7ad3423ebb02f340671f70a916bdc8dbec7573ee.tar.gz talos-op-linux-7ad3423ebb02f340671f70a916bdc8dbec7573ee.zip |
Merge branch 'for-linus' into for-next
Back-merge the upstream branch for applying further cleanup patches
for HD-Audio.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'arch/arm64/kvm/debug.c')
-rw-r--r-- | arch/arm64/kvm/debug.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c index dbadfaf850a7..fa63b28c65e0 100644 --- a/arch/arm64/kvm/debug.c +++ b/arch/arm64/kvm/debug.c @@ -221,3 +221,24 @@ void kvm_arm_clear_debug(struct kvm_vcpu *vcpu) } } } + + +/* + * After successfully emulating an instruction, we might want to + * return to user space with a KVM_EXIT_DEBUG. We can only do this + * once the emulation is complete, though, so for userspace emulations + * we have to wait until we have re-entered KVM before calling this + * helper. + * + * Return true (and set exit_reason) to return to userspace or false + * if no further action is required. + */ +bool kvm_arm_handle_step_debug(struct kvm_vcpu *vcpu, struct kvm_run *run) +{ + if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) { + run->exit_reason = KVM_EXIT_DEBUG; + run->debug.arch.hsr = ESR_ELx_EC_SOFTSTP_LOW << ESR_ELx_EC_SHIFT; + return true; + } + return false; +} |