* Question about intercept debug breakpoint in the Guest OS
[not found] <704310110.26649484.1384072884934.JavaMail.root@vmware.com>
@ 2013-11-10 9:03 ` Kai Luo
0 siblings, 0 replies; only message in thread
From: Kai Luo @ 2013-11-10 9:03 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1278 bytes --]
Hi:
Recently I try to intercept a given kernel address-syscall address,for example- of the guest windows 7 to the hypervisor, I set the exception flag in the EXCEPTION_BITMAP as follows:
vmcs.c
void vmx_do_resume(vcpu * v)
{
......
unsigned long intercepts = __vmread(EXCEPTION_BITMAP);
unsigned long mask = (1UL << TRAP_debug);
intercepts |= mask;
__vmwrite(EXCEPTION_BITMAP, intercepts)
v->arch.guest_context.debugreg[0] = [Address of a syscall];
v->arch.guest_context.debugreg[7] |= 2;
......
}
I do reveive the VMexit in the vmx_vmexit_handler in vmx.c then I want to let the guest os keep going as usual without concerning about the debug breakpoint so I set some flags as follows:
case TRAP_debug:
......
regs->eflags |= X86_EFLAGS_RF;
exit_qualification = __vmread(EXIT_QUALIFICATION);
write_debug(6, exit_qualification | 0xffff0ff0);
......
The problem is the guest os seems trapped into an infinite loop and take the full vcpu capacity, I find the RIP in the VCPU stay the same, EFLAGS value of the VCPU is 0x2 and the guest os can't respond to any movement of mouse or keyboard,.
Do I missed some flag when restoring the guest context?Or there are some other reasons that lead to this issue?Could you give me any suggestions?
Jone
......
[-- Attachment #1.2: Type: text/html, Size: 2091 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-10 9:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <704310110.26649484.1384072884934.JavaMail.root@vmware.com>
2013-11-10 9:03 ` Question about intercept debug breakpoint in the Guest OS Kai Luo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).