Statistics Page Mappings

The hypervisor automatically allocates memory for statistics counter instances when the hypervisor allocates certain objects. For example, when the hypervisor allocates a virtual processor, the hypervisor also allocates space for that virtual processor's associated statistics.

The hypervisor allocates one page of memory--also known as a stats page--to store the counter instances for each object. This storage for counter instances allows a partition to call the HvMapStatsPage hypercall function to map individual counter types into the partition's address space for easy retrieval. The hypervisor uses overlay pages to perform this mapping. For more information about overlay pages, see GPA Overlay Pages.

Stats pages that the partition maps into its guest physical address (GPA) space are write-protected. Attempts to write to these pages will result in a #MC fault. The hypervisor writes to these pages by using write-back cacheability. Guests should map these pages with write-back caching as well.

The lifetime of a stats page is the same as the lifetime for the stats page's corresponding object. If the partition deletes that object and the object's stats page is still mapped within a partition's GPA space, the partition should remove the stats page mapping by calling the HvUnmapStatsPage hypercall function. As with any overlay page, removal of a stats page mapping reveals whatever is "beneath" the overlay page.

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.