Statistics Group Compatibility

As new versions of the hypervisor are released and counters are added to the end of a group, the minor number within the statistics group's header (for more information about group versioning, see Format of Statistics Pages) will be incremented. This versioning mechanism will allow existing code to be compatible with future versions of the hypervisor. Existing code can check to ensure that the group's major version number matches with the code's major version number and that the minor version number is greater-than-or-equal to the compile-time value of the group's minor version number.

Should the format of the group ever change, the major number will be incremented. Note that groups that contain architectural counters should not change major version numbers from release to release. A particular counter will always be present at its assigned location but might no longer be maintained. In such cases, the counter will always read as zero.

The hypervisor defines the following statistics group types:


// Standard header types that have zero version and length
#define HV_STATISTICS_GROUP_END_OF_LIST  0
#define HV_STATISTICS_GROUP_END_OF_PAGE  1

// Pseudo-group to use in manifest for counters accessible through hypercalls.
#define HV_STATISTICS_GROUP_HYPERCALL_BASED  15

// Definitions for the hypervisor counters statistics page
#define HV_STATISTICS_GROUP_HVA_ID  2
#define HV_STATISTICS_GROUP_HVA_VERSION  0x00010000
#define HV_STATISTICS_GROUP_HVV_ID  3
#define HV_STATISTICS_GROUP_HVV_VERSION  0x00010000
#define HV_STATISTICS_GROUP_HVI_ID  14
#define HV_STATISTICS_GROUP_HVI_VERSION  0x00010000

// Definitions for the logical processor counters statistics page
#define HV_STATISTICS_GROUP_LPA_ID  2
#define HV_STATISTICS_GROUP_LPA_VERSION  0x00010000
#define HV_STATISTICS_GROUP_LPV_ID  3
#define HV_STATISTICS_GROUP_LPV_VERSION  0x00010000
#define HV_STATISTICS_GROUP_LPI_ID  14
#define HV_STATISTICS_GROUP_LPI_VERSION  0x00010000

// Definitions for the partition counters statistics page
#define HV_STATISTICS_GROUP_PTA_ID  2
#define HV_STATISTICS_GROUP_PTA_VERSION  0x00010000
#define HV_STATISTICS_GROUP_PTV_ID  3
#define HV_STATISTICS_GROUP_PTV_VERSION  0x00010000
#define HV_STATISTICS_GROUP_PTI_ID  14
#define HV_STATISTICS_GROUP_PTI_VERSION  0x00010000

// Definitions for the virtual processor statistics page
#define HV_STATISTICS_GROUP_VPA_ID  2
#define HV_STATISTICS_GROUP_VPA_VERSION  0x00010000
#define HV_STATISTICS_GROUP_VPV_ID  3
#define HV_STATISTICS_GROUP_VPV_VERSION  0x00010000
#define HV_STATISTICS_GROUP_VPI_ID  14
#define HV_STATISTICS_GROUP_VPI_VERSION  0x00010000

// Maximum counters allowed per group. This maximum is calculated // for the case when the group occupies a full page: 
// there will be two headers (one for the group and one
// that terminates the list).
#define HV_ST_MAX_COUNTERS_PER_GROUP \
    ((HV_PAGE_SIZE - 2 * sizeof(HV_STATISTICS_GROUP_HEADER)) / sizeof(UINT64))

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.