Ingo Molnar reported that 'kill -3' didn't work on his machine:
* Ingo Molnar <mingo@elte.hu> wrote:
> This is really cumbersome to debug - is there some good way to get to the RIP
> that the guest is hanging in? If kvm would print that out to the host console
> (even if it's just the raw RIP initially) on a kill -3 that would help
> enormously.
Looks like the code should be doing that already - but the ioctl(KVM_GET_SREGS)
hangs:
[pid 748] ioctl(6, KVM_GET_SREGS
Avi Kivity pointed out that it's not safe to call KVM_GET_SREGS (or other vcpu
related ioctls) from other threads:
> is it not OK to call KVM_GET_SREGS from other threads than the one
> that's doing KVM_RUN?
From Documentation/kvm/api.txt:
- vcpu ioctls: These query and set attributes that control the operation
of a single virtual cpu.
Only run vcpu ioctls from the same thread that was used to create the
vcpu.
Fix that up by using pthread_kill() to force the threads that are doing KVM_RUN
to do the register dumps.