Avi Kivity wrote: > Jan Kiszka wrote: >> This adds an arch field to kvm_run.debug, the payload that is returned >> to user space on KVM_EXIT_DEBUG guest exits. For x86, this field is now >> supposed to report the precise debug exception (#DB or #BP) and the >> current state of the debug registers (the latter is not yet >> implemented). >> >> Index: b/include/asm-x86/kvm.h >> =================================================================== >> --- a/include/asm-x86/kvm.h >> +++ b/include/asm-x86/kvm.h >> @@ -230,4 +230,9 @@ struct kvm_pit_state { >> #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) >> #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) >> >> +struct kvm_debug_exit_arch { >> + __u32 exception; >> + __u64 dr[8]; >> +}; >> + >> > > Need empty structures for non-x86. > > Need a KVM_CAP_ to indicate presence of this feature. Have all this in patch already, but need time to finish it, test it, and roll it out. There are two usability issues I would like to resolve first (to see if that has impact on the kernel-user interface), see following posts. Jan