kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit

There are no generic bits remaining in the handling of KVM_EXIT_DEBUG.
So push its logic completely into arch hands, i.e. only x86 so far.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Jan Kiszka 2011-03-15 12:26:30 +01:00 committed by Marcelo Tosatti
parent 2a4dac8350
commit f2574737f6
3 changed files with 16 additions and 22 deletions

View file

@ -975,17 +975,6 @@ int kvm_cpu_exec(CPUState *env)
ret = kvm_handle_internal_error(env, run);
break;
#endif
#ifdef KVM_CAP_SET_GUEST_DEBUG
case KVM_EXIT_DEBUG:
DPRINTF("kvm_exit_debug\n");
if (kvm_arch_debug(&run->debug.arch)) {
ret = EXCP_DEBUG;
break;
}
/* re-enter, this exception was guest-internal */
ret = 0;
break;
#endif /* KVM_CAP_SET_GUEST_DEBUG */
default:
DPRINTF("kvm_arch_handle_exit\n");
ret = kvm_arch_handle_exit(env, run);