Inserting break point in guest from qemu using ioctls into kvm
We have written a plugin in qemu to handle display driver calls .If the display driver does something which we feel is bad we want the Guest to trap so that in windbg we can know what has caused this condition.Things we have tried to solve this problem are ::
1)Setting trap flag in eflags using getregs and set regs ioctl .But this did not work .The guest behaves like no trap flag is set and windbg has no effect .
2)Second thing that we tried was :
Using KVM_SET_GUEST_DEBUG ioctl :Arguments
setting control as KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW_BP | KVM_GUESTDBG_INJECT_BP | KVM_GUESTDBG_SINGLE_STEP;
and debug_reg as rip obtained by doing getregs .and similarly debugreg as flags to enable the rip .But this too did not work.The windbg hangs and nothing works .
Can anyone point me to the right direction .KVM we are using is kvm-kmod-devel-88 .Is there anything regarding this that has been updated in the newer versions .