I don't understand how single step events work...what is actually happening? Is the machine just going to the next instruction and then there is a callback. Also, what does return (1u << VMI_EVENT_RESPONSE_TOGGLE_SINGLESTEP) actually do? I read the documentation in events.h but what is it toggling exactly? Does it mean that from that point on every one machine instruction will end up triggering a callback?
--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+unsubscribe@googlegroups.com.
To post to this group, send email to vmit...@googlegroups.com.
Visit this group at https://groups.google.com/group/vmitools.
For more options, visit https://groups.google.com/d/optout.
To correct some of what Steve said, when you have the mtf bit turned on the system will advance to the next instruction automatically after it returns from the callback. You don't have to clear it for that to happen.
On Mar 23, 2017 8:38 PM, "Steven Maresca" <steve....@gmail.com> wrote:
What toggle facilitates is essentially equivalent to a 'step once' feature in a debugger.If the flag is not toggled, execution will never advance past the faulting instruction.
Single stepping in a virtual context is similar to native operation. Normally in an x86 baremetal context, single stepping is facilitated by setting the TF (trap flag) bit is set in the FLAGS register. Each instruction execution causes the delivery of an interrupt that must be handled by whatever is running on the CPU, like a kernel and a debugger.
In a virtualized scenario, things need to operate a bit differently: a hypervisor will itself receive the interrupt, rather than the kernel supervising the executing application. Single step execution occurs when the monitor trap flag (MTF) is set in the control structure representing a vCPU. When the MTF is set, a VM exit will immediately occur after entry on instruction boundaries. That notification may be conveyed out of the hypervisor If a facility like LibVMI is in use.Steve
On Thu, Mar 23, 2017 at 9:34 PM, D'Mita Levy <dlev...@fiu.edu> wrote:
I don't understand how single step events work...what is actually happening? Is the machine just going to the next instruction and then there is a callback. Also, what does return (1u << VMI_EVENT_RESPONSE_TOGGLE_SINGLESTEP) actually do? I read the documentation in events.h but what is it toggling exactly? Does it mean that from that point on every one machine instruction will end up triggering a callback?
--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+u...@googlegroups.com.
To post to this group, send email to vmit...@googlegroups.com.
Visit this group at https://groups.google.com/group/vmitools.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+u...@googlegroups.com.