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.
Field | Bit size | Meaning |
---|---|---|
Result |
16 bits |
|
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.
Bits | 63:44 | 43:32 | 31:16 | 15: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 register | x86 register | Contents |
---|---|---|
RAX |
EDX:EAX |
Hypercall output value |
Send comments about this topic to Microsoft
Build date: 11/16/2013