System and method for virtualization-assisted debugging
AssigneeParallels International GmbH
InventorAndrey Stupachenko
Life of this patent
Estimating the term…
Abstract
Disclosed are systems and methods for debugging program code using a computing system. The disclosed method includes designating a control point in a software application subject to a debugging procedure, and then executing the program code for the software application as a guest application executing within a virtual machine. Upon detection of a virtualization event, the hardware processor transfers program control to a hypervisor which then determines whether the virtualization event corresponds to the designated control point based on an execution state of the guest application. If so, the virtualization event handler may generate a debugging event that is used by a debugger.
Claims14
A method comprising:
- executing a specially configured hypervisor (hypervisor) upon a computer system which manages execution upon the computer system of a guest application within a virtual machine (VM);
- establishing an occurrence of a virtualization event relating to the VM with a virtual event handler forming part of the hypervisor during execution of the guest application;
- determining whether the occurrence of the virtualization event relates to a normal virtualization event associated with the guest application or whether the occurrence of the virtualization event corresponds to a virtualization event to be handled by debugging program code (debugger);
- upon a determination that the occurrence of the virtualization event corresponds to a normal virtualization event handling the virtualization event with the hypervisor or a virtual machine monitor of the VM;
- and
- upon a determination that the occurrence of the virtualization event corresponds to a virtualization event to be handled by the debugger handling the virtualization event with the debugger;
- wherein
- the virtual event handler exploits nested page table (NPT) faults;
- and
- the virtual event handler clears or changes access rights to one or more entries within an NPT associated with the VM to establish a control point to suspend execution of the guest application to trigger a VM-EXIT and upon a VM-ENTRY back into the guest application the virtual event handler restores the cleared or changed access rights to one or more entries within an NPT.
A method comprising:
- executing a specially configured hypervisor (hypervisor) upon a computer system which manages execution upon the computer system of a guest application within a virtual machine (VM);
- establishing an occurrence of a virtualization event relating to the VM with a virtual event handler forming part of the hypervisor during execution of the guest application;
- determining whether the occurrence of the virtualization event relates to a normal virtualization event associated with the guest application or whether the occurrence of the virtualization event corresponds to a virtualization event to be handled by debugging program code (debugger);
- upon a determination that the occurrence of the virtualization event corresponds to a normal virtualization event handling the virtualization event with the hypervisor or a virtual machine monitor of the VM;
- and
- upon a determination that the occurrence of the virtualization event corresponds to a virtualization event to be handled by the debugger handling the virtualization event with the debugger;
- wherein
- the virtualization event is a nested page table fault;
- the virtualization event is generated by clearing an access right for a page of code;
- the debugger modifies a nested page table in dependence upon a selection made by a user;
- and
- the virtual event handler VMM resets the access right upon completion of a debugging process applied by the debugger.
Dependencies are inferred from the claim text.