tandasat/DdiMon

Question When VM-Exited

mutiancheng opened this issue · 6 comments

When VM-Exit occured and it hasn't vmresumed, if Thread Dispatching is activiated what should happen?

  1. Can threads on none-root CPU be dispatched to the VM-Exited CPU?
    2.On VM-Exited CPU, shouldn't the current thread be dispatched to other non-root CPUs?

While VM-exit is being processed, any interruptions should not be allowed, as the processor is on the more privileged code and we do not want it to run arbitrary kernel code. So 2 is correct (actually, should not be dispatched to anyone else)

When VM-exit occurs, if IF=1 and IRQL<DISPATCH_LEVEL, how can you ensure that the current CPU will not to be dispatched to run another thread?

Sorry, I gave you an wrong answer. As "Loading Host RIP, RSP, and RFLAGS"
states, RFLAGS is cleared, except bit 1, which is always set. So the TF flag is always zero, unless you manually enable it.

Yes, I observed it with WinDbg. Thank you for your patience and attentiveness. Is the statement in the SDM? I will read it.

No problem :) and yes, that is in the SDM.