For more details, please refer to pause.
为什么需要pause loop exiting(ple)这一feature呢?
Basic Exit Reason 40
PLE_Gap - upper bound on the amount of time between two successive executions of PAUSE in a loop.
PLE_Window - upper bound on the amount of time a guest is allowed to execute in a PAUSE loop
If the time, between this execution of PAUSE and previous one, exceeds the PLE_Gap, processor consider this PAUSE belongs to a new loop. Otherwise, processor determins the the total execution time of this loop(since 1st PAUSE in this loop), and triggers a VM exit if total time exceeds the PLE_Window.
Pause-Loop Exiting can be used to detect Lock-Holder Preemption, where one VCPU is sched-out after hold a spinlock, then other VCPUs for same lock are sched-in to waste the CPU time.