HvSetPortProperty function

The HvSetPortProperty function allows an authorized guest to set a property of a port.

Syntax


HV_STATUS  HvSetPortProperty(
  _In_  HV_PARTITION_ID PartitionId,
  _In_  HV_PORT_ID PortId,
  _In_  HV_PORT_PROPERTY_CODE PropertyCode,
  _In_  HV_PORT_PROPERTY PropertyValue
);

Parameters

PartitionId [in]

An HV_PARTITION_ID value that identifies the partition that owns the port that the PortId parameter identifies. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.

PortId [in]

An HV_PORT_ID value that identifies a previously-created port within the partition that PartitionId specifies.

PropertyCode [in]

An HV_PORT_PROPERTY_CODE value that specifies the property for which HvSetPortProperty sets the property value.

PropertyValue [in]

A pointer to an HV_PORT_PROPERTY variable that contains the value for the property that the PropertyCode parameter specifies. HvSetPortProperty sets the value for the property. HV_PORT_PROPERTY is defined as an unsigned 64-bit (UINT64) value.

Return value

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

Return codeDescription
HV_STATUS_SUCCESS

HvSetPortProperty successfully set a property of a port.

HV_STATUS_ACCESS_DENIED

Neither of the following is true:

  • The caller is the parent of the specified target partition or the partition itself.

  • The caller has the CreatePort partition property.

HV_STATUS_INVALID_PARTITION_ID

The specified partition identifier is invalid.

HV_STATUS_INVALID_PORT_ID

The specified port identifier is invalid.

HV_STATUS_UNKNOWN_PROPERTY

The property code that the PropertyCode parameter specifies is not a recognized property.

 

Remarks

  • The caller must possess the CreatePort privilege.

  • The partition that is specified by PartitionId must be in the active state.

  • The caller must be the parent of the partition that is specified by PartitionId, or the caller must specify its own partition identifier.

Native Interface

HvSetPortProperty

Call Code = 0x0070

Input Parameters

0

PartitionId (8 bytes)

8

PortId (8 bytes)

16

PropertyCode (4 bytes) Padding (4 bytes)

24

PropertyValue (8 bytes)

 

Requirements

Version

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

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

See also

HV_PORT_PROPERTY_CODE
HvGetPortProperty

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.