HvSetSystemProperty function

The HvSetSystemProperty function sets a generic virtual system-wide property.

Syntax


HV_STATUS  HvSetSystemProperty(
  _In_  HV_SYSTEM_PROPERTY PropertyCode,
  _In_  PVOID PropertyValue
);

Parameters

PropertyCode [in]

An HV_SYSTEM_PROPERTY enumeration value that specifies the property for which the caller sets the property value.

PropertyValue [in]

Pointer to a block of memory that specifies the new property value.

Return value

HvSetSystemProperty returns one of the following values. In addition to these values, HvSetSystemProperty can also return one of the values that are specified in Common Hypercall Status Codes.

Return codeDescription
HV_STATUS_SUCCESS

HvSetSystemProperty successfully set a virtual system-wide property.

HV_STATUS_ACCESS_DENIED

The caller is not the root partition or does not possess the ConfigureProfiler privilege.

HV_STATUS_INVALID_PARAMETER

The specified configuration is not supported.

HV_STATUS_OPERATION_DENIED

The profiling event group is already set.

 

Remarks

If the caller passes in the HvSetPerfCounterProperty value (which is currently the only defined value for HV_SYSTEM_PROPERTY) to the PropertyCode parameter, the caller also passes a pointer to the following populated structure to the PropertyValue parameter to set the performance counter property:


struct {
 UINT16  EventType;
 UINT16  ReservedZ1;
 UINT32  ReservedZ2;
 UINT64  Period;  
} SetPerfCounter;

The members of this structure contain the following information:

EventType

The event type to monitor the performance of.

ReservedZ1

Reserved. Do not use.

ReservedZ2

Reserved. Do not use.

Period

The frequency to monitor the event.

HvSetSystemProperty has the following restrictions:

  • The caller must be the root partition.

  • The caller must possess the AccessStats privilege.

HvSetSystemProperty has the following native interface:

Native Interface

HvSetSystemProperty

Call Code = 0x006f

Input Parameters

0

PropertyCode (4 bytes) Padding (4 bytes)

8

PropertyValue (variable bytes)

For HvSetPerfCounterProperty, 16 bytes as follows:

8

EventType (2 bytes) Padding (6 bytes)

16

Period (8 bytes)

 

Requirements

Version

HvSetSystemProperty is available in version 2.0 and later versions of the hypervisor.

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

See also

HV_INPUT_SET_SYSTEM_PROPERTY
HV_SYSTEM_PROPERTY

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.