HvGetPartitionId function

The HvGetPartitionId function retrieves the partition identifier of the caller.

Syntax


HV_STATUS  HvGetPartitionId(
  _Out_  PHV_PARTITION_ID PartitionId
);

Parameters

PartitionId [out]

A pointer to an HV_PARTITION_ID variable in which HvGetPartitionId stores the caller's partition identifier. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.

Return value

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

Return codeDescription
HV_STATUS_SUCCESS

HvGetPartitionId successfully retrieved the caller's partition identifier.

HV_STATUS_ACCESS_DENIED

The caller's partition privilege flag AccessSelfPartitionId is cleared.

 

Remarks

HvGetPartitionId returns the partition identifier of the caller. However, the partition identifier can change if the partition is saved and subsequently restored or if the partition is migrated across systems. In such cases, the AccessSelfPartitionId privilege can be used to prevent a guest from obtaining its partition identifier.

HvGetPartitionId has the following restriction:

  • The caller must possess the AccessSelfPartitionId privilege.

Native Interface

HvGetPartitionId

Call Code = 0x0046

Output Parameters

0

PartitionId (8 bytes)

 

Requirements

Version

HvGetPartitionId is available in version 1.0 and later versions of the hypervisor.

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.