In the example of FIG. 21, a non-zero value was written into the guest physical address. In some embodiments, the hyper-kernel detects (e.g., during the stall due to the attempt to access a dormant page) whether the instruction on which the stall occurred is to write a page of zeroes to the dormant page. If the hyper-kernel identifies that the instruction being executed by the VCPU has the effect of zeroing the page, then the hyper-kernel leaves the page dormant, and skips or otherwise advances past the instruction. This saves resources from writing pages full of zeroes.
FIG. 22 is a flow diagram illustrating an embodiment of a process for converting a dormant page. In some embodiments, process 2200 is executed by a set of hyper-kernels. The process begins at 2202 when an indication of a stall on a dormant guest physical address is received. For example, because there is no actual page of physical memory mapped to the guest physical address, there is also no entry in the second level page table for the guest physical address. A stall (page fault) will then occur. An internal page table of a node may be evaluated, as described above, to determine that the dormant bit for the guest physical address is set (indicating that the guest physical address is a dormant page). At 2204, an available portion of physical memory is obtained. Various techniques for obtaining a free portion of physical memory are described above. At 2206, the guest physical address is mapped to the obtained available portion of physical memory.
Converting a Page to Dormant (“Re-Dormanting” Pages)