Hypercall Output Values

All hypercalls return a 64-bit hypercall output value. The fields that make up this value are described in the following table. Hypercalls use the HV_X64_HYPERCALL_OUTPUT union to encode a hypercall output value.

FieldBit sizeMeaning

Result

16 bits

HV_STATUS status code that indicates if the hypercall was successful or if it failed.
Hypercall Return Code Reference lists hypercall return codes.

Rsvd

16 bits or 20 bits

Callers should ignore the value in these bits.

Reps completed

12 bits

Number of repetitions that hypercall completed successfully.

 

The following table shows the order of the bits in the hypercall output value.

Bits63:4443:3231:1615:0

Field

Rsvd

(20 bits)

Reps completed

(12 bits)

Rsvd

(16 bits)

Result

(16 bits)

 

For rep hypercalls, the Reps completed field is the total number of reps complete and not related to the rep start index from the hypercall input value. For example, if the caller specified a rep start index of 5, and a rep count (from the hypercall input value) of 10, the Reps completed field would indicate 10 if the hypercall completed successfully.

The hypercall output value is passed back in registers. The register mapping depends on whether the caller is running in 32-bit (x86) or 64-bit (x64) mode. The hypervisor determines the caller's mode based on the value of the EFER.LMA and CS.L flags. If both flags are set, hypervisor assumes that the caller operating system is running in 64-bit mode.

The following table represents the register mapping for hypercall outputs.

x64 registerx86 registerContents

RAX

EDX:EAX

Hypercall output value

 

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.