diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/TOC.yml b/virtualization/hyper-v-on-windows/tlfs/datatypes/TOC.yml index b8d63b61b..55272b8b3 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/TOC.yml +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/TOC.yml @@ -1,56 +1,136 @@ - name: Overview href: overview.md - name: HV_CONNECTION_ID - href: HV_CONNECTION_ID.md + href: hv_connection_id.md +- name: HV_CONNECTION_INFO + href: hv_connection_info.md +- name: HV_CPUID_RESULT + href: hv_cpuid_result.md - name: HV_CRASH_CTL_REG_CONTENTS - href: HV_CRASH_CTL_REG_CONTENTS.md + href: hv_crash_ctl_reg_contents.md - name: HV_DEVICE_INTERRUPT_TARGET - href: HV_DEVICE_INTERRUPT_TARGET.md + href: hv_device_interrupt_target.md +- name: HV_GET_VP_CPUID_VALUES_FLAGS + href: hv_get_vp_cpuid_values_flags.md +- name: HV_GPA_MAPPING + href: hv_gpa_mapping.md +- name: HV_GPA_PAGE_NUMBER + href: hv_gpa_page_number.md +- name: HV_GVA + href: hv_gva.md +- name: HV_GVA_PAGE_NUMBER + href: hv_gva_page_number.md - name: HV_INITIAL_VP_CONTEXT - href: HV_INITIAL_VP_CONTEXT.md + href: hv_initial_vp_context.md +- name: HV_INPUT_VTL + href: hv_input_vtl.md +- name: HV_INTERCEPT_ACCESS_TYPE_MASK + href: hv_intercept_access_type_mask.md +- name: HV_INTERCEPT_PARAMETERS + href: hv_intercept_parameters.md +- name: HV_INTERCEPT_PARAMETERS_EX + href: hv_intercept_parameters_ex.md +- name: HV_INTERCEPT_TYPE + href: hv_intercept_type.md +- name: HV_INTERRUPT_CONTROL + href: hv_interrupt_control.md - name: HV_INTERRUPT_ENTRY - href: HV_INTERRUPT_ENTRY.md + href: hv_interrupt_entry.md +- name: HV_INTERRUPT_TYPE + href: hv_interrupt_type.md +- name: HV_INTERRUPT_VECTOR + href: hv_interrupt_vector.md +- name: HV_IO_PORT + href: hv_io_port.md +- name: HV_MAP_GPA_FLAGS + href: hv_map_gpa_flags.md - name: HV_MESSAGE - href: HV_MESSAGE.md + href: hv_message.md - name: HV_MESSAGE_TYPE - href: HV_MESSAGE_TYPE.md + href: hv_message_type.md - name: HV_MSI_ENTRY - href: HV_MSI_ENTRY.md + href: hv_msi_entry.md - name: HV_NESTED_ENLIGHTENMENTS_CONTROL - href: HV_NESTED_ENLIGHTENMENTS_CONTROL.md + href: hv_nested_enlightenments_control.md +- name: HV_PARTITION_CREATION_FLAGS + href: hv_partition_creation_flags.md +- name: HV_PARTITION_CREATION_PROPERTIES + href: hv_partition_creation_properties.md +- name: HV_PARTITION_ID + href: hv_partition_id.md +- name: HV_PARTITION_PROCESSOR_FEATURES + href: hv_partition_processor_features.md - name: HV_PARTITION_PRIVILEGE_MASK - href: HV_PARTITION_PRIVILEGE_MASK.md + href: hv_partition_privilege_mask.md +- name: HV_PARTITION_PROPERTY_CODE + href: hv_partition_property_code.md +- name: HV_PORT_ID + href: hv_port_id.md +- name: HV_PORT_INFO + href: hv_port_info.md +- name: HV_PORT_TYPE + href: hv_port_type.md +- name: HV_PROXIMITY_DOMAIN_ID + href: hv_proximity_domain_id.md +- name: HV_PROXIMITY_DOMAIN_INFO + href: hv_proximity_domain_info.md +- name: HV_REGISTER_INTERCEPT_RESULT_PARAMETERS + href: hv_register_intercept_result_parameters.md - name: HV_REGISTER_NAME - href: HV_REGISTER_NAME.md + href: hv_register_name.md - name: HV_REGISTER_VALUE - href: HV_REGISTER_VALUE.md + href: hv_register_value.md +- name: HV_SPA_PAGE_NUMBER + href: hv_spa_page_number.md +- name: HV_STATS_OBJECT_IDENTITY + href: hv_stats_object_identity.md +- name: HV_STATS_OBJECT_TYPE + href: hv_stats_object_type.md +- name: HV_STATUS + href: hv_status.md - name: HV_SVM_ENLIGHTENED_VMCB_FIELDS - href: HV_SVM_ENLIGHTENED_VMCB_FIELDS.md + href: hv_svm_enlightened_vmcb_fields.md - name: HV_SYNIC_EVENT_FLAGS - href: HV_SYNIC_EVENT_FLAGS.md + href: hv_synic_event_flags.md +- name: HV_SYNIC_SINT_INDEX + href: hv_synic_sint_index.md - name: HV_TIMER_MESSAGE_PAYLOAD - href: HV_TIMER_MESSAGE_PAYLOAD.md + href: hv_timer_message_payload.md +- name: HV_TRANSLATE_GVA_CONTROL_FLAGS + href: hv_translate_gva_control_flags.md +- name: HV_TRANSLATE_GVA_RESULT + href: hv_translate_gva_result.md +- name: HV_TRANSLATE_GVA_RESULT_EX + href: hv_translate_gva_result_ex.md +- name: HV_UNMAP_GPA_FLAGS + href: hv_unmap_gpa_flags.md +- name: HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS + href: hv_unregister_intercept_result_parameters.md - name: HV_VIRTUALIZATION_FAULT_INFORMATION - href: HV_VIRTUALIZATION_FAULT_INFORMATION.md + href: hv_virtualization_fault_information.md - name: HV_VMX_ENLIGHTENED_VMCS - href: HV_VMX_ENLIGHTENED_VMCS.md + href: hv_vmx_enlightened_vmcs.md - name: HV_VP_ASSIST_PAGE - href: HV_VP_ASSIST_PAGE.md + href: hv_vp_assist_page.md +- name: HV_VP_INDEX + href: hv_vp_index.md - name: HV_VP_SET - href: HV_VP_SET.md + href: hv_vp_set.md - name: HV_VP_VTL_CONTROL - href: HV_VP_VTL_CONTROL.md + href: hv_vp_vtl_control.md +- name: HV_VTL + href: hv_vtl.md - name: HV_X64_FP_CONTROL_STATUS_REGISTER - href: HV_X64_FP_CONTROL_STATUS_REGISTER.md + href: hv_x64_fp_control_status_register.md - name: HV_X64_FP_REGISTER - href: HV_X64_FP_REGISTER.md + href: hv_x64_fp_register.md - name: HV_X64_MSR_NPIEP_CONFIG_CONTENTS - href: HV_X64_MSR_NPIEP_CONFIG_CONTENTS.md + href: hv_x64_msr_npiep_config_contents.md - name: HV_X64_SEGMENT_REGISTER - href: HV_X64_SEGMENT_REGISTER.md + href: hv_x64_segment_register.md - name: HV_X64_TABLE_REGISTER - href: HV_X64_TABLE_REGISTER.md + href: hv_x64_table_register.md - name: HV_X64_XMM_CONTROL_STATUS_REGISTER - href: HV_X64_XMM_CONTROL_STATUS_REGISTER.md + href: hv_x64_xmm_control_status_register.md - name: HV_X64_REGISTER_SEV_GPA_PAGE - href: HV_X64_REGISTER_SEV_GPA_PAGE.md \ No newline at end of file + href: HV_X64_REGISTER_SEV_GPA_PAGE.md diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_id.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_id.md index e847a90e0..a8ab36d87 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_id.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_id.md @@ -6,10 +6,12 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_CONNECTION_ID +## Overview Connections are identified by 32-bit IDs. The high 8 bits are reserved and must be zero. All connection IDs are unique within a partition. ## Syntax diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_info.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_info.md new file mode 100644 index 000000000..dfc52bb58 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_connection_info.md @@ -0,0 +1,81 @@ +--- +title: HV_CONNECTION_INFO +description: HV_CONNECTION_INFO data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_CONNECTION_INFO + +## Overview +Per-connection type descriptor used when establishing a connection (`HvCallConnectPort`). Only the union member matching `PortType` is interpreted; other members are zero. + +## Syntax + +```c +typedef enum +{ + HvPortTypeDoorbell = 4, +} HV_PORT_TYPE; + +typedef struct +{ + HV_PORT_TYPE PortType; + UINT32 Padding; + + union + { + struct + { + HV_GPA GuestPhysicalAddress; + UINT64 TriggerValue; + UINT64 Flags; + } DoorbellConnectionInfo; + }; +} HV_CONNECTION_INFO; +``` + +### Port Types + +| Enum | Value | Meaning | Use Cases | +|------|-------|---------|-----------| +| HvPortTypeDoorbell | 4 | Lightweight guest doorbell (write / trigger semantics) | Low latency memory-mapped notifications. | + +### Connection Type Details + +#### Doorbell Connections (HvPortTypeDoorbell) +**Purpose**: Memory-mapped notification mechanism with configurable trigger semantics. +**Configuration**: +- `GuestPhysicalAddress`: Target memory location for write operations +- `TriggerValue`: Expected value to trigger the doorbell (when using specific value matching) +- `Flags`: Controls trigger behavior and access pattern + +### Doorbell Flags Configuration + +| Flag | Value | Description | +|------|-------|-------------| +| HV_DOORBELL_FLAG_TRIGGER_SIZE_ANY | 0x00000000 | Trigger on any write operation regardless of size | +| HV_DOORBELL_FLAG_TRIGGER_SIZE_BYTE | 0x00000001 | Trigger only on 1-byte writes | +| HV_DOORBELL_FLAG_TRIGGER_SIZE_WORD | 0x00000002 | Trigger only on 2-byte writes | +| HV_DOORBELL_FLAG_TRIGGER_SIZE_DWORD | 0x00000003 | Trigger only on 4-byte writes | +| HV_DOORBELL_FLAG_TRIGGER_SIZE_QWORD | 0x00000004 | Trigger only on 8-byte writes | +| HV_DOORBELL_FLAG_TRIGGER_ANY_VALUE | 0x80000000 | Trigger on any written value (ignore TriggerValue) | + +**Flag Combinations**: +- **Size-specific + value-specific**: Triggers only when the exact size and value match +- **Size-specific + HV_DOORBELL_FLAG_TRIGGER_ANY_VALUE**: Triggers on any write of the specified size +- **HV_DOORBELL_FLAG_TRIGGER_SIZE_ANY + value-specific**: Triggers when any write matches the value +- **HV_DOORBELL_FLAG_TRIGGER_SIZE_ANY + HV_DOORBELL_FLAG_TRIGGER_ANY_VALUE**: Triggers on any write operation + +### Restrictions and Limitations +* **Doorbell connections**: + - Must not cross page boundaries + - Target GPA must be valid and accessible + +## See Also +* [HvCallConnectPort](../hypercalls/HvCallConnectPort.md) +* [HV_PORT_TYPE](hv_port_type.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_cpuid_result.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_cpuid_result.md new file mode 100644 index 000000000..32f150c27 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_cpuid_result.md @@ -0,0 +1,43 @@ +--- +title: HV_CPUID_RESULT +description: HV_CPUID_RESULT +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_CPUID_RESULT + +The HV_CPUID_RESULT data type contains the result of a CPUID instruction execution. This structure holds the register values returned by the CPUID instruction for a specific function and subfunction. + +## Syntax + +```c +typedef union { + UINT32 AsUINT32[4]; + struct + { + UINT32 Eax; + UINT32 Ebx; + UINT32 Ecx; + UINT32 Edx; + }; +} HV_CPUID_RESULT; +``` + +### Members + +- **Eax**: The value returned in the EAX register by the CPUID instruction +- **Ebx**: The value returned in the EBX register by the CPUID instruction +- **Ecx**: The value returned in the ECX register by the CPUID instruction +- **Edx**: The value returned in the EDX register by the CPUID instruction + +The CPUID instruction returns processor identification and feature information in these four 32-bit registers. The specific meaning of each register's contents depends on the CPUID function and subfunction that was executed. + +## See also + +* [HvCallGetVpCpuidValues](../hypercalls/HvCallGetVpCpuidValues.md) +* [HV_PARTITION_ID](hv_partition_id.md) +* [HV_VP_INDEX](hv_vp_index.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_crash_ctl_reg_contents.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_crash_ctl_reg_contents.md index f4d23c5c0..239f052ed 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_crash_ctl_reg_contents.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_crash_ctl_reg_contents.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_CRASH_CTL_REG_CONTENTS @@ -20,10 +21,11 @@ typedef union UINT64 AsUINT64; struct { - UINT64 Reserved : 62; // Reserved bits - UINT64 CrashMessage : 1; // P3 is the PA of the message - // P4 is the length in bytes - UINT64 CrashNotify : 1; // Log contents of crash parameter + UINT64 Reserved : 58; // Reserved bits + UINT64 PreOSId : 3; // Crash occurred in the preOS environment + UINT64 NoCrashDump : 1; // Crash dump will not be captured + UINT64 CrashMessage : 1; // P3 is the PA of the message, P4 is the length in bytes + UINT64 CrashNotify : 1; // Log contents of crash parameter system registers }; } HV_CRASH_CTL_REG_CONTENTS; ``` diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_device_interrupt_target.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_device_interrupt_target.md index 7b7bb8213..7a35dc923 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_device_interrupt_target.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_device_interrupt_target.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_DEVICE_INTERRUPT_TARGET @@ -13,6 +14,7 @@ ms.topic: reference ## Syntax ```c + #define HV_DEVICE_INTERRUPT_TARGET_MULTICAST 1 #define HV_DEVICE_INTERRUPT_TARGET_PROCESSOR_SET 2 diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_get_vp_cpuid_values_flags.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_get_vp_cpuid_values_flags.md new file mode 100644 index 000000000..1f6f8ca5f --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_get_vp_cpuid_values_flags.md @@ -0,0 +1,42 @@ +--- +title: HV_GET_VP_CPUID_VALUES_FLAGS +description: HV_GET_VP_CPUID_VALUES_FLAGS data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/08/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_GET_VP_CPUID_VALUES_FLAGS + +## Overview + +Control flags for `HvCallGetVpCpuidValues` hypercall that specify how CPUID values should be retrieved and processed for the target virtual processor. + +## Syntax + +```c +typedef union { + UINT32 AsUINT32; + struct { + UINT32 UseVpXfemXss : 1; + UINT32 ApplyRegisteredValues : 1; + UINT32 Reserved : 30; + }; +} HV_GET_VP_CPUID_VALUES_FLAGS; +``` + +### Members + +| Member | Description | +|--------|-------------| +| UseVpXfemXss | If set, use the VP's current XFEM/XSS values when synthesizing CPUID results | +| ApplyRegisteredValues | If set, apply any registered CPUID value overrides to the results | +| Reserved | Must be zero | + +## See Also + +- [HvCallGetVpCpuidValues](../hypercalls/HvCallGetVpCpuidValues.md) +- [HV_CPUID_RESULT](hv_cpuid_result.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gpa_mapping.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gpa_mapping.md new file mode 100644 index 000000000..01958d171 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gpa_mapping.md @@ -0,0 +1,33 @@ +--- +title: HV_GPA_MAPPING +description: HV_GPA_MAPPING data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_GPA_MAPPING + +## Overview +Descriptor used by sparse GPA mapping hypercalls to associate a target GPA page with a source backing GPA page (in caller's partition) in a single repetition element. + +## Syntax +```c +typedef struct { + HV_GPA_PAGE_NUMBER TargetGpaPageNumber; // GPA in target partition (unmapped prior) + HV_GPA_PAGE_NUMBER SourceGpaPageNumber; // GPA (backing) in caller / providing partition +} HV_GPA_MAPPING; +``` + +## Member Details +- `TargetGpaPageNumber` – Destination GPA to map; must be currently unmapped. +- `SourceGpaPageNumber` – Backing page; must reference valid committed page owned by the caller. + +## See Also +* [HV_GPA_PAGE_NUMBER](hv_gpa_page_number.md) +* [HV_MAP_GPA_FLAGS](hv_map_gpa_flags.md) +* [HvCallMapSparseGpaPages](../hypercalls/HvCallMapSparseGpaPages.md) + diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gpa_page_number.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gpa_page_number.md new file mode 100644 index 000000000..6719be9bc --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gpa_page_number.md @@ -0,0 +1,40 @@ +--- +title: HV_GPA_PAGE_NUMBER +description: HV_GPA_PAGE_NUMBER data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_GPA_PAGE_NUMBER + +The HV_GVA_PAGE_NUMBER type represents a guest physical address page number used in hypervisor operations for physical address memory management. + +## Syntax + +```c +typedef UINT64 HV_GPA_PAGE_NUMBER; +``` + +## Description + +HV_GPA_PAGE_NUMBER is a 64-bit unsigned integer that represents the page number portion of a guest physical address. This value is obtained by right-shifting a guest pysical address by the page size (typically 12 bits for 4KB pages), effectively removing the page offset and leaving only the page number. + +## Usage + +When converting between a guest physical address and its page number: +- **To get page number from address**: `GpaPageNumber = GuestPhysicalAddress >> PAGE_SHIFT` +- **To get address from page number**: `GuestPhysicalAddress = GpaPageNumber << PAGE_SHIFT` + +Where `PAGE_SHIFT` is 12 for 4KB pages. + +## See also + +* [HvCallDepositMemory](../hypercalls/HvCallDepositMemory.md) +* [HvCallWithdrawMemory](../hypercalls/HvCallWithdrawMemory.md) +* [HvCallMapGpaPages](../hypercalls/HvCallMapGpaPages.md) +* [HvCallUnmapGpaPages](../hypercalls/HvCallUnmapGpaPages.md) +* [HV_PARTITION_ID](hv_partition_id.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gva.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gva.md new file mode 100644 index 000000000..992a380d6 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gva.md @@ -0,0 +1,29 @@ +--- +title: HV_GVA +description: HV_GVA data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_GVA + +## Overview +`HV_GVA` represents a guest virtual address within a partition's address space (Stage-1). + +## Syntax +```c +typedef UINT64 HV_GVA; +``` + +An `HV_GVA` is a 64-bit unsigned integer large enough to hold any architecture-supported guest virtual address. + +## See Also +- [HV_GVA_PAGE_NUMBER](hv_gva_page_number.md) +- [HvCallFlushVirtualAddressList](../hypercalls/HvCallFlushVirtualAddressList.md) +- [HvCallFlushVirtualAddressListEx](../hypercalls/HvCallFlushVirtualAddressListEx.md) +- [HvCallTranslateVirtualAddress](../hypercalls/HvCallTranslateVirtualAddress.md) +- [HvCallTranslateVirtualAddressEx](../hypercalls/HvCallTranslateVirtualAddressEx.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gva_page_number.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gva_page_number.md new file mode 100644 index 000000000..43eecb0cf --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_gva_page_number.md @@ -0,0 +1,43 @@ +--- +title: HV_GVA_PAGE_NUMBER +description: HV_GVA_PAGE_NUMBER data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_GVA_PAGE_NUMBER + +The HV_GVA_PAGE_NUMBER type represents a guest virtual address page number used in hypervisor operations for virtual address translation and memory management. + +## Syntax + +```c +typedef UINT64 HV_GVA_PAGE_NUMBER; +``` + +## Description + +HV_GVA_PAGE_NUMBER is a 64-bit unsigned integer that represents the page number portion of a guest virtual address. This value is obtained by right-shifting a guest virtual address by the page size (typically 12 bits for 4KB pages), effectively removing the page offset and leaving only the page number. + +The page number is used in hypervisor operations that work with memory at page granularity, such as: +- Virtual address translation +- Memory mapping operations +- Page-level access control + +## Usage + +When converting between a guest virtual address and its page number: +- **To get page number from address**: `GvaPageNumber = GuestVirtualAddress >> PAGE_SHIFT` +- **To get address from page number**: `GuestVirtualAddress = GvaPageNumber << PAGE_SHIFT` + +Where `PAGE_SHIFT` is typically 12 (for 4KB pages). + +## See Also + +[HvCallTranslateVirtualAddress](../hypercalls/HvCallTranslateVirtualAddress.md) +[HvCallTranslateVirtualAddressEx](../hypercalls/HvCallTranslateVirtualAddressEx.md) +[HV_TRANSLATE_GVA_CONTROL_FLAGS](hv_translate_gva_control_flags.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_initial_vp_context.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_initial_vp_context.md index e20822af5..a926a2a50 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_initial_vp_context.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_initial_vp_context.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_INITIAL_VP_CONTEXT diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_input_vtl.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_input_vtl.md new file mode 100644 index 000000000..35d5f39bf --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_input_vtl.md @@ -0,0 +1,46 @@ +--- +title: HV_INPUT_VTL +description: HV_INPUT_VTL +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_INPUT_VTL + +Specifies a virtual trust level for input operations. + +## Syntax + +```c +typedef union +{ + UINT8 AsUINT8; + struct + { + UINT8 TargetVtl : 4; + UINT8 UseTargetVtl : 1; + UINT8 ReservedZ : 3; + }; +} HV_INPUT_VTL; +``` + +## Fields + +| Field | Description | +|-------|-------------| +| `AsUINT8` | Raw 8-bit value representation | +| `TargetVtl` | Target virtual trust level (0-15) | +| `UseTargetVtl` | Flag indicating whether to use the target VTL | +| `ReservedZ` | Reserved field, must be zero | + +## Remarks + +This union allows specifying a target virtual trust level for hypercall operations that operate across VTL boundaries. The `UseTargetVtl` flag determines whether the `TargetVtl` field should be honored. If not set, the target VTL is either the current caller's VTL, or all VTLs, depending on the Hypercall. + +## See also + +* [HV_VTL](hv_vtl.md) + diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_access_type_mask.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_access_type_mask.md new file mode 100644 index 000000000..7157406e0 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_access_type_mask.md @@ -0,0 +1,33 @@ +--- +title: HV_INTERCEPT_ACCESS_TYPE_MASK +description: HV_INTERCEPT_ACCESS_TYPE_MASK +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_INTERCEPT_ACCESS_TYPE_MASK + +## Overview +Bitmask selecting which access directions (read / write) trigger an intercept for parameterized intercept types. + +## Syntax + +```c +typedef UINT32 HV_INTERCEPT_ACCESS_TYPE_MASK; +``` + +## Bit Definitions + +| Bit | Mask | Name | Meaning | +|-----|------|------|---------| +| 0 | 0x01 | HV_INTERCEPT_ACCESS_MASK_READ | Trap reads | +| 1 | 0x02 | HV_INTERCEPT_ACCESS_MASK_WRITE | Trap writes | +| 2 | 0x04 | HV_INTERCEPT_ACCESS_MASK_EXECUTE | Trap execution | + +## See also + +* [HV_INTERCEPT_PARAMETERS](hv_intercept_parameters.md) +* [HV_INTERCEPT_PARAMETERS_EX](hv_intercept_parameters_ex.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_parameters.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_parameters.md new file mode 100644 index 000000000..ec39008b3 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_parameters.md @@ -0,0 +1,62 @@ +--- +title: HV_INTERCEPT_PARAMETERS +description: HV_INTERCEPT_PARAMETERS +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_INTERCEPT_PARAMETERS + +## Overview +Per-type parameter union for basic intercept installation (`HvCallInstallIntercept`). + +Architecture: +- x64: All members listed below may be applicable subject to feature availability. +- ARM64: Only exception vector is valid. + +## Syntax + +```c +typedef union +{ + UINT64 AsUINT64; + +#if defined(_AMD64_) + + HV_X64_IO_PORT IoPort; + UINT32 CpuidIndex; + UINT32 ApicWriteMask; + UINT32 MsrIndex; + + struct + { + HV_X64_IO_PORT Base; + HV_X64_IO_PORT End; + } IoPortRange; + +#endif + + UINT16 ExceptionVector; + +} HV_INTERCEPT_PARAMETERS; +``` + +## Fields + +| Field | Description | +|-------|-------------| +| IoPort | (x64) Single port (HvInterceptTypeX64IoPort) | +| CpuidIndex | (x64) CPUID leaf (HvInterceptTypeX64Cpuid) | +| ApicWriteMask | (x64) APIC write mask (HvInterceptTypeX64ApicWrite) | +| MsrIndex | (x64) MSR index (HvInterceptTypeX64Msr) | +| IoPortRange.Base/End | (x64) Inclusive port range (HvInterceptTypeX64IoPortRange) | +| ExceptionVector | Exception vector number (HvInterceptTypeException) | + +## See also + +* [HV_INTERCEPT_PARAMETERS_EX](hv_intercept_parameters_ex.md) +* [HV_INTERCEPT_TYPE](hv_intercept_type.md) +* [HV_INTERCEPT_ACCESS_TYPE_MASK](hv_intercept_access_type_mask.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_parameters_ex.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_parameters_ex.md new file mode 100644 index 000000000..044fa53a1 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_parameters_ex.md @@ -0,0 +1,51 @@ +--- +title: HV_INTERCEPT_PARAMETERS_EX +description: HV_INTERCEPT_PARAMETERS_EX +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_INTERCEPT_PARAMETERS_EX + +## Overview +Extended intercept parameter union used with `HvCallInstallInterceptEx`. + +Architecture: +- ARM64 only. + +## Syntax + +```c +typedef union { + struct { + HV_REGISTER_NAME RegisterName; + HV_INTERCEPT_ACCESS_TYPE_MASK AccessTypeMask; + UINT64 WriteInterceptMask; + UINT64 Reserved[14]; + } RegisterInterceptParams; +} HV_INTERCEPT_PARAMETERS_EX; +``` + +## Fields + +| Field | Description | +|-------|-------------| +| RegisterInterceptParams | Structure for register intercepts | + +### RegisterInterceptParams + +| Field | Description | +|-------|-------------| +| RegisterName | Target register identifier | +| AccessTypeMask | Combination of read/write bits to trap | +| WriteInterceptMask | Bitmask selecting subfields for write trapping (mapping defined by the register's documented bit layout) | +| Reserved | Must be zero | + +## See also + +* [HV_INTERCEPT_PARAMETERS](hv_intercept_parameters.md) +* [HV_INTERCEPT_ACCESS_TYPE_MASK](hv_intercept_access_type_mask.md) +* [HV_REGISTER_NAME](hv_register_name.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_type.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_type.md new file mode 100644 index 000000000..5c445e2be --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_intercept_type.md @@ -0,0 +1,62 @@ +--- +title: HV_INTERCEPT_TYPE +description: HV_INTERCEPT_TYPE +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_INTERCEPT_TYPE + +## Overview +Enumerates guest operations / events that can generate a virtualization intercept delivered to a higher VTL / parent for emulation, policy, or diagnostics. + +## Syntax + +```c +typedef enum { + HvInterceptTypeX64IoPort = 0x00000000, + HvInterceptTypeX64Msr = 0x00000001, + HvInterceptTypeX64Cpuid = 0x00000002, + HvInterceptTypeException = 0x00000003, + HvInterceptTypeX64GlobalCpuid = 0x00000006, + HvInterceptTypeX64ApicSmi = 0x00000007, + HvInterceptTypeHypercall = 0x00000008, + HvInterceptTypeX64ApicInitSipi = 0x00000009, + HvInterceptTypeX64ApicWrite = 0x0000000B, + HvInterceptTypeUnknownSynicConnection = 0x0000000D, + HvInterceptTypeX64ApicEoi = 0x0000000E, + HvInterceptTypeRetargetInterruptWithUnknownDeviceId = 0x0000000F, + HvInterceptTypeX64ExceptionTrap = 0x00000010, + HvInterceptTypeX64IoPortRange = 0x00000011, + HvInterceptTypeRegister = 0x00000012, + HvInterceptTypeSystemResetExtended = 0x00000013, +} HV_INTERCEPT_TYPE; +``` + +### Values + +- **HvInterceptTypeX64IoPort**: (x64 only) An intercept was triggered by an I/O port access. +- **HvInterceptTypeX64Msr**: (x64 only) An intercept was triggered by an MSR access. +- **HvInterceptTypeX64Cpuid**: (x64 only) An intercept was triggered by a CPUID instruction. +- **HvInterceptTypeException**: An intercept was triggered by an exception. +- **HvInterceptTypeX64GlobalCpuid**: (x64 only) An intercept was triggered by a CPUID instruction that is global to the partition. +- **HvInterceptTypeX64ApicSmi**: (x64 only) An intercept was triggered by an APIC SMI. +- **HvInterceptTypeHypercall**: An intercept was triggered by a hypercall. +- **HvInterceptTypeX64ApicInitSipi**: (x64 only) An intercept was triggered by an APIC INIT/SIPI. +- **HvInterceptTypeX64ApicWrite**: (x64 only) An intercept was triggered by a write to an APIC register. +- **HvInterceptTypeUnknownSynicConnection**: An intercept was triggered by an unknown SynIC connection. +- **HvInterceptTypeX64ApicEoi**: (x64 only) An intercept was triggered by an APIC EOI. +- **HvInterceptTypeRetargetInterruptWithUnknownDeviceId**: An intercept was triggered when retargeting an interrupt for an unknown device ID. +- **HvInterceptTypeX64ExceptionTrap**: (x64 only) An intercept was triggered by an exception trap. +- **HvInterceptTypeX64IoPortRange**: (x64 only) An intercept was triggered by an I/O port access within a registered range. +- **HvInterceptTypeRegister**: (ARM64 only) An intercept was triggered by a register access. +- **HvInterceptTypeSystemResetExtended**: (ARM64 only) An intercept was triggered by a PSCI System_Reset2 or System_Off2 call. + +## See also +* [HvCallInstallIntercept](../hypercalls/HvCallInstallIntercept.md) +* [HvCallInstallInterceptEx](../hypercalls/HvCallInstallInterceptEx.md) +* [HvCallRegisterInterceptResult](../hypercalls/HvCallRegisterInterceptResult.md) +* [HvCallUnregisterInterceptResult](../hypercalls/HvCallUnregisterInterceptResult.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_control.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_control.md new file mode 100644 index 000000000..47af8e90e --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_control.md @@ -0,0 +1,73 @@ +--- +title: HV_INTERRUPT_CONTROL +description: HV_INTERRUPT_CONTROL data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_INTERRUPT_CONTROL + +## Overview +Structure for controlling virtual interrupt routing & semantics. + +## Syntax + +```c +#if defined(_AMD64_) + +typedef union +{ + UINT64 AsUINT64; + struct + { + HV_INTERRUPT_TYPE InterruptType; + UINT32 LevelTriggered : 1; + UINT32 LogicalDestinationMode : 1; + UINT32 Reserved : 30; + }; +} HV_X64_INTERRUPT_CONTROL; + +#define HV_INTERRUPT_CONTROL HV_X64_INTERRUPT_CONTROL + +#else + +typedef union +{ + UINT64 AsUINT64; + struct + { + HV_INTERRUPT_TYPE InterruptType; + UINT32 Reserved1 : 2; + UINT32 Asserted : 1; + UINT32 Reserved2 : 29; + }; +} HV_ARM64_INTERRUPT_CONTROL; + +#define HV_INTERRUPT_CONTROL HV_ARM64_INTERRUPT_CONTROL + +#endif // _ARCH_ +``` + +The interrupt control structure provides architecture-specific control over interrupt delivery behavior. + +**x64 Architecture Fields:** +- **InterruptType**: Specifies the type of interrupt to deliver (see [HV_INTERRUPT_TYPE](hv_interrupt_type.md)) +- **LevelTriggered**: When set, indicates level-triggered interrupt; when clear, indicates edge-triggered +- **LogicalDestinationMode**: When set, uses logical destination mode for interrupt routing, where the target specifies a logical APIC ID which describes a set of target virtual processors; when clear, uses physical destination mode where the target specifies a local APIC ID. + +**ARM64 Architecture Fields:** +- **InterruptType**: Specifies the type of interrupt to deliver (see [HV_INTERRUPT_TYPE](hv_interrupt_type.md)) +- **Asserted**: When set, indicates the interrupt should be asserted; when clear, indicates deassertion + +## Usage Notes +- On ARM64, whether the interrupt is edge or level triggered is controlled by the Guest GIC configuration, rather than the HV_INTERRUPT_CONTROL structure. + +## See also + +[HV_INTERRUPT_TYPE](hv_interrupt_type.md) +[HV_INTERRUPT_VECTOR](hv_interrupt_vector.md) +[HvCallAssertVirtualInterrupt](../hypercalls/HvCallAssertVirtualInterrupt.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_entry.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_entry.md index 2ce16de93..3683ba325 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_entry.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_entry.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_INTERRUPT_ENTRY diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_type.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_type.md new file mode 100644 index 000000000..398b1fd4f --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_type.md @@ -0,0 +1,59 @@ +--- +title: HV_INTERRUPT_TYPE +description: HV_INTERRUPT_TYPE data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_INTERRUPT_TYPE + +## Overview +Enumeration of interrupt delivery modes per architecture. + +## Syntax + +```c +typedef enum _HV_INTERRUPT_TYPE +{ +#if defined(_ARM64_) + HvArm64InterruptTypeFixed = 0x0000, +#else + HvX64InterruptTypeFixed = 0x0000, + HvX64InterruptTypeLowestPriority = 0x0001, + HvX64InterruptTypeSmi = 0x0002, + HvX64InterruptTypeRemoteRead = 0x0003, + HvX64InterruptTypeNmi = 0x0004, + HvX64InterruptTypeInit = 0x0005, + HvX64InterruptTypeSipi = 0x0006, + HvX64InterruptTypeExtInt = 0x0007, + HvX64InterruptTypeLocalInt0 = 0x0008, + HvX64InterruptTypeLocalInt1 = 0x0009, +#endif +} HV_INTERRUPT_TYPE; +``` + +The interrupt types have different meanings depending on the processor architecture: + +### ARM64 Values +- HvArm64InterruptTypeFixed – Standard fixed delivery. + +### x64 Values +- HvX64InterruptTypeFixed – Fixed vector. +- HvX64InterruptTypeLowestPriority – Dynamic routing to lowest priority. +- HvX64InterruptTypeSmi – System Management Interrupt (restricted). +- HvX64InterruptTypeRemoteRead – Remote read IPI. +- HvX64InterruptTypeNmi – Non-maskable interrupt. +- HvX64InterruptTypeInit – INIT IPI. +- HvX64InterruptTypeSipi – SIPI (startup IPI). +- HvX64InterruptTypeExtInt – External interrupt signal. +- HvX64InterruptTypeLocalInt0 / LocalInt1 – Local APIC LINT pins. + +## See Also +* [HV_INTERRUPT_CONTROL](hv_interrupt_control.md) +* [HV_INTERRUPT_VECTOR](hv_interrupt_vector.md) +* [HvCallAssertVirtualInterrupt](../hypercalls/HvCallAssertVirtualInterrupt.md) +* [HvCallSetVirtualInterruptTarget](../hypercalls/HvCallSetVirtualInterruptTarget.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_vector.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_vector.md new file mode 100644 index 000000000..5c8e4ba63 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_interrupt_vector.md @@ -0,0 +1,30 @@ +--- +title: HV_INTERRUPT_VECTOR +description: HV_INTERRUPT_VECTOR data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_INTERRUPT_VECTOR + +## Overview +Numeric identifier for an interrupt to inject / reserve / target. Semantics differ by architecture & controller. + +## Syntax + +```c +typedef UINT32 HV_INTERRUPT_VECTOR; +``` + +The interrupt vector is a 32-bit unsigned integer that specifies the vector number for interrupt delivery. The valid range and meaning of interrupt vectors depend on the processor architecture and interrupt controller configuration. + +## See also + +[HV_INTERRUPT_CONTROL](hv_interrupt_control.md) +[HV_INTERRUPT_TYPE](hv_interrupt_type.md) +[HvCallAssertVirtualInterrupt](../hypercalls/HvCallAssertVirtualInterrupt.md) +[HvCallSetVirtualInterruptTarget](../hypercalls/HvCallSetVirtualInterruptTarget.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_io_port.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_io_port.md new file mode 100644 index 000000000..43991ef45 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_io_port.md @@ -0,0 +1,26 @@ +--- +title: HV_IO_PORT +description: HV_IO_PORT data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_IO_PORT + +HV_IO_PORT represents an I/O port address used for port-based I/O operations on x64 platforms. + +## Syntax + +```c +typedef UINT16 HV_IO_PORT; +``` + +The I/O port is a 16-bit unsigned integer that specifies a port address in the I/O address space. This data type is only relevant on x64 and x86 architectures where port-based I/O is supported. + +## See also + +[HvCallCheckForIoIntercept](../hypercalls/HvCallCheckForIoIntercept.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_map_gpa_flags.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_map_gpa_flags.md new file mode 100644 index 000000000..f0c260faa --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_map_gpa_flags.md @@ -0,0 +1,66 @@ +--- +title: HV_MAP_GPA_FLAGS +description: HV_MAP_GPA_FLAGS +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_MAP_GPA_FLAGS + +## Overview +`HV_MAP_GPA_FLAGS` defines the access permissions and mapping attributes applied when creating or modifying guest physical address (GPA) mappings via mapping and protection hypercalls. + +## Syntax +```c +typedef UINT32 HV_MAP_GPA_FLAGS; /* 32-bit flags field */ +``` + +## Permission Bits (Low 4 Bits) +| Bit | Mask | Meaning | +|-----|------|---------| +| 0 | HV_MAP_GPA_READABLE (0x1) | GPA readable by the guest | +| 1 | HV_MAP_GPA_WRITABLE (0x2) | GPA writable by the guest | +| 2 | HV_MAP_GPA_KERNEL_EXECUTABLE (0x4) | Executable in kernel / privileged mode (architecture specific) | +| 3 | HV_MAP_GPA_USER_EXECUTABLE (0x8) | Executable in user mode (if applicable) | + +### Special Page Encodings (Mutually Exclusive) +The following mutually exclusive values occupy bits 16–17. Only one may be specified and they override normal backing behavior: + +| Value | Name | Meaning | +|-------|------|---------| +| 0x10000 | HV_MAP_GPA_NO_ACCESS | No access (access faults). Used to withdraw permissions without unmapping. | +| 0x20000 | HV_MAP_GPA_ZEROED | Maps to a shared zero page (readable, executable zero fill unless combined with reduced permissions). | +| 0x30000 | HV_MAP_GPA_ONES | Not-present / ones pattern mapping (readable, executable 1 fill unless combined with reduced permissions). | + +### Mapping Attribute Bits +| Bit | Mask | Meaning | +|-----|------|---------| +| 20 | HV_MAP_GPA_NO_OVERLAY (0x100000) | Disallow overlay of this mapping. | +| 21 | HV_MAP_GPA_NOT_CACHED (0x200000) | Uncached mapping. | + +### Accessed / Dirty Manipulation (State Update Operations) +Bits 24–27 form the accessed/dirty set/clear controls. + +| Bit | Mask | Meaning | +|-----|------|---------| +| 24 | HV_MAP_GPA_CLEAR_ACCESSED (0x01000000) | Clear accessed bit | +| 25 | HV_MAP_GPA_SET_ACCESSED (0x02000000) | Set accessed bit | +| 26 | HV_MAP_GPA_CLEAR_DIRTY (0x04000000) | Clear dirty bit | +| 27 | HV_MAP_GPA_SET_DIRTY (0x08000000) | Set dirty bit | +| 28 | HV_MAP_GPA_DONT_SET_RANGE_ACCESSED (0x10000000) | Suppresses access bit | + +### Large Page Mapping +| Bit | Mask | Meaning | +|-----|------|---------| +| 31 | HV_MAP_GPA_LARGE_PAGE (0x80000000) | Mapping uses a large page size; caller must meet alignment & size rules or mapping fails. | + +## See Also +* [HV_GPA_PAGE_NUMBER](hv_gpa_page_number.md) +* [HV_GPA_MAPPING](hv_gpa_mapping.md) +* [HvCallMapGpaPages](../hypercalls/HvCallMapGpaPages.md) +* [HvCallMapSparseGpaPages](../hypercalls/HvCallMapSparseGpaPages.md) +* [HvCallModifySparseGpaPages](../hypercalls/HvCallModifySparseGpaPages.md) +* [HvCallModifyVtlProtectionMask](../hypercalls/HvCallModifyVtlProtectionMask.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message.md index 0942c2c98..86e3480dc 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_MESSAGE diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message_type.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message_type.md index 14c976b3d..7082c3a13 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message_type.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_message_type.md @@ -1,49 +1,77 @@ --- title: HV_MESSAGE_TYPE -description: HV_MESSAGE_TYPE +description: Synthetic message types delivered via the SynIC message mechanism keywords: hyper-v author: alexgrest ms.author: hvdev -ms.date: 10/15/2020 +ms.date: 09/02/2025 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_MESSAGE_TYPE +## Overview SynIC messages encode the message type as a 32-bit number. Any message type that has the high bit set is reserved for use by the hypervisor. Guest-initiated messages cannot send messages with a hypervisor message type. ## Syntax - - ```c +```c #define HV_MESSAGE_TYPE_HYPERVISOR_MASK 0x80000000 -typedef enum -{ - HvMessageTypeNone = 0x00000000, - - // Memory access messages - HvMessageTypeUnmappedGpa = 0x80000000, - HvMessageTypeGpaIntercept = 0x80000001, - - // Timer notifications - HvMessageTimerExpired = 0x80000010, - - // Error messages - HvMessageTypeInvalidVpRegisterValue = 0x80000020, - HvMessageTypeUnrecoverableException = 0x80000021, - HvMessageTypeUnsupportedFeature = 0x80000022, - HvMessageTypeTlbPageSizeMismatch = 0x80000023, - - // Hypercall intercept - HvMessageTypeHypercallIntercept = 0x80000050, - - // Platform-specific processor intercept messages - HvMessageTypeX64IoPortIntercept = 0x80010000, - HvMessageTypeMsrIntercept = 0x80010001, - HvMessageTypeX64CpuidIntercept = 0x80010002, - HvMessageTypeExceptionIntercept = 0x80010003, - HvMessageTypeX64ApicEoi = 0x80010004, - HvMessageTypeX64LegacyFpError = 0x80010005, - HvMessageTypeRegisterIntercept = 0x80010006, +typedef enum _HV_MESSAGE_TYPE { + HvMessageTypeNone = 0x00000000, + + /* Memory access messages */ + HvMessageTypeUnmappedGpa = 0x80000000, + HvMessageTypeGpaIntercept = 0x80000001, + HvMessageTypeUnacceptedGpa = 0x80000003, + HvMessageTypeGpaAttributeIntercept = 0x80000004, + + /* Timer notification messages */ + HvMessageTimerExpired = 0x80000010, + + /* Error / fault messages */ + HvMessageTypeInvalidVpRegisterValue = 0x80000020, + HvMessageTypeUnrecoverableException = 0x80000021, + HvMessageTypeUnsupportedFeature = 0x80000022, + + /* Opaque intercept (details via intercept page) */ + HvMessageTypeOpaqueIntercept = 0x8000003F, + + /* Hypercall intercept */ + HvMessageTypeHypercallIntercept = 0x80000050, + + /* SynIC related */ + HvMessageTypeSynicEventIntercept = 0x80000060, + HvMessageTypeSynicSintIntercept = 0x80000061, + HvMessageTypeSynicSintDeliverable = 0x80000062, + + /* Async call completion */ + HvMessageTypeAsyncCallCompletion = 0x80000070, + HvMessageInsufficientMemory = 0x80000071, + + /* Scheduler (root / integrated) message id range */ + HvMessageTypeSchedulerVpSignalBitset = 0x80000100, + HvMessageTypeSchedulerVpSignalPair = 0x80000101, + + /* Platform-specific processor intercept messages */ + HvMessageTypeX64IoPortIntercept = 0x80010000, /* x64 */ + HvMessageTypeMsrIntercept = 0x80010001, /* All */ + HvMessageTypeX64CpuidIntercept = 0x80010002, /* x64 */ + HvMessageTypeExceptionIntercept = 0x80010003, /* All */ + HvMessageTypeX64ApicEoi = 0x80010004, /* x64 */ + HvMessageTypeRegisterIntercept = 0x80010006, /* All */ + HvMessageTypeX64Halt = 0x80010007, /* x64 */ + HvMessageTypeX64InterruptionDeliverable = 0x80010008, /* x64 */ + HvMessageTypeX64SipiIntercept = 0x80010009, /* x64 */ + HvMessageTypeX64RdtscIntercept = 0x8001000A, /* x64 */ + HvMessageTypeX64ApicSmiIntercept = 0x8001000B, /* x64 */ + HvMessageTypeArm64ResetIntercept = 0x8001000C, /* Arm64 */ + HvMessageTypeX64ApicInitSipiIntercept = 0x8001000D, /* x64 */ + HvMessageTypeX64ApicWriteIntercept = 0x8001000E, /* x64 */ + HvMessageTypeX64SnpGuestRequestIntercept = 0x80010011, /* x64 */ + HvMessageTypeX64ExceptionTrapIntercept = 0x80010012, /* x64 */ + HvMessageTypeX64SevVmgexitIntercept = 0x80010013, /* x64 */ + HvMessageTypeX64MsrListIntercept = 0x80010015, /* x64 */ } HV_MESSAGE_TYPE; - ``` +``` \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_msi_entry.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_msi_entry.md index 961749c26..d404ed419 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_msi_entry.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_msi_entry.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_MSI_ENTRY diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_nested_enlightenments_control.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_nested_enlightenments_control.md index 1f3befe8d..153ec8fc9 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_nested_enlightenments_control.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_nested_enlightenments_control.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_NESTED_ENLIGHTENMENTS_CONTROL @@ -35,8 +36,8 @@ typedef struct UINT32 InterPartitionCommunication:1; UINT32 Reserved:31; }; - } HypercallControls; -} HV_NESTED_ENLIGHTENMENTS_CONTROL, *PHV_NESTED_ENLIGHTENMENTS_CONTROL; + } HypercallControls; +} HV_NESTED_ENLIGHTENMENTS_CONTROL; ``` ## See also diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_creation_flags.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_creation_flags.md new file mode 100644 index 000000000..385e6eb5f --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_creation_flags.md @@ -0,0 +1,36 @@ +--- +title: HV_PARTITION_CREATION_FLAGS +description: HV_PARTITION_CREATION_FLAGS data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PARTITION_CREATION_FLAGS + +HV_PARTITION_CREATION_FLAGS is a bitmask (UINT64) controlling behavior and initial capabilities of a newly created partition. A flag being present authorizes or requests the corresponding feature; absence leaves it disabled or at the platform default. + +## Syntax + +```c +#define HV_PARTITION_CREATION_FLAG_SMT_ENABLED_GUEST (1ULL << 0) +#define HV_PARTITION_CREATION_FLAG_NESTED_VIRTUALIZATION_CAPABLE (1ULL << 1) +#define HV_PARTITION_CREATION_FLAG_GPA_SUPER_PAGES_ENABLED (1ULL << 4) +#define HV_PARTITION_CREATION_FLAG_EXO_PARTITION (1ULL << 8) +#define HV_PARTITION_CREATION_FLAG_VTL1_OVERRIDE (1ULL << 9) +#define HV_PARTITION_CREATION_FLAG_VTL2_OVERRIDE (1ULL << 10) +#define HV_PARTITION_CREATION_FLAG_LAPIC_ENABLED (1ULL << 13) +#define HV_PARTITION_CREATION_FLAG_ENABLE_PERFMON_PMU (1ULL << 15) +#define HV_PARTITION_CREATION_FLAG_ENABLE_PERFMON_LBR (1ULL << 16) +#define HV_PARTITION_CREATION_FLAG_INTERCEPT_MESSAGE_PAGE_ENABLED (1ULL << 19) +#define HV_PARTITION_CREATION_FLAG_HYPERCALL_DOORBELL_PAGE_ENABLED (1ULL << 20) +#define HV_PARTITION_CREATION_FLAG_X2APIC_CAPABLE (1ULL << 22) + +``` + +See Also: +- [`HvCallCreatePartition`](../hypercalls/HvCallCreatePartition.md) +- [`HV_PARTITION_CREATION_PROPERTIES`](hv_partition_creation_properties.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_creation_properties.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_creation_properties.md new file mode 100644 index 000000000..e4d6ea29a --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_creation_properties.md @@ -0,0 +1,38 @@ +--- +title: HV_PARTITION_CREATION_PROPERTIES +description: HV_PARTITION_CREATION_PROPERTIES data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PARTITION_CREATION_PROPERTIES + +HV_PARTITION_CREATION_PROPERTIES supplies optional processor feature disable masks at partition creation time. + +## Syntax + +```c +// AMD64 +typedef struct { + HV_PARTITION_PROCESSOR_FEATURES DisabledProcessorFeatures; + HV_PARTITION_PROCESSOR_XSAVE_FEATURES DisabledProcessorXsaveFeatures; +} HV_PARTITION_CREATION_PROPERTIES_AMD64; + +// ARM64 +typedef struct { + HV_PARTITION_PROCESSOR_FEATURES DisabledProcessorFeatures; +} HV_PARTITION_CREATION_PROPERTIES_ARM64; +``` + +Field Notes: +- DisabledProcessorFeatures: Each set bit masks (disables) the corresponding reported processor processor feature for guest VPs. Unset bits leave the feature enabled if globally available. +- DisabledProcessorXsaveFeatures (AMD64 only): Masks XSAVE-managed extended state components; bits correspond to architectural XSTATE components. Disabling a component removes exposure via CPUID/XSTATE size enumeration. + +See Also: +- [`HvCallCreatePartition`](../hypercalls/HvCallCreatePartition.md) +- [`HV_PARTITION_CREATION_FLAGS`](hv_partition_creation_flags.md) +- ['HV_PARTITION_PROCESSOR_FEATURES'](hv_partition_processor_features.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_id.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_id.md new file mode 100644 index 000000000..1dcc8bfd4 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_id.md @@ -0,0 +1,33 @@ +--- +title: HV_PARTITION_ID +description: HV_PARTITION_ID +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_PARTITION_ID + +The HV_PARTITION_ID data type represents a unique identifier for a partition within the hypervisor. Each partition is assigned a unique partition ID when it is created, which is used to reference the partition in subsequent hypercalls. + +## Syntax + +```c +typedef UINT64 HV_PARTITION_ID; +``` + +The HV_PARTITION_ID is a 64-bit unsigned integer that uniquely identifies a partition. The hypervisor assigns partition IDs sequentially, starting from 1. + +## Constants + +| Name | Value | Description | +|------|-------|-------------| +| HV_PARTITION_ID_INVALID | 0x0000000000000000 | Sentinel that never refers to a real partition | +| HV_PARTITION_ID_SELF | 0xFFFFFFFFFFFFFFFF | Pseudo-identifier that refers to the caller's own partition. | + +## See also + +* [HvCallCreatePartition](../hypercalls/HvCallCreatePartition.md) +* [HvCallDeletePartition](../hypercalls/HvCallDeletePartition.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_privilege_mask.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_privilege_mask.md index 235a5fe32..edc0cb0c7 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_privilege_mask.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_privilege_mask.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_PARTITION_PRIVILEGE_MASK @@ -30,7 +31,7 @@ typedef struct UINT64 AccessPartitionReferenceTsc:1; UINT64 AccessGuestIdleReg:1; UINT64 AccessFrequencyRegs:1; - UINT64 AccessDebugRegs:1; + UINT64 Reserved:1; UINT64 AccessReenlightenmentControls:1 UINT64 Reserved1:18; @@ -60,7 +61,7 @@ typedef struct } HV_PARTITION_PRIVILEGE_MASK; ``` -Each privilege controls access to a set of synthetic MSRs or hypercalls. +Each privilege controls access to a set of synthetic MSRs and/or hypercalls. | Privilege Flag | Meaning | |---------------------------------------|-----------------------------------------------| @@ -76,7 +77,6 @@ Each privilege controls access to a set of synthetic MSRs or hypercalls. |`AccessPartitionReferenceTsc` | The partition has access to the reference TSC. | |`AccessGuestIdleReg` | The partition has access to the synthetic MSR that allows the guest to enter the guest idle state. | |`AccessFrequencyRegs` | The partition has access to the synthetic MSRs that supply the TSC and APIC frequencies, if supported. | -|`AccessDebugRegs` | The partition has access to the synthetic MSRs used for some forms of guest debugging. | |`AccessReenlightenmentControls` | The partition has access to reenlightenment controls. | |`CreatePartitions` | The partition can invoke the hypercall HvCallCreatePartition. The partition also can make any other hypercall that is restricted to operating on children. | |`AccessPartitionId` | The partition can invoke the hypercall HvCallGetPartitionId to obtain its own partition ID. | @@ -87,7 +87,7 @@ Each privilege controls access to a set of synthetic MSRs or hypercalls. |`PostMessages` | The partition can invoke the hypercall HvCallPostMessage. | |`ConnectPort` | The partition can invoke the hypercall HvCallConnectPort. | |`AccessStats` | The partition can invoke the hypercalls HvCallMapStatsPage and HvCallUnmapStatsPage. | -|`Debugging` | The partition can invoke the hypercalls HvCallPostDebugData, HvCallRetrieveDebugData and HvCallResetDebugSession. | +|`Debugging` | The partition has access to debugging related synthetic MSRs and can invoke the hypercalls HvCallPostDebugData, HvCallRetrieveDebugData and HvCallResetDebugSession. | |`CpuManagement` | The partition can invoke various hypercalls for CPU management. | |`AccessVSM` | The partition can use [VSM](../vsm.md). | |`AccessVpRegisters` | The partition can invoke the hypercalls HvCallSetVpRegisters and HvCallGetVpRegisters. | diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_processor_features.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_processor_features.md new file mode 100644 index 000000000..3c4c66311 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_processor_features.md @@ -0,0 +1,245 @@ +--- +title: HV_PARTITION_PROCESSOR_FEATURES +description: HV_PARTITION_PROCESSOR_FEATURES +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# hv_partition_processor_features + +## Overview + +Represents processor features that can be enabled or disabled for a partition. This structure defines hardware processor capabilities that are exposed to guest virtual processors (VPs) and can be masked during partition creation. The structure is architecture-specific and uses a banked approach to support future feature expansion. + +## Syntax + +```c +typedef union HV_PARTITION_PROCESSOR_FEATURES { + UINT64 AsUINT64[2]; + +#if defined(_ARM64_) + + struct + { + UINT64 Asid16:1; + UINT64 TGran16:1; + UINT64 TGran64:1; + UINT64 Haf:1; + UINT64 Hdbs:1; + UINT64 Pan:1; + UINT64 AtS1E1:1; + UINT64 Uao:1; + UINT64 El0Aarch32:1; + UINT64 Fp:1; + UINT64 FpHp:1; + UINT64 AdvSimd:1; + UINT64 AdvSimdHp:1; + UINT64 GicV3V4:1; + UINT64 Res0:2; + UINT64 PmuV3:1; + UINT64 PmuV3ArmV81:1; + UINT64 Res1:2; + UINT64 Aes:1; + UINT64 PolyMul:1; + UINT64 Sha1:1; + UINT64 Sha256:1; + UINT64 Sha512:1; + UINT64 Crc32:1; + UINT64 Atomic:1; + UINT64 Rdm:1; + UINT64 Sha3:1; + UINT64 Sm3:1; + UINT64 Sm4:1; + UINT64 Dp:1; + UINT64 Fhm:1; + UINT64 DcCvap:1; + UINT64 DcCvadp:1; + UINT64 ApaBase:1; + UINT64 ApaEp:1; + UINT64 ApaEp2:1; + UINT64 ApaEp2Fp:1; + UINT64 ApaEp2Fpc:1; + UINT64 Jscvt:1; + UINT64 Fcma:1; + UINT64 RcpcV83:1; + UINT64 RcpcV84:1; + UINT64 Gpa:1; + UINT64 L1ipPipt:1; + UINT64 DzPermitted:1; + UINT64 Ssbs:1; + UINT64 SsbsRw:1; + UINT64 Res2:4; + UINT64 Csv2:1; + UINT64 Csv3:1; + UINT64 Sb:1; + UINT64 Idc:1; + UINT64 Dic:1; + UINT64 TlbiOs:1; + UINT64 TlbiOsRange:1; + UINT64 FlagsM:1; + UINT64 FlagsM2:1; + UINT64 Bf16:1; + UINT64 Ebf16:1; + + // Second bank starts here. + UINT64 SveBf16:1; + UINT64 SveEbf16:1; + UINT64 I8mm:1; + UINT64 SveI8mm:1; + UINT64 Frintts:1; + UINT64 Specres:1; + UINT64 Res3:1; + UINT64 Rpres:1; + UINT64 Exs:1; + UINT64 SpecSei:1; + UINT64 Ets:1; + UINT64 Afp:1; + UINT64 Iesb:1; + UINT64 Rng:1; + UINT64 Lse2:1; + UINT64 Idst:1; + UINT64 Res4:6; + UINT64 Ccidx:1; + UINT64 Res5:12; + UINT64 TtCnp:1; + UINT64 Hpds:1; + UINT64 Sve:1; + UINT64 SveV2:1; + UINT64 SveV2P1:1; + UINT64 SpecFpacc:1; + UINT64 SveAes:1; + UINT64 SveBitPerm:1; + UINT64 SveSha3:1; + UINT64 SveSm4:1; + UINT64 E0PD:1; + UINT64 ReservedBank1 : 18; + }; + +#else + + struct + { + UINT64 Sse3Support:1; + UINT64 LahfSahfSupport:1; + UINT64 Ssse3Support:1; + UINT64 Sse4_1Support:1; + UINT64 Sse4_2Support:1; + UINT64 Sse4aSupport:1; + UINT64 XopSupport:1; + UINT64 PopCntSupport:1; + UINT64 Cmpxchg16bSupport:1; + UINT64 Altmovcr8Support:1; + UINT64 LzcntSupport:1; + UINT64 MisAlignSseSupport:1; + UINT64 MmxExtSupport:1; + UINT64 Amd3DNowSupport:1; + UINT64 ExtendedAmd3DNowSupport:1; + UINT64 Page1GbSupport:1; + UINT64 AesSupport:1; + UINT64 PclmulqdqSupport:1; + UINT64 PcidSupport:1; + UINT64 Fma4Support:1; + UINT64 F16CSupport:1; + UINT64 RdRandSupport:1; + UINT64 RdWrFsGsSupport:1; + UINT64 SmepSupport:1; + UINT64 EnhancedFastStringSupport:1; + UINT64 Bmi1Support:1; + UINT64 Bmi2Support:1; + UINT64 Res1:2; + UINT64 MovbeSupport:1; + UINT64 Npiep1Support:1; + UINT64 DepX87FPUSaveSupport:1; + UINT64 RdSeedSupport:1; + UINT64 AdxSupport:1; + UINT64 IntelPrefetchSupport:1; + UINT64 SmapSupport:1; + UINT64 HleSupport:1; + UINT64 RtmSupport:1; + UINT64 RdtscpSupport:1; + UINT64 ClflushoptSupport:1; + UINT64 ClwbSupport:1; + UINT64 ShaSupport:1; + UINT64 X87PointersSavedSupport:1; + UINT64 InvpcidSupport:1; + UINT64 IbrsSupport:1; + UINT64 StibpSupport:1; + UINT64 IbpbSupport: 1; + UINT64 UnrestrictedGuestSupport:1; + UINT64 Res2:1; + UINT64 FastShortRepMovSupport:1; + UINT64 Res3:2; + UINT64 IbrsAllSupport:1; + UINT64 Res4:4; + UINT64 RdPidSupport:1; + UINT64 UmipSupport:1; + UINT64 MdsNoSupport : 1; + UINT64 MdClearSupport : 1; + UINT64 TaaNoSupport:1; + UINT64 TsxCtrlSupport:1; + UINT64 ReservedBank0:1; + + // Second bank starts here. + UINT64 ACountMCountSupport:1; + UINT64 TscInvariantSupport:1; + UINT64 ClZeroSupport:1; + UINT64 RdpruSupport:1; + UINT64 La57Support:1; + UINT64 MbecSupport:1; + UINT64 NestedVirtSupport:1; + UINT64 PsfdSupport:1; + UINT64 CetSsSupport:1; + UINT64 CetIbtSupport:1; + UINT64 VmxExceptionInjectSupport:1; + UINT64 Res5:1; + UINT64 UmwaitTpauseSupport:1; + UINT64 MovdiriSupport:1; + UINT64 Movdir64bSupport:1; + UINT64 CldemoteSupport:1; + UINT64 SerializeSupport:1; + UINT64 TscDeadlineTmrSupport:1; + UINT64 TscAdjustSupport:1; + UINT64 FZLRepMovsb:1; + UINT64 FSRepStosb:1; + UINT64 FSRepCmpsb:1; + UINT64 TsxLdTrkSupport:1; + UINT64 VmxInsOutsExitInfoSupport:1; + UINT64 HlatSupport:1; + UINT64 SbdrSsdpNoSupport:1; + UINT64 FbsdpNoSupport:1; + UINT64 PsdpNoSupport:1; + UINT64 FbClearSupport:1; + UINT64 BtcNoSupport:1; + UINT64 IbpbRsbFlushSupport:1; + UINT64 StibpAlwaysOnSupport:1; + UINT64 PerfGlobalCtrlSupport:1; + UINT64 NptExecuteOnlySupport:1; + UINT64 NptADFlagsSupport:1; + UINT64 Npt1GbPageSupport:1; + UINT64 Res6:4; + UINT64 CmpccxaddSupport:1; + UINT64 Res7:4; + UINT64 PrefetchISupport:1; + UINT64 Sha512Support:1; + UINT64 Res8:3; + UINT64 SM3Support:1; + UINT64 SM4Support:1; + UINT64 Res9:2; + UINT64 SbpbSupported:1; + UINT64 IbpbBrTypeSupported:1; + UINT64 SrsoNoSupported:1; + UINT64 SrsoUserKernelNoSupported:1; + UINT64 Res10:6; + }; + +#endif + +} HV_PARTITION_PROCESSOR_FEATURES; +``` +## See Also + +- [hv_partition_creation_properties](hv_partition_creation_properties.md) +- [HvCallCreatePartition](../hypercalls/HvCallCreatePartition.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_property_code.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_property_code.md new file mode 100644 index 000000000..7c78ef4e3 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_partition_property_code.md @@ -0,0 +1,104 @@ +--- +title: HV_PARTITION_PROPERTY_CODE +description: HV_PARTITION_PROPERTY_CODE +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_PARTITION_PROPERTY_CODE + +The HV_PARTITION_PROPERTY_CODE enumeration defines the property selectors used with the partition property hypercalls. + +## Syntax +```c +typedef enum { + // Privilege properties + HvPartitionPropertyPrivilegeFlags = 0x00010000, + HvPartitionPropertySyntheticProcFeatures = 0x00010001, + + // Scheduling properties + HvPartitionPropertySuspend = 0x00020000, + HvPartitionPropertyCpuReserve = 0x00020001, + HvPartitionPropertyCpuCap = 0x00020002, + HvPartitionPropertyCpuWeight = 0x00020003, + HvPartitionPropertyCpuGroupId = 0x00020004, + + // Time properties + HvPartitionPropertyTimeFreeze = 0x00030003, + HvPartitionPropertyReferenceTime = 0x00030005, + + // Resource properties + HvPartitionPropertyVirtualTlbPageCount = 0x00050000, + HvPartitionPropertyVsmConfig = 0x00050001, + HvPartitionPropertyZeroMemoryOnReset = 0x00050002, + HvPartitionPropertyProcessorsPerSocket = 0x00050003, + HvPartitionPropertyNestedTlbSize = 0x00050004, + HvPartitionPropertyGpaPageAccessTracking = 0x00050005, + HvPartitionPropertyVsmPermissionsDirtySinceLastQuery = 0x00050006, + HvPartitionPropertyIsolationState = 0x0005000C, + HvPartitionPropertyIsolationControl = 0x0005000D, + HvPartitionPropertyAllocationId = 0x0005000E, + HvPartitionPropertyMonitoringId = 0x0005000F, + HvPartitionPropertyImplementedPhysicalAddressBits = 0x00050010, + HvPartitionPropertyNonArchitecturalCoreSharing = 0x00050011, + HvPartitionPropertyHypercallDoorbellPage = 0x00050012, + HvPartitionPropertyIsolationPolicy = 0x00050014, + HvPartitionPropertyUnimplementedMsrAction = 0x00050017, + HvPartitionPropertySevVmgexitOffloads = 0x00050022, + HvPartitionPropertyPartitionDiagBufferConfig = 0x00050026, + HvPartitionPropertyGicdBaseAddress = 0x00050028, + HvPartitionPropertyGitsTranslaterBaseAddress = 0x00050029, + + // Compatibility properties + HvPartitionPropertyProcessorVendor = 0x00060000, + HvPartitionPropertyProcessorXsaveFeatures = 0x00060002, + HvPartitionPropertyProcessorCLFlushSize = 0x00060003, + HvPartitionPropertyEnlightenmentModifications = 0x00060004, + HvPartitionPropertyCompatibilityVersion = 0x00060005, + HvPartitionPropertyPhysicalAddressWidth = 0x00060006, + HvPartitionPropertyXsaveStates = 0x00060007, + HvPartitionPropertyMaxXsaveDataSize = 0x00060008, + HvPartitionPropertyProcessorClockFrequency = 0x00060009, + HvPartitionPropertyProcessorFeatures0 = 0x0006000A, + HvPartitionPropertyProcessorFeatures1 = 0x0006000B, + + // Guest software properties + HvPartitionPropertyGuestOsId = 0x00070000, + + // Nested virtualization properties + HvPartitionPropertyProcessorVirtualizationFeatures = 0x00080000, + + // Extended properties + HvPartitionPropertyVmmCapabilities = 0x00090007, + + // VP-scoped properties + HvPartitionVpPropertySchedulingAffinitySet = 0x10001000, +} HV_PARTITION_PROPERTY_CODE; +``` + +## Overview +Extended property codes require the *Ex* hypercall variants when their value representation exceeds 64 bits or is banked / variable sized. + +### Early Properties +The following partition properties are classified as "early properties" that can be set before the partition is initialized: + +* `HvPartitionPropertyPrivilegeFlags` +* `HvPartitionPropertySyntheticProcFeatures` +* `HvPartitionPropertyHypercallDoorbellPage` +* `HvPartitionPropertyPartitionDiagBufferConfig` +* `HvPartitionPropertyGicdBaseAddress` +* `HvPartitionPropertyGitsTranslaterBaseAddress` +* `HvPartitionPropertyPhysicalAddressWidth` +* `HvPartitionPropertyVmmCapabilities` + +Early properties can be set after partition creation but before partition initialization, while regular properties generally require the partition to be in an initialized state. + +## See Also +* [HvCallGetPartitionProperty](../hypercalls/HvCallGetPartitionProperty.md) +* [HvCallSetPartitionProperty](../hypercalls/HvCallSetPartitionProperty.md) +* [HvCallSetPartitionPropertyEx](../hypercalls/HvCallSetPartitionPropertyEx.md) +* [HV_PARTITION_ID](hv_partition_id.md) +* [HV_PARTITION_PRIVILEGE_MASK](hv_partition_privilege_mask.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_id.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_id.md new file mode 100644 index 000000000..74385a422 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_id.md @@ -0,0 +1,40 @@ +--- +title: HV_PORT_ID +description: HV_PORT_ID data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PORT_ID + +## Overview +Uniquely identifies a communication port within a partition’s port namespace. + +## Syntax + +```c +typedef union +{ + UINT32 AsUINT32; + + struct + { + UINT32 Id:24; + UINT32 Reserved:8; + }; + +} HV_PORT_ID; +``` + +### Fields +| Field | Bits | Description | +|-------|------|-------------| +| Id | 23:0 | Port identifier (caller supplies on create; uniqueness enforced per partition). | + +## See Also +* [HvCallCreatePort](../hypercalls/HvCallCreatePort.md) +* [HvCallDeletePort](../hypercalls/HvCallDeletePort.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_info.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_info.md new file mode 100644 index 000000000..55d0f1495 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_info.md @@ -0,0 +1,47 @@ +--- +title: HV_PORT_INFO +description: HV_PORT_INFO data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PORT_INFO + +## Overview +Type-specific configuration used with `HvCallCreatePort` to define a new port object. Only the active union member is consumed based on `PortType`; other union members are zero. Structure size is 24 bytes. + +## Syntax + +```c +typedef struct +{ + HV_PORT_TYPE PortType; + UINT32 Padding; + + union + { + struct + { + HV_SYNIC_SINT_INDEX TargetSint; + HV_VP_INDEX TargetVp; + UINT64 RsvdZ; + } DoorbellPortInfo; + }; +} HV_PORT_INFO; +``` + +### Field Summary +| Field | Offset | Size | Description | +|-------|--------|------|-------------| +| DoorbellPortInfo.TargetSint | 8 | 1 | SINT (1..N-1). | +| DoorbellPortInfo.TargetVp | 9 | 4 | Target VP / ANY. | +| DoorbellPortInfo.RsvdZ | 13 | 11 | Zero (reserved; ignored). | + +## See Also +* [HvCallCreatePort](../hypercalls/HvCallCreatePort.md) +* [HvCallConnectPort](../hypercalls/HvCallConnectPort.md) +* [HV_CONNECTION_INFO](hv_connection_info.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_type.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_type.md new file mode 100644 index 000000000..3486efe1a --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_port_type.md @@ -0,0 +1,33 @@ +--- +title: HV_PORT_TYPE +description: HV_PORT_TYPE data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PORT_TYPE + +HV_PORT_TYPE specifies the type of communication port being created or used for inter-partition communication. + +## Syntax + +```c +typedef enum +{ + HvPortTypeDoorbell = 4, +} HV_PORT_TYPE; +``` + +The port type determines the communication semantics and capabilities of the port. + +**Port Type Descriptions:** +- **HvPortTypeDoorbell (4)**: Used for low latency notification mechanism. + +## See Also +* [HvCallCreatePort](../hypercalls/HvCallCreatePort.md) +* [HvCallConnectPort](../hypercalls/HvCallConnectPort.md) +* [HV_CONNECTION_INFO](hv_connection_info.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_proximity_domain_id.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_proximity_domain_id.md new file mode 100644 index 000000000..45658e111 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_proximity_domain_id.md @@ -0,0 +1,28 @@ +--- +title: HV_PROXIMITY_DOMAIN_ID +description: Numeric identifier for a NUMA proximity (memory / processor locality) domain exposed to guests. +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PROXIMITY_DOMAIN_ID + +`HV_PROXIMITY_DOMAIN_ID` is a 32-bit value identifying a guest-visible NUMA (Non-Uniform Memory Access) proximity domain. It is used in placement-sensitive hypervisor interfaces to express locality preferences or constraints for processor and memory resources. + +## Syntax +```c +typedef UINT32 HV_PROXIMITY_DOMAIN_ID; +``` + +## Overview +Proximity domains group virtual processors and memory with relatively lower access latency. Guests supply a `HV_PROXIMITY_DOMAIN_ID` in structures such as [`HV_PROXIMITY_DOMAIN_INFO`](hv_proximity_domain_info.md) to bias or constrain allocation and scheduling decisions. + +## Value Range +* Valid domain identifiers: 0–63 + +## See Also +* [HV_PROXIMITY_DOMAIN_INFO](hv_proximity_domain_info.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_proximity_domain_info.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_proximity_domain_info.md new file mode 100644 index 000000000..8bcc80622 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_proximity_domain_info.md @@ -0,0 +1,49 @@ +--- +title: HV_PROXIMITY_DOMAIN_INFO +description: HV_PROXIMITY_DOMAIN_INFO data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_PROXIMITY_DOMAIN_INFO + +HV_PROXIMITY_DOMAIN_INFO specifies NUMA (Non-Uniform Memory Access) proximity domain information for memory allocation preferences. + +## Syntax + +```c +typedef struct +{ + UINT32 ProximityPreferred:1; + UINT32 Reserved:30; + UINT32 ProximityInfoValid:1; +} HV_PROXIMITY_DOMAIN_FLAGS; + +typedef struct +{ + HV_PROXIMITY_DOMAIN_ID Id; + HV_PROXIMITY_DOMAIN_FLAGS Flags; + +} HV_PROXIMITY_DOMAIN_INFO; +``` + +This structure allows specification of NUMA topology preferences for resource allocation. + +**Fields** +* **Id** – Proximity domain identifier (`HV_PROXIMITY_DOMAIN_ID`). +* **Flags** – Bitfield controlling how the `Id` is applied. See table below. + +### Flag Bit Definitions (HV_PROXIMITY_DOMAIN_FLAGS) +| Bit | Name | Meaning | +|-----|------|---------| +| 0 | ProximityPreferred | If 1, allocate from this domain preferentially; fall back permitted if insufficient local memory. If 0, allocation is restricted to this single domain only. | +| 30:1 | Reserved | Reserved; must be zero on write; ignored on read. | +| 31 | ProximityInfoValid | If 1, `Id` is valid and enforced per above flags. If 0, allocator may choose any domain. | + +## See also +* [HV_PROXIMITY_DOMAIN_ID](hv_proximity_domain_id.md) +* [HvCallCreatePort](../hypercalls/HvCallCreatePort.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_intercept_result_parameters.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_intercept_result_parameters.md new file mode 100644 index 000000000..1aebd029d --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_intercept_result_parameters.md @@ -0,0 +1,73 @@ +--- +title: HV_REGISTER_INTERCEPT_RESULT_PARAMETERS +description: HV_REGISTER_INTERCEPT_RESULT_PARAMETERS parameters for intercept result registration +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_REGISTER_INTERCEPT_RESULT_PARAMETERS + +## Overview +Union of parameter blocks for intercept result registration (`HvCallRegisterInterceptResult`). Each member tailors result synthesis for a specific intercept class. + +Architecture: +- x64 only: This union (and its CPUID/MSR substructures) applies only where the hypercall is available. On ARM64 the hypercall is not supported. + +## Syntax + +```c +typedef struct +{ + UINT32 Eax; + UINT32 EaxMask; + UINT32 Ebx; + UINT32 EbxMask; + UINT32 Ecx; + UINT32 EcxMask; + UINT32 Edx; + UINT32 EdxMask; +} HV_REGISTER_X64_CPUID_RESULT_PARAMETERS; + +typedef struct +{ + UINT32 MsrIndex; + HV_INTERCEPT_ACCESS_TYPE_MASK AccessType; + HV_UNIMPLEMENTED_MSR_ACTION Action; +} HV_REGISTER_X64_MSR_RESULT_PARAMETERS; + +typedef union +{ + HV_REGISTER_X64_CPUID_RESULT_PARAMETERS Cpuid; + HV_REGISTER_X64_MSR_RESULT_PARAMETERS Msr; +} HV_REGISTER_INTERCEPT_RESULT_PARAMETERS; +``` + +### Member Semantics +* `Cpuid` – Supplies masked expected register values; mask bits of zero indicate "don't care" for matching. +* `Msr` – Describes MSR index, access direction(s), and action policy when the MSR is unimplemented. + +### Field Details (HV_REGISTER_X64_MSR_RESULT_PARAMETERS) +| Field | Description | +|-------|-------------| +| `MsrIndex` | Target MSR (full 32-bit index) for which a synthesized intercept result is registered. | +| `AccessType` | Combination of read / write direction bits. See [HV_INTERCEPT_ACCESS_TYPE_MASK](hv_intercept_access_type_mask.md). At least one bit must be set. | +| `Action` | Policy applied when the specified MSR is unimplemented. See table below. | + +#### HV_UNIMPLEMENTED_MSR_ACTION +Enumeration controlling behavior for accesses to an unimplemented MSR when an intercept result is registered. + +| Value | Name | Read Behavior | Write Behavior | +|-------|------|---------------|----------------| +| 0 | HvUnimplementedMsrActionFault | Intercept results in a fault (#GP equivalent) delivered to the guest. | Same (fault) | +| 1 | HvUnimplementedMsrActionIgnoreWriteReadZero | Read returns zero | Write is ignored (no state change). | + +## See also +* [HvCallRegisterInterceptResult](../hypercalls/HvCallRegisterInterceptResult.md) +* [HvCallUnregisterInterceptResult](../hypercalls/HvCallUnregisterInterceptResult.md) +* [HV_INTERCEPT_TYPE](hv_intercept_type.md) +* [HV_INTERCEPT_ACCESS_TYPE_MASK](hv_intercept_access_type_mask.md) +* [HvPartitionPropertyUnimplementedMsrAction](hv_partition_property_code.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_name.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_name.md index 15a5b9d0c..3cb5f2684 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_name.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_name.md @@ -4,14 +4,14 @@ description: HV_REGISTER_NAME keywords: hyper-v author: alexgrest ms.author: hvdev -ms.date: 10/15/2020 +ms.date: 09/01/2025 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_REGISTER_NAME -Virtual processor registers are uniquely identified by register names, 32-bit numbers. - +Virtual processor registers are uniquely identified by register names (32-bit identifiers). ## Syntax ```c @@ -21,264 +21,989 @@ typedef enum } HV_REGISTER_NAME; ``` -The following table lists all register names: - -| Register | Identifier | Comment | -|----------------------------------------|-----------------|--------------------------------------| -| HvRegisterExplicitSuspend | 0x00000000 | | -| HvRegisterInterceptSuspend | 0x00000001 | | -| HvRegisterHypervisorVersion | 0x00000100 | 128-bit, same as CPUID 0x40000002 | -| HvRegisterPrivilegesAndFeaturesInfo | 0x00000200 | 128-bit. same as CPUID 0x40000003 | -| HvRegisterFeaturesInfo | 0x00000201 | 128-bit. same as CPUID 0x40000004 | -| HvRegisterImplementationLimitsInfo | 0x00000202 | 128-bit. same as CPUID 0x40000005 | -| HvRegisterHardwareFeaturesInfo | 0x00000203 | 128-bit. same as CPUID 0x40000006 | -| HvRegisterGuestCrashP0 | 0x00000210 | | -| HvRegisterGuestCrashP1 | 0x00000211 | | -| HvRegisterGuestCrashP2 | 0x00000212 | | -| HvRegisterGuestCrashP3 | 0x00000213 | | -| HvRegisterGuestCrashP4 | 0x00000214 | | -| HvRegisterGuestCrashCtl | 0x00000215 | | -| HvRegisterProcessorClockFrequency | 0x00000240 | | -| HvRegisterInterruptClockFrequency | 0x00000241 | | -| HvRegisterGuestIdle | 0x00000250 | | -| HvRegisterDebugDeviceOptions | 0x00000260 | | -| HvRegisterPendingInterruption | 0x00010002 | | -| HvRegisterInterruptState | 0x00010003 | | -| HvRegisterPendingEvent0 | 0x00010004 | | -| HvRegisterPendingEvent1 | 0x00010005 | | -| HvRegisterPendingEvent2 | 0x00010006 | | -| HvRegisterPendingEvent3 | 0x00010007 | | -| HvX64RegisterRax | 0x00020000 | | -| HvX64RegisterRcx | 0x00020001 | | -| HvX64RegisterRdx | 0x00020002 | | -| HvX64RegisterRbx | 0x00020003 | | -| HvX64RegisterRsp | 0x00020004 | | -| HvX64RegisterRbp | 0x00020005 | | -| HvX64RegisterRsi | 0x00020006 | | -| HvX64RegisterRdi | 0x00020007 | | -| HvX64RegisterR8 | 0x00020008 | | -| HvX64RegisterR9 | 0x00020009 | | -| HvX64RegisterR10 | 0x0002000A | | -| HvX64RegisterR11 | 0x0002000B | | -| HvX64RegisterR12 | 0x0002000C | | -| HvX64RegisterR13 | 0x0002000D | | -| HvX64RegisterR14 | 0x0002000E | | -| HvX64RegisterR15 | 0x0002000F | | -| HvX64RegisterRip | 0x00020010 | | -| HvX64RegisterRflags | 0x00020011 | | -| HvX64RegisterXmm0 | 0x00030000 | | -| HvX64RegisterXmm1 | 0x00030001 | | -| HvX64RegisterXmm2 | 0x00030002 | | -| HvX64RegisterXmm3 | 0x00030003 | | -| HvX64RegisterXmm4 | 0x00030004 | | -| HvX64RegisterXmm5 | 0x00030005 | | -| HvX64RegisterXmm6 | 0x00030006 | | -| HvX64RegisterXmm7 | 0x00030007 | | -| HvX64RegisterXmm8 | 0x00030008 | | -| HvX64RegisterXmm9 | 0x00030009 | | -| HvX64RegisterXmm10 | 0x0003000A | | -| HvX64RegisterXmm11 | 0x0003000B | | -| HvX64RegisterXmm12 | 0x0003000C | | -| HvX64RegisterXmm13 | 0x0003000D | | -| HvX64RegisterXmm14 | 0x0003000E | | -| HvX64RegisterXmm15 | 0x0003000F | | -| HvX64RegisterFpMmx0 | 0x00030010 | | -| HvX64RegisterFpMmx1 | 0x00030011 | | -| HvX64RegisterFpMmx2 | 0x00030012 | | -| HvX64RegisterFpMmx3 | 0x00030013 | | -| HvX64RegisterFpMmx4 | 0x00030014 | | -| HvX64RegisterFpMmx5 | 0x00030015 | | -| HvX64RegisterFpMmx6 | 0x00030016 | | -| HvX64RegisterFpMmx7 | 0x00030017 | | -| HvX64RegisterFpControlStatus | 0x00030018 | | -| HvX64RegisterXmmControlStatus | 0x00030019 | | -| HvX64RegisterCr0 | 0x00040000 | | -| HvX64RegisterCr2 | 0x00040001 | | -| HvX64RegisterCr3 | 0x00040002 | | -| HvX64RegisterCr4 | 0x00040003 | | -| HvX64RegisterCr5 | 0x00040004 | | -| HvX64RegisterXfem | 0x00040005 | | -| HvX64RegisterIntermediateCr0 | 0x00041000 | | -| HvX64RegisterIntermediateCr4 | 0x00041003 | | -| HvX64RegisterIntermediateCr8 | 0x00041004 | | -| HvX64RegisterDr0 | 0x00050000 | | -| HvX64RegisterDr1 | 0x00050001 | | -| HvX64RegisterDr2 | 0x00050002 | | -| HvX64RegisterDr3 | 0x00050003 | | -| HvX64RegisterDr6 | 0x00050004 | | -| HvX64RegisterDr7 | 0x00050005 | | -| HvX64RegisterEs | 0x00060000 | | -| HvX64RegisterCs | 0x00060001 | | -| HvX64RegisterSs | 0x00060002 | | -| HvX64RegisterDs | 0x00060003 | | -| HvX64RegisterFs | 0x00060004 | | -| HvX64RegisterGs | 0x00060005 | | -| HvX64RegisterLdtr | 0x00060006 | | -| HvX64RegisterTr | 0x00060007 | | -| HvX64RegisterIdtr | 0x00070000 | | -| HvX64RegisterGdtr | 0x00070001 | | -| HvX64RegisterTsc | 0x00080000 | | -| HvX64RegisterEfer | 0x00080001 | | -| HvX64RegisterKernelGsBase | 0x00080002 | | -| HvX64RegisterApicBase | 0x00080003 | | -| HvX64RegisterPat | 0x00080004 | | -| HvX64RegisterSysenterCs | 0x00080005 | | -| HvX64RegisterSysenterRip | 0x00080006 | | -| HvX64RegisterSysenterRsp | 0x00080007 | | -| HvX64RegisterStar | 0x00080008 | | -| HvX64RegisterLstar | 0x00080009 | | -| HvX64RegisterCstar | 0x0008000A | | -| HvX64RegisterSfmask | 0x0008000B | | -| HvX64RegisterInitialApicId | 0x0008000C | | -| HvX64RegisterMtrrCap | 0x0008000D | | -| HvX64RegisterMtrrDefType | 0x0008000E | | -| HvX64RegisterMtrrPhysBase0 | 0x00080010 | | -| HvX64RegisterMtrrPhysBase1 | 0x00080011 | | -| HvX64RegisterMtrrPhysBase2 | 0x00080012 | | -| HvX64RegisterMtrrPhysBase3 | 0x00080013 | | -| HvX64RegisterMtrrPhysBase4 | 0x00080014 | | -| HvX64RegisterMtrrPhysBase5 | 0x00080015 | | -| HvX64RegisterMtrrPhysBase6 | 0x00080016 | | -| HvX64RegisterMtrrPhysBase7 | 0x00080017 | | -| HvX64RegisterMtrrPhysBase8 | 0x00080018 | | -| HvX64RegisterMtrrPhysBase9 | 0x00080019 | | -| HvX64RegisterMtrrPhysBaseA | 0x0008001A | | -| HvX64RegisterMtrrPhysBaseB | 0x0008001B | | -| HvX64RegisterMtrrPhysBaseC | 0x0008001C | | -| HvX64RegisterMtrrPhysBaseD | 0x0008001D | | -| HvX64RegisterMtrrPhysBaseE | 0x0008001E | | -| HvX64RegisterMtrrPhysBaseF | 0x0008001F | | -| HvX64RegisterMtrrPhysMask0 | 0x00080040 | | -| HvX64RegisterMtrrPhysMask1 | 0x00080041 | | -| HvX64RegisterMtrrPhysMask2 | 0x00080042 | | -| HvX64RegisterMtrrPhysMask3 | 0x00080043 | | -| HvX64RegisterMtrrPhysMask4 | 0x00080044 | | -| HvX64RegisterMtrrPhysMask5 | 0x00080045 | | -| HvX64RegisterMtrrPhysMask6 | 0x00080046 | | -| HvX64RegisterMtrrPhysMask7 | 0x00080047 | | -| HvX64RegisterMtrrPhysMask8 | 0x00080048 | | -| HvX64RegisterMtrrPhysMask9 | 0x00080049 | | -| HvX64RegisterMtrrPhysMaskA | 0x0008004A | | -| HvX64RegisterMtrrPhysMaskB | 0x0008004B | | -| HvX64RegisterMtrrPhysMaskC | 0x0008004C | | -| HvX64RegisterMtrrPhysMaskD | 0x0008004D | | -| HvX64RegisterMtrrPhysMaskE | 0x0008004E | | -| HvX64RegisterMtrrPhysMaskF | 0x0008004F | | -| HvX64RegisterMtrrFix64k00000 | 0x00080070 | | -| HvX64RegisterMtrrFix16k80000 | 0x00080071 | | -| HvX64RegisterMtrrFix16kA0000 | 0x00080072 | | -| HvX64RegisterMtrrFix4kC0000 | 0x00080073 | | -| HvX64RegisterMtrrFix4kC8000 | 0x00080074 | | -| HvX64RegisterMtrrFix4kD0000 | 0x00080075 | | -| HvX64RegisterMtrrFix4kD8000 | 0x00080076 | | -| HvX64RegisterMtrrFix4kE0000 | 0x00080077 | | -| HvX64RegisterMtrrFix4kE8000 | 0x00080078 | | -| HvX64RegisterMtrrFix4kF0000 | 0x00080079 | | -| HvX64RegisterMtrrFix4kF8000 | 0x0008007A | | -| HvX64RegisterTscAux | 0x0008007B | | -| HvX64RegisterBndcfgs | 0x0008007C | | -| HvX64RegisterDebugCtl | 0x0008007D | | -| HvX64RegisterSgxLaunchControl0 | 0x00080080 | | -| HvX64RegisterSgxLaunchControl1 | 0x00080081 | | -| HvX64RegisterSgxLaunchControl2 | 0x00080082 | | -| HvX64RegisterSgxLaunchControl3 | 0x00080083 | | -| HvX64RegisterMsrIa32MiscEnable | 0x000800A0 | | -| HvX64RegisterIa32FeatureControl | 0x000800A1 | | -| HvX64RegisterVpRuntime | 0x00090000 | | -| HvX64RegisterHypercall | 0x00090001 | | -| HvRegisterGuestOsId | 0x00090002 | | -| HvRegisterVpIndex | 0x00090003 | | -| HvRegisterTimeRefCount | 0x00090004 | | -| HvX64RegisterEoi | 0x00090010 | | -| HvX64RegisterIcr | 0x00090011 | | -| HvX64RegisterTpr | 0x00090012 | | -| HvRegisterVpAssistPage | 0x00090013 | | -| HvRegisterReferenceTsc | 0x00090017 | | -| HvRegisterReferenceTscSequence | 0x0009001A | | -| HvX64RegisterSevAvicGpa | 0x00090043 | See [HV_X64_REGISTER_SEV_GPA_PAGE](./hv_x64_register_sev_gpa_page.md) | -| HvRegisterSint0 | 0x000A0000 | | -| HvRegisterSint1 | 0x000A0001 | | -| HvRegisterSint2 | 0x000A0002 | | -| HvRegisterSint3 | 0x000A0003 | | -| HvRegisterSint4 | 0x000A0004 | | -| HvRegisterSint5 | 0x000A0005 | | -| HvRegisterSint6 | 0x000A0006 | | -| HvRegisterSint7 | 0x000A0007 | | -| HvRegisterSint8 | 0x000A0008 | | -| HvRegisterSint9 | 0x000A0009 | | -| HvRegisterSint10 | 0x000A000A | | -| HvRegisterSint11 | 0x000A000B | | -| HvRegisterSint12 | 0x000A000C | | -| HvRegisterSint13 | 0x000A000D | | -| HvRegisterSint14 | 0x000A000E | | -| HvRegisterSint15 | 0x000A000F | | -| HvRegisterScontrol | 0x000A0010 | | -| HvRegisterSversion | 0x000A0011 | | -| HvRegisterSifp | 0x000A0012 | | -| HvRegisterSipp | 0x000A0013 | | -| HvRegisterEom | 0x000A0014 | | -| HvRegisterSirbp | 0x000A0015 | | -| HvRegisterStimer0Config | 0x000B0000 | | -| HvRegisterStimer0Count | 0x000B0001 | | -| HvRegisterStimer1Config | 0x000B0002 | | -| HvRegisterStimer1Count | 0x000B0003 | | -| HvRegisterStimer2Config | 0x000B0004 | | -| HvRegisterStimer2Count | 0x000B0005 | | -| HvRegisterStimer3Config | 0x000B0006 | | -| HvRegisterStimer3Count | 0x000B0007 | | -| HvRegisterStimeUnhaltedTimerConfig | 0x000B0100 | | -| HvRegisterStimeUnhaltedTimerCount | 0x000B0101 | | -| HvX64RegisterYmm0Low | 0x000C0000 | | -| HvX64RegisterYmm1Low | 0x000C0001 | | -| HvX64RegisterYmm2Low | 0x000C0002 | | -| HvX64RegisterYmm3Low | 0x000C0003 | | -| HvX64RegisterYmm4Low | 0x000C0004 | | -| HvX64RegisterYmm5Low | 0x000C0005 | | -| HvX64RegisterYmm6Low | 0x000C0006 | | -| HvX64RegisterYmm7Low | 0x000C0007 | | -| HvX64RegisterYmm8Low | 0x000C0008 | | -| HvX64RegisterYmm9Low | 0x000C0009 | | -| HvX64RegisterYmm10Low | 0x000C000A | | -| HvX64RegisterYmm11Low | 0x000C000B | | -| HvX64RegisterYmm12Low | 0x000C000C | | -| HvX64RegisterYmm13Low | 0x000C000D | | -| HvX64RegisterYmm14Low | 0x000C000E | | -| HvX64RegisterYmm15Low | 0x000C000F | | -| HvX64RegisterYmm0High | 0x000C0010 | | -| HvX64RegisterYmm1High | 0x000C0011 | | -| HvX64RegisterYmm2High | 0x000C0012 | | -| HvX64RegisterYmm3High | 0x000C0013 | | -| HvX64RegisterYmm4High | 0x000C0014 | | -| HvX64RegisterYmm5High | 0x000C0015 | | -| HvX64RegisterYmm6High | 0x000C0016 | | -| HvX64RegisterYmm7High | 0x000C0017 | | -| HvX64RegisterYmm8High | 0x000C0018 | | -| HvX64RegisterYmm9High | 0x000C0019 | | -| HvX64RegisterYmm10High | 0x000C001A | | -| HvX64RegisterYmm11High | 0x000C001B | | -| HvX64RegisterYmm12High | 0x000C001C | | -| HvX64RegisterYmm13High | 0x000C001D | | -| HvX64RegisterYmm14High | 0x000C001E | | -| HvX64RegisterYmm15High | 0x000C001F | | -| HvRegisterVsmCodePageOffsets | 0x000D0002 | | -| HvRegisterVsmVpStatus | 0x000D0003 | | -| HvRegisterVsmPartitionStatus | 0x000D0004 | | -| HvRegisterVsmVina | 0x000D0005 | | -| HvRegisterVsmCapabilities | 0x000D0006 | | -| HvRegisterVsmPartitionConfig | 0x000D0007 | | -| HvRegisterVsmVpSecureConfigVtl0 | 0x000D0010 | | -| HvRegisterVsmVpSecureConfigVtl1 | 0x000D0011 | | -| HvRegisterVsmVpSecureConfigVtl2 | 0x000D0012 | | -| HvRegisterVsmVpSecureConfigVtl3 | 0x000D0013 | | -| HvRegisterVsmVpSecureConfigVtl4 | 0x000D0014 | | -| HvRegisterVsmVpSecureConfigVtl5 | 0x000D0015 | | -| HvRegisterVsmVpSecureConfigVtl6 | 0x000D0016 | | -| HvRegisterVsmVpSecureConfigVtl7 | 0x000D0017 | | -| HvRegisterVsmVpSecureConfigVtl8 | 0x000D0018 | | -| HvRegisterVsmVpSecureConfigVtl9 | 0x000D0019 | | -| HvRegisterVsmVpSecureConfigVtl10 | 0x000D001A | | -| HvRegisterVsmVpSecureConfigVtl11 | 0x000D001B | | -| HvRegisterVsmVpSecureConfigVtl12 | 0x000D001C | | -| HvRegisterVsmVpSecureConfigVtl13 | 0x000D001D | | -| HvRegisterVsmVpSecureConfigVtl14 | 0x000D001E | | -| HvRegisterVsmVpWaitForTlbLock | 0x000D0020 | | +## Common Registers (Architecture Neutral) + +### Suspend / Migration +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterExplicitSuspend | 0x00000000 | Explicit VP suspend (set/clear by caller) | +| HvRegisterInterceptSuspend | 0x00000001 | VP suspended due to intercept / hypervisor action | +| HvRegisterInstructionEmulationHints | 0x00000002 | Instruction emulation hints / statistics (if supported) | +| HvRegisterDispatchSuspend | 0x00000003 | Scheduler dispatch induced suspension | +| HvRegisterInternalActivityState | 0x00000004 | Internal state summary (read-only) | + +### Version & Feature Discovery (128-bit unless noted) +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterHypervisorVersion | 0x00000100 | Matches CPUID 0x40000002 | +| HvRegisterPrivilegesAndFeaturesInfo | 0x00000200 | Matches CPUID 0x40000003 | +| HvRegisterFeaturesInfo | 0x00000201 | Matches CPUID 0x40000004 | +| HvRegisterImplementationLimitsInfo | 0x00000202 | Matches CPUID 0x40000005 | +| HvRegisterHardwareFeaturesInfo | 0x00000203 | Matches CPUID 0x40000006 | +| HvRegisterCpuManagementFeaturesInfo | 0x00000204 | Matches CPUID 0x40000007 | +| HvRegisterPasidFeaturesInfo | 0x00000205 | Matches CPUID 0x40000008 | +| HvRegisterNestedVirtFeaturesInfo | 0x00000207 | Matches CPUID 0x4000000A | +| HvRegisterIptFeaturesInfo | 0x00000208 | Matches CPUID 0x4000000B | + +### Guest Crash Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterGuestCrashP0 | 0x00000210 | Crash parameter 0 | +| HvRegisterGuestCrashP1 | 0x00000211 | Crash parameter 1 | +| HvRegisterGuestCrashP2 | 0x00000212 | Crash parameter 2 | +| HvRegisterGuestCrashP3 | 0x00000213 | Crash parameter 3 | +| HvRegisterGuestCrashP4 | 0x00000214 | Crash parameter 4 | +| HvRegisterGuestCrashCtl | 0x00000215 | Crash control / notification | + +### Frequency / Timing +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterProcessorClockFrequency | 0x00000240 | Nominal core frequency (kHz) | +| HvRegisterInterruptClockFrequency | 0x00000241 | Timer frequency (kHz) | + +### Idle & Debug +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterGuestIdle | 0x00000250 | Guest idle hint / residency info | +| HvRegisterDebugDeviceOptions | 0x00000260 | Debug / device options | +| HvRegisterMemoryZeroingControl | 0x00000270 | Memory zeroing behavior control | + +### Pending Events & Interrupt State (common encodings differ per arch) +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterPendingEvent0 | 0x00010004 | Pending event slot 0 | +| HvRegisterPendingEvent1 | 0x00010005 | Pending event slot 1 | +| HvRegisterDeliverabilityNotifications | 0x00010006 | Deliverability notification bitmap | +| HvRegisterPendingEvent2 | 0x00010008 | Pending event slot 2 | +| HvRegisterPendingEvent3 | 0x00010009 | Pending event slot 3 | + +### Runtime / Context +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterVpRuntime | 0x00090000 | VP runtime (time units) | +| HvRegisterGuestOsId | 0x00090002 | Guest OS identification | +| HvRegisterVpIndex | 0x00090003 | VP index (read-only) | +| HvRegisterTimeRefCount | 0x00090004 | Time reference counter | +| HvRegisterCpuManagementVersion | 0x00090007 | CPU management interface version | +| HvRegisterVpAssistPage | 0x00090013 | VP assist page GPA | +| HvRegisterVpRootSignalCount | 0x00090014 | Root signal count | +| HvRegisterReferenceTsc | 0x00090017 | Reference TSC page GPA | +| HvRegisterReferenceTscSequence | 0x0009001A | Reference TSC sequence | +| HvRegisterNestedVpIndex | 0x00091003 | Nested VP index | + +### Performance Statistics +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterStatsPartitionRetail | 0x00090020 | Partition stats (retail subset) | +| HvRegisterStatsVpRetail | 0x00090022 | VP stats (retail) | + +### Synthetic Interrupt Controller (SynIC) – Primary +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterSint0 | 0x000A0000 | Synthetic interrupt vector 0 | +| HvRegisterSint1 | 0x000A0001 | Synthetic interrupt vector 1 | +| HvRegisterSint2 | 0x000A0002 | Synthetic interrupt vector 2 | +| HvRegisterSint3 | 0x000A0003 | Synthetic interrupt vector 3 | +| HvRegisterSint4 | 0x000A0004 | Synthetic interrupt vector 4 | +| HvRegisterSint5 | 0x000A0005 | Synthetic interrupt vector 5 | +| HvRegisterSint6 | 0x000A0006 | Synthetic interrupt vector 6 | +| HvRegisterSint7 | 0x000A0007 | Synthetic interrupt vector 7 | +| HvRegisterSint8 | 0x000A0008 | Synthetic interrupt vector 8 | +| HvRegisterSint9 | 0x000A0009 | Synthetic interrupt vector 9 | +| HvRegisterSint10 | 0x000A000A | Synthetic interrupt vector 10 | +| HvRegisterSint11 | 0x000A000B | Synthetic interrupt vector 11 | +| HvRegisterSint12 | 0x000A000C | Synthetic interrupt vector 12 | +| HvRegisterSint13 | 0x000A000D | Synthetic interrupt vector 13 | +| HvRegisterSint14 | 0x000A000E | Synthetic interrupt vector 14 | +| HvRegisterSint15 | 0x000A000F | Synthetic interrupt vector 15 | +| HvRegisterScontrol | 0x000A0010 | SynIC control | +| HvRegisterSversion | 0x000A0011 | SynIC version | +| HvRegisterSifp | 0x000A0012 | SynIC EOI/FIFO page | +| HvRegisterSipp | 0x000A0013 | SynIC interrupt parameter page | +| HvRegisterEom | 0x000A0014 | End-of-message | +| HvRegisterSirbp | 0x000A0015 | Resend bitmap pointer | + +### Synthetic Timers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterStimer0Config | 0x000B0000 | Timer 0 config | +| HvRegisterStimer0Count | 0x000B0001 | Timer 0 count | +| HvRegisterStimer1Config | 0x000B0002 | Timer 1 config | +| HvRegisterStimer1Count | 0x000B0003 | Timer 1 count | +| HvRegisterStimer2Config | 0x000B0004 | Timer 2 config | +| HvRegisterStimer2Count | 0x000B0005 | Timer 2 count | +| HvRegisterStimer3Config | 0x000B0006 | Timer 3 config | +| HvRegisterStimer3Count | 0x000B0007 | Timer 3 count | +| HvRegisterStimeUnhaltedTimerConfig | 0x000B0100 | Unhalted timer config | +| HvRegisterStimeUnhaltedTimerCount | 0x000B0101 | Unhalted timer count | + +### Virtual Secure Mode (VSM) / Isolation +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterVsmCodePageOffsets | 0x000D0002 | VSM code page offsets | +| HvRegisterVsmVpStatus | 0x000D0003 | VSM VP status | +| HvRegisterVsmPartitionStatus | 0x000D0004 | VSM partition status | +| HvRegisterVsmVina | 0x000D0005 | VSM VINA | +| HvRegisterVsmCapabilities | 0x000D0006 | VSM capability bits | +| HvRegisterVsmPartitionConfig | 0x000D0007 | VSM partition config | +| HvRegisterVsmVpSecureConfigVtl0 | 0x000D0010 | Secure config VTL0 | +| HvRegisterVsmVpSecureConfigVtl1 | 0x000D0011 | Secure config VTL1 | +| HvRegisterVsmVpSecureConfigVtl2 | 0x000D0012 | Secure config VTL2 | +| HvRegisterVsmVpSecureConfigVtl3 | 0x000D0013 | Secure config VTL3 | +| HvRegisterVsmVpSecureConfigVtl4 | 0x000D0014 | Secure config VTL4 | +| HvRegisterVsmVpSecureConfigVtl5 | 0x000D0015 | Secure config VTL5 | +| HvRegisterVsmVpSecureConfigVtl6 | 0x000D0016 | Secure config VTL6 | +| HvRegisterVsmVpSecureConfigVtl7 | 0x000D0017 | Secure config VTL7 | +| HvRegisterVsmVpSecureConfigVtl8 | 0x000D0018 | Secure config VTL8 | +| HvRegisterVsmVpSecureConfigVtl9 | 0x000D0019 | Secure config VTL9 | +| HvRegisterVsmVpSecureConfigVtl10 | 0x000D001A | Secure config VTL10 | +| HvRegisterVsmVpSecureConfigVtl11 | 0x000D001B | Secure config VTL11 | +| HvRegisterVsmVpSecureConfigVtl12 | 0x000D001C | Secure config VTL12 | +| HvRegisterVsmVpSecureConfigVtl13 | 0x000D001D | Secure config VTL13 | +| HvRegisterVsmVpSecureConfigVtl14 | 0x000D001E | Secure config VTL14 | +| HvRegisterVsmVpWaitForTlbLock | 0x000D0020 | Wait for TLB lock (synchronization) | +| HvRegisterIsolationCapabilities | 0x000D0100 | Isolation capability bits | + +## x64 Architecture Registers + +### Interrupt & Pending State (x64 additions) +| Register | Identifier | Comment | +|----------|------------|---------| +| HvRegisterPendingInterruption | 0x00010002 | Pending interruption descriptor | +| HvRegisterInterruptState | 0x00010003 | Interrupt state flags | +| HvX64RegisterPendingDebugException | 0x00010007 | Pending debug exception info | + +### General Purpose & Instruction State +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterRax | 0x00020000 | RAX | +| HvX64RegisterRcx | 0x00020001 | RCX | +| HvX64RegisterRdx | 0x00020002 | RDX | +| HvX64RegisterRbx | 0x00020003 | RBX | +| HvX64RegisterRsp | 0x00020004 | RSP | +| HvX64RegisterRbp | 0x00020005 | RBP | +| HvX64RegisterRsi | 0x00020006 | RSI | +| HvX64RegisterRdi | 0x00020007 | RDI | +| HvX64RegisterR8 | 0x00020008 | R8 | +| HvX64RegisterR9 | 0x00020009 | R9 | +| HvX64RegisterR10 | 0x0002000A | R10 | +| HvX64RegisterR11 | 0x0002000B | R11 | +| HvX64RegisterR12 | 0x0002000C | R12 | +| HvX64RegisterR13 | 0x0002000D | R13 | +| HvX64RegisterR14 | 0x0002000E | R14 | +| HvX64RegisterR15 | 0x0002000F | R15 | +| HvX64RegisterRip | 0x00020010 | RIP | +| HvX64RegisterRflags | 0x00020011 | RFLAGS | + +### Floating Point / SIMD +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterXmm0 | 0x00030000 | XMM0 | +| HvX64RegisterXmm1 | 0x00030001 | XMM1 | +| HvX64RegisterXmm2 | 0x00030002 | XMM2 | +| HvX64RegisterXmm3 | 0x00030003 | XMM3 | +| HvX64RegisterXmm4 | 0x00030004 | XMM4 | +| HvX64RegisterXmm5 | 0x00030005 | XMM5 | +| HvX64RegisterXmm6 | 0x00030006 | XMM6 | +| HvX64RegisterXmm7 | 0x00030007 | XMM7 | +| HvX64RegisterXmm8 | 0x00030008 | XMM8 | +| HvX64RegisterXmm9 | 0x00030009 | XMM9 | +| HvX64RegisterXmm10 | 0x0003000A | XMM10 | +| HvX64RegisterXmm11 | 0x0003000B | XMM11 | +| HvX64RegisterXmm12 | 0x0003000C | XMM12 | +| HvX64RegisterXmm13 | 0x0003000D | XMM13 | +| HvX64RegisterXmm14 | 0x0003000E | XMM14 | +| HvX64RegisterXmm15 | 0x0003000F | XMM15 | +| HvX64RegisterFpMmx0 | 0x00030010 | ST0 / MMX0 | +| HvX64RegisterFpMmx1 | 0x00030011 | ST1 / MMX1 | +| HvX64RegisterFpMmx2 | 0x00030012 | ST2 / MMX2 | +| HvX64RegisterFpMmx3 | 0x00030013 | ST3 / MMX3 | +| HvX64RegisterFpMmx4 | 0x00030014 | ST4 / MMX4 | +| HvX64RegisterFpMmx5 | 0x00030015 | ST5 / MMX5 | +| HvX64RegisterFpMmx6 | 0x00030016 | ST6 / MMX6 | +| HvX64RegisterFpMmx7 | 0x00030017 | ST7 / MMX7 | +| HvX64RegisterFpControlStatus | 0x00030018 | x87 control/status | +| HvX64RegisterXmmControlStatus | 0x00030019 | MXCSR | + +### Control & Intermediate Control Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterCr0 | 0x00040000 | CR0 | +| HvX64RegisterCr2 | 0x00040001 | CR2 | +| HvX64RegisterCr3 | 0x00040002 | CR3 | +| HvX64RegisterCr4 | 0x00040003 | CR4 | +| HvX64RegisterCr8 | 0x00040004 | CR8 | +| HvX64RegisterXfem | 0x00040005 | Extended feature enable mask | +| HvX64RegisterIntermediateCr0 | 0x00041000 | Virtualization shadow CR0 | +| HvX64RegisterIntermediateCr4 | 0x00041003 | Virtualization shadow CR4 | +| HvX64RegisterIntermediateCr8 | 0x00041004 | Virtualization shadow CR8 | + +### Debug Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterDr0 | 0x00050000 | DR0 | +| HvX64RegisterDr1 | 0x00050001 | DR1 | +| HvX64RegisterDr2 | 0x00050002 | DR2 | +| HvX64RegisterDr3 | 0x00050003 | DR3 | +| HvX64RegisterDr6 | 0x00050004 | DR6 | +| HvX64RegisterDr7 | 0x00050005 | DR7 | + +### Segment Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterEs | 0x00060000 | ES | +| HvX64RegisterCs | 0x00060001 | CS | +| HvX64RegisterSs | 0x00060002 | SS | +| HvX64RegisterDs | 0x00060003 | DS | +| HvX64RegisterFs | 0x00060004 | FS | +| HvX64RegisterGs | 0x00060005 | GS | +| HvX64RegisterLdtr | 0x00060006 | LDTR | +| HvX64RegisterTr | 0x00060007 | Task register | + +### Table Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterIdtr | 0x00070000 | IDT descriptor | +| HvX64RegisterGdtr | 0x00070001 | GDT descriptor | + +### Virtualized MSRs – Core & System +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterTsc | 0x00080000 | TSC | +| HvX64RegisterEfer | 0x00080001 | EFER | +| HvX64RegisterKernelGsBase | 0x00080002 | KERNEL_GS_BASE | +| HvX64RegisterApicBase | 0x00080003 | APIC_BASE | +| HvX64RegisterPat | 0x00080004 | PAT | +| HvX64RegisterSysenterCs | 0x00080005 | SYSENTER_CS | +| HvX64RegisterSysenterEip | 0x00080006 | SYSENTER_EIP | +| HvX64RegisterSysenterEsp | 0x00080007 | SYSENTER_ESP | +| HvX64RegisterStar | 0x00080008 | STAR | +| HvX64RegisterLstar | 0x00080009 | LSTAR | +| HvX64RegisterCstar | 0x0008000A | CSTAR | +| HvX64RegisterSfmask | 0x0008000B | SFMASK | +| HvX64RegisterInitialApicId | 0x0008000C | Initial APIC ID | + +### Cache Control (MTRR Set) +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterMsrMtrrCap | 0x0008000D | MTRR capability | +| HvX64RegisterMsrMtrrDefType | 0x0008000E | Default type | +| HvX64RegisterMsrMtrrPhysBase0 | 0x00080010 | Variable range base 0 | +| HvX64RegisterMsrMtrrPhysBase1 | 0x00080011 | Variable range base 1 | +| HvX64RegisterMsrMtrrPhysBase2 | 0x00080012 | Variable range base 2 | +| HvX64RegisterMsrMtrrPhysBase3 | 0x00080013 | Variable range base 3 | +| HvX64RegisterMsrMtrrPhysBase4 | 0x00080014 | Variable range base 4 | +| HvX64RegisterMsrMtrrPhysBase5 | 0x00080015 | Variable range base 5 | +| HvX64RegisterMsrMtrrPhysBase6 | 0x00080016 | Variable range base 6 | +| HvX64RegisterMsrMtrrPhysBase7 | 0x00080017 | Variable range base 7 | +| HvX64RegisterMsrMtrrPhysBase8 | 0x00080018 | Variable range base 8 | +| HvX64RegisterMsrMtrrPhysBase9 | 0x00080019 | Variable range base 9 | +| HvX64RegisterMsrMtrrPhysBaseA | 0x0008001A | Variable range base A | +| HvX64RegisterMsrMtrrPhysBaseB | 0x0008001B | Variable range base B | +| HvX64RegisterMsrMtrrPhysBaseC | 0x0008001C | Variable range base C | +| HvX64RegisterMsrMtrrPhysBaseD | 0x0008001D | Variable range base D | +| HvX64RegisterMsrMtrrPhysBaseE | 0x0008001E | Variable range base E | +| HvX64RegisterMsrMtrrPhysBaseF | 0x0008001F | Variable range base F | +| HvX64RegisterMsrMtrrPhysMask0 | 0x00080040 | Variable range mask 0 | +| HvX64RegisterMsrMtrrPhysMask1 | 0x00080041 | Variable range mask 1 | +| HvX64RegisterMsrMtrrPhysMask2 | 0x00080042 | Variable range mask 2 | +| HvX64RegisterMsrMtrrPhysMask3 | 0x00080043 | Variable range mask 3 | +| HvX64RegisterMsrMtrrPhysMask4 | 0x00080044 | Variable range mask 4 | +| HvX64RegisterMsrMtrrPhysMask5 | 0x00080045 | Variable range mask 5 | +| HvX64RegisterMsrMtrrPhysMask6 | 0x00080046 | Variable range mask 6 | +| HvX64RegisterMsrMtrrPhysMask7 | 0x00080047 | Variable range mask 7 | +| HvX64RegisterMsrMtrrPhysMask8 | 0x00080048 | Variable range mask 8 | +| HvX64RegisterMsrMtrrPhysMask9 | 0x00080049 | Variable range mask 9 | +| HvX64RegisterMsrMtrrPhysMaskA | 0x0008004A | Variable range mask A | +| HvX64RegisterMsrMtrrPhysMaskB | 0x0008004B | Variable range mask B | +| HvX64RegisterMsrMtrrPhysMaskC | 0x0008004C | Variable range mask C | +| HvX64RegisterMsrMtrrPhysMaskD | 0x0008004D | Variable range mask D | +| HvX64RegisterMsrMtrrPhysMaskE | 0x0008004E | Variable range mask E | +| HvX64RegisterMsrMtrrPhysMaskF | 0x0008004F | Variable range mask F | +| HvX64RegisterMsrMtrrFix64k00000 | 0x00080070 | Fixed range | +| HvX64RegisterMsrMtrrFix16k80000 | 0x00080071 | Fixed range | +| HvX64RegisterMsrMtrrFix16kA0000 | 0x00080072 | Fixed range | +| HvX64RegisterMsrMtrrFix4kC0000 | 0x00080073 | Fixed 4K C0000 | +| HvX64RegisterMsrMtrrFix4kC8000 | 0x00080074 | Fixed 4K C8000 | +| HvX64RegisterMsrMtrrFix4kD0000 | 0x00080075 | Fixed 4K D0000 | +| HvX64RegisterMsrMtrrFix4kD8000 | 0x00080076 | Fixed 4K D8000 | +| HvX64RegisterMsrMtrrFix4kE0000 | 0x00080077 | Fixed 4K E0000 | +| HvX64RegisterMsrMtrrFix4kE8000 | 0x00080078 | Fixed 4K E8000 | +| HvX64RegisterMsrMtrrFix4kF0000 | 0x00080079 | Fixed 4K F0000 | +| HvX64RegisterMsrMtrrFix4kF8000 | 0x0008007A | Fixed 4K F8000 | + +### Additional Virtualized MSRs & Controls +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterTscAux | 0x0008007B | TSC_AUX | +| HvX64RegisterBndcfgs | 0x0008007C | MPX BNDcfgs | +| HvX64RegisterDebugCtl | 0x0008007D | DEBUGCTL | +| HvX64RegisterMCount | 0x0008007E | Machine count (internal) | +| HvX64RegisterACount | 0x0008007F | Auxiliary count (internal) | +| HvX64RegisterSgxLaunchControl0 | 0x00080080 | SGX launch control 0 | +| HvX64RegisterSgxLaunchControl1 | 0x00080081 | SGX launch control 1 | +| HvX64RegisterSgxLaunchControl2 | 0x00080082 | SGX launch control 2 | +| HvX64RegisterSgxLaunchControl3 | 0x00080083 | SGX launch control 3 | +| HvX64RegisterSpecCtrl | 0x00080084 | IA32_SPEC_CTRL | +| HvX64RegisterPredCmd | 0x00080085 | IA32_PRED_CMD | +| HvX64RegisterVirtSpecCtrl | 0x00080086 | Virtual spec control | +| HvX64RegisterTscVirtualOffset | 0x00080087 | Virtual TSC offset | +| HvX64RegisterTsxCtrl | 0x00080088 | TSX control | +| HvX64RegisterXss | 0x0008008B | IA32_XSS | +| HvX64RegisterUCet | 0x0008008C | User CET | +| HvX64RegisterSCet | 0x0008008D | Supervisor CET | +| HvX64RegisterSsp | 0x0008008E | Shadow stack pointer | +| HvX64RegisterPl0Ssp | 0x0008008F | PL0 shadow stack pointer | +| HvX64RegisterPl1Ssp | 0x00080090 | PL1 shadow stack pointer | +| HvX64RegisterPl2Ssp | 0x00080091 | PL2 shadow stack pointer | +| HvX64RegisterPl3Ssp | 0x00080092 | PL3 shadow stack pointer | +| HvX64RegisterInterruptSspTableAddr | 0x00080093 | IST-like SSP table | +| HvX64RegisterTscDeadline | 0x00080095 | TSC deadline | +| HvX64RegisterTscAdjust | 0x00080096 | TSC adjust | +| HvX64RegisterUmwaitControl | 0x00080098 | UMWAIT/TPAUSE control | +| HvX64RegisterXfd | 0x00080099 | XFD | +| HvX64RegisterXfdErr | 0x0008009A | XFD error status | + +### Feature / Nested Virtualization Capability MSRs +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterMsrIa32MiscEnable | 0x000800A0 | IA32_MISC_ENABLE | +| HvX64RegisterIa32FeatureControl | 0x000800A1 | IA32_FEATURE_CONTROL | +| HvX64RegisterIa32VmxBasic | 0x000800A2 | VMX Basic | +| HvX64RegisterIa32VmxPinbasedCtls | 0x000800A3 | VMX Pinbased controls | +| HvX64RegisterIa32VmxExitCtls | 0x000800A5 | VMX Exit controls | +| HvX64RegisterIa32VmxEntryCtls | 0x000800A6 | VMX Entry controls | +| HvX64RegisterIa32VmxMisc | 0x000800A7 | VMX misc | +| HvX64RegisterIa32VmxCr0Fixed0 | 0x000800A8 | VMX CR0 fixed0 | +| HvX64RegisterIa32VmxCr0Fixed1 | 0x000800A9 | VMX CR0 fixed1 | +| HvX64RegisterIa32VmxCr4Fixed0 | 0x000800AA | VMX CR4 fixed0 | +| HvX64RegisterIa32VmxCr4Fixed1 | 0x000800AB | VMX CR4 fixed1 | +| HvX64RegisterIa32VmxVmcsEnum | 0x000800AC | VMX VMCS enum | +| HvX64RegisterIa32VmxProcbasedCtls2 | 0x000800AD | Secondary proc-based controls | +| HvX64RegisterIa32VmxEptVpidCap | 0x000800AE | EPT/VPID capabilities | +| HvX64RegisterIa32VmxTruePinbasedCtls | 0x000800AF | VMX True pinbased controls | +| HvX64RegisterIa32VmxTrueProcbasedCtls | 0x000800B0 | VMX True primary proc-based controls | +| HvX64RegisterIa32VmxTrueExitCtls | 0x000800B1 | VMX True exit controls | +| HvX64RegisterIa32VmxTrueEntryCtls | 0x000800B2 | VMX True entry controls | +| HvX64RegisterAmdVmHsavePa | 0x000800B3 | SVM HSAVE PA | +| HvX64RegisterAmdVmCr | 0x000800B4 | SVM VM_CR | + +### Performance Monitoring & Tracing +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterPerfGlobalCtrl | 0x00081000 | Perf global control | +| HvX64RegisterPerfGlobalStatus | 0x00081001 | Perf global status | +| HvX64RegisterPerfGlobalInUse | 0x00081002 | Perf in-use mask | +| HvX64RegisterFixedCtrCtrl | 0x00081003 | Fixed counter control | +| HvX64RegisterDsArea | 0x00081004 | DS area base | +| HvX64RegisterPebsEnable | 0x00081005 | PEBS enable | +| HvX64RegisterPebsLdLat | 0x00081006 | PEBS load latency | +| HvX64RegisterPebsFrontend | 0x00081007 | PEBS frontend | +| HvX64RegisterRtitCtl | 0x00081008 | PT control | +| HvX64RegisterRtitStatus | 0x00081009 | PT status | +| HvX64RegisterRtitOutputBase | 0x0008100A | PT output base | +| HvX64RegisterRtitOutputMaskPtrs | 0x0008100B | PT output mask/ptrs | +| HvX64RegisterRtitCr3Match | 0x0008100C | PT CR3 match | +| HvX64RegisterPerfEvtSel0 | 0x00081100 | First programmable event select | +| HvX64RegisterPmc0 | 0x00081200 | First PMC | +| HvX64RegisterFixedCtr0 | 0x00081300 | Fixed counter 0 | +| HvX64RegisterLbrTos | 0x00082000 | LBR top of stack | +| HvX64RegisterLbrSelect | 0x00082001 | LBR select | +| HvX64RegisterLerFromLip | 0x00082002 | Last exception from | +| HvX64RegisterLerToLip | 0x00082003 | Last exception to | +| HvX64RegisterLbrFrom0 | 0x00082100 | LBR from 0 | +| HvX64RegisterLbrTo0 | 0x00082200 | LBR to 0 | +| HvX64RegisterLbrInfo0 | 0x00083300 | LBR info 0 | + +### APIC (x2APIC Mapped) Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterApicId | 0x00084802 | APIC ID | +| HvX64RegisterApicVersion | 0x00084803 | APIC version | +| HvX64RegisterApicTpr | 0x00084808 | Task priority | +| HvX64RegisterApicPpr | 0x0008480A | Processor priority | +| HvX64RegisterApicEoi | 0x0008480B | End of interrupt | +| HvX64RegisterApicLdr | 0x0008480D | Logical dest | +| HvX64RegisterApicSpurious | 0x0008480F | Spurious vector | +| HvX64RegisterApicIsr0 | 0x00084810 | In-service 0 | +| HvX64RegisterApicIsr1 | 0x00084811 | In-service 1 | +| HvX64RegisterApicIsr2 | 0x00084812 | In-service 2 | +| HvX64RegisterApicIsr3 | 0x00084813 | In-service 3 | +| HvX64RegisterApicIsr4 | 0x00084814 | In-service 4 | +| HvX64RegisterApicIsr5 | 0x00084815 | In-service 5 | +| HvX64RegisterApicIsr6 | 0x00084816 | In-service 6 | +| HvX64RegisterApicIsr7 | 0x00084817 | In-service 7 | +| HvX64RegisterApicTmr0 | 0x00084818 | Trigger mode 0 | +| HvX64RegisterApicTmr1 | 0x00084819 | Trigger mode 1 | +| HvX64RegisterApicTmr2 | 0x0008481A | Trigger mode 2 | +| HvX64RegisterApicTmr3 | 0x0008481B | Trigger mode 3 | +| HvX64RegisterApicTmr4 | 0x0008481C | Trigger mode 4 | +| HvX64RegisterApicTmr5 | 0x0008481D | Trigger mode 5 | +| HvX64RegisterApicTmr6 | 0x0008481E | Trigger mode 6 | +| HvX64RegisterApicTmr7 | 0x0008481F | Trigger mode 7 | +| HvX64RegisterApicIrr0 | 0x00084820 | Interrupt request 0 | +| HvX64RegisterApicIrr1 | 0x00084821 | Interrupt request 1 | +| HvX64RegisterApicIrr2 | 0x00084822 | Interrupt request 2 | +| HvX64RegisterApicIrr3 | 0x00084823 | Interrupt request 3 | +| HvX64RegisterApicIrr4 | 0x00084824 | Interrupt request 4 | +| HvX64RegisterApicIrr5 | 0x00084825 | Interrupt request 5 | +| HvX64RegisterApicIrr6 | 0x00084826 | Interrupt request 6 | +| HvX64RegisterApicIrr7 | 0x00084827 | Interrupt request 7 | +| HvX64RegisterApicEse | 0x00084828 | Extended state enable | +| HvX64RegisterApicIcr | 0x00084830 | Interrupt command | +| HvX64RegisterApicLvtTimer | 0x00084832 | LVT Timer | +| HvX64RegisterApicLvtThermal | 0x00084833 | LVT Thermal | +| HvX64RegisterApicLvtPerfmon | 0x00084834 | LVT PerfMon | +| HvX64RegisterApicLvtLint0 | 0x00084835 | LVT LINT0 | +| HvX64RegisterApicLvtLint1 | 0x00084836 | LVT LINT1 | +| HvX64RegisterApicLvtError | 0x00084837 | LVT Error | +| HvX64RegisterApicInitCount | 0x00084838 | Timer initial count | +| HvX64RegisterApicCurrentCount | 0x00084839 | Timer current count | +| HvX64RegisterApicDivide | 0x0008483E | Divide config | +| HvX64RegisterApicSelfIpi | 0x0008483F | Self IPI | + +### Hypervisor-defined (Misc) & Synthetic MSRs +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterHypercall | 0x00090001 | Hypercall control MSR | +| HvX64RegisterSyntheticEoi | 0x00090010 | Synthetic EOI | +| HvX64RegisterSyntheticIcr | 0x00090011 | Synthetic ICR | +| HvX64RegisterSyntheticTpr | 0x00090012 | Synthetic TPR | +| HvX64RegisterEmulatedTimerPeriod | 0x00090030 | Timer assist period | +| HvX64RegisterEmulatedTimerControl | 0x00090031 | Timer assist control | +| HvX64RegisterPmTimerAssist | 0x00090032 | PM timer assist | + +### AMD SEV Configuration +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterSevControl | 0x00090040 | SEV control | +| HvX64RegisterSevGhcbGpa | 0x00090041 | GHCB GPA | +| HvX64RegisterSevAvicGpa | 0x00090043 | See [HV_X64_REGISTER_SEV_GPA_PAGE](./hv_x64_register_sev_gpa_page.md) | + +### Nested State +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterNestedGuestState | 0x00090050 | Nested guest state blob | +| HvX64RegisterNestedCurrentVmGpa | 0x00090051 | Current nested VM GPA | +| HvX64RegisterNestedVmxInvEpt | 0x00090052 | INV_EPT descriptor | +| HvX64RegisterNestedVmxInvVpid | 0x00090053 | INV_VPID descriptor | + +### Intercept Control +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterCrInterceptControl | 0x000E0000 | Intercept control mask | +| HvX64RegisterCrInterceptCr0Mask | 0x000E0001 | CR0 intercept mask | +| HvX64RegisterCrInterceptCr4Mask | 0x000E0002 | CR4 intercept mask | +| HvX64RegisterCrInterceptIa32MiscEnableMask | 0x000E0003 | IA32_MISC_ENABLE intercept mask | + +### x64 GHCB (SEV-ES/SNP) +| Register | Identifier | Comment | +|----------|------------|---------| +| HvX64RegisterGhcb | 0x00090019 | GHCB MSR proxy (guest) | + +## ARM64 Architecture Registers + +Deprecated registers are documented for compatibility with older OS releases. + +### General Purpose +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterX0 | 0x00020000 | X0 | +| HvArm64RegisterX1 | 0x00020001 | X1 | +| HvArm64RegisterX2 | 0x00020002 | X2 | +| HvArm64RegisterX3 | 0x00020003 | X3 | +| HvArm64RegisterX4 | 0x00020004 | X4 | +| HvArm64RegisterX5 | 0x00020005 | X5 | +| HvArm64RegisterX6 | 0x00020006 | X6 | +| HvArm64RegisterX7 | 0x00020007 | X7 | +| HvArm64RegisterX8 | 0x00020008 | X8 | +| HvArm64RegisterX9 | 0x00020009 | X9 | +| HvArm64RegisterX10 | 0x0002000A | X10 | +| HvArm64RegisterX11 | 0x0002000B | X11 | +| HvArm64RegisterX12 | 0x0002000C | X12 | +| HvArm64RegisterX13 | 0x0002000D | X13 | +| HvArm64RegisterX14 | 0x0002000E | X14 | +| HvArm64RegisterX15 | 0x0002000F | X15 | +| HvArm64RegisterX16 | 0x00020010 | X16 | +| HvArm64RegisterX17 | 0x00020011 | X17 | +| HvArm64RegisterX18 | 0x00020012 | X18 | +| HvArm64RegisterX19 | 0x00020013 | X19 | +| HvArm64RegisterX20 | 0x00020014 | X20 | +| HvArm64RegisterX21 | 0x00020015 | X21 | +| HvArm64RegisterX22 | 0x00020016 | X22 | +| HvArm64RegisterX23 | 0x00020017 | X23 | +| HvArm64RegisterX24 | 0x00020018 | X24 | +| HvArm64RegisterX25 | 0x00020019 | X25 | +| HvArm64RegisterX26 | 0x0002001A | X26 | +| HvArm64RegisterX27 | 0x0002001B | X27 | +| HvArm64RegisterX28 | 0x0002001C | X28 | +| HvArm64RegisterFp (X29) | 0x0002001D | Frame pointer | +| HvArm64RegisterLr (X30) | 0x0002001E | Link register | +| HvArm64RegisterSp | 0x0002001F | Stack pointer (Deprecated) | +| HvArm64RegisterSpEl0 | 0x00020020 | SP_EL0 (Deprecated) | +| HvArm64RegisterSpEl1 | 0x00020021 | SP_EL1 (Deprecated) | +| HvArm64RegisterPc | 0x00020022 | Program counter | +| HvArm64RegisterXzr | 0x0002FFFE | Zero register | + +### Floating Point / SIMD / SVE +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterQ0 | 0x00030000 | Q0 | +| HvArm64RegisterQ1 | 0x00030001 | Q1 | +| HvArm64RegisterQ2 | 0x00030002 | Q2 | +| HvArm64RegisterQ3 | 0x00030003 | Q3 | +| HvArm64RegisterQ4 | 0x00030004 | Q4 | +| HvArm64RegisterQ5 | 0x00030005 | Q5 | +| HvArm64RegisterQ6 | 0x00030006 | Q6 | +| HvArm64RegisterQ7 | 0x00030007 | Q7 | +| HvArm64RegisterQ8 | 0x00030008 | Q8 | +| HvArm64RegisterQ9 | 0x00030009 | Q9 | +| HvArm64RegisterQ10 | 0x0003000A | Q10 | +| HvArm64RegisterQ11 | 0x0003000B | Q11 | +| HvArm64RegisterQ12 | 0x0003000C | Q12 | +| HvArm64RegisterQ13 | 0x0003000D | Q13 | +| HvArm64RegisterQ14 | 0x0003000E | Q14 | +| HvArm64RegisterQ15 | 0x0003000F | Q15 | +| HvArm64RegisterQ16 | 0x00030010 | Q16 | +| HvArm64RegisterQ17 | 0x00030011 | Q17 | +| HvArm64RegisterQ18 | 0x00030012 | Q18 | +| HvArm64RegisterQ19 | 0x00030013 | Q19 | +| HvArm64RegisterQ20 | 0x00030014 | Q20 | +| HvArm64RegisterQ21 | 0x00030015 | Q21 | +| HvArm64RegisterQ22 | 0x00030016 | Q22 | +| HvArm64RegisterQ23 | 0x00030017 | Q23 | +| HvArm64RegisterQ24 | 0x00030018 | Q24 | +| HvArm64RegisterQ25 | 0x00030019 | Q25 | +| HvArm64RegisterQ26 | 0x0003001A | Q26 | +| HvArm64RegisterQ27 | 0x0003001B | Q27 | +| HvArm64RegisterQ28 | 0x0003001C | Q28 | +| HvArm64RegisterQ29 | 0x0003001D | Q29 | +| HvArm64RegisterQ30 | 0x0003001E | Q30 | +| HvArm64RegisterQ31 | 0x0003001F | Q31 | +| HvArm64RegisterZ0 | 0x00030100 | Z0 | +| HvArm64RegisterZ1 | 0x00030101 | Z1 | +| HvArm64RegisterZ2 | 0x00030102 | Z2 | +| HvArm64RegisterZ3 | 0x00030103 | Z3 | +| HvArm64RegisterZ4 | 0x00030104 | Z4 | +| HvArm64RegisterZ5 | 0x00030105 | Z5 | +| HvArm64RegisterZ6 | 0x00030106 | Z6 | +| HvArm64RegisterZ7 | 0x00030107 | Z7 | +| HvArm64RegisterZ8 | 0x00030108 | Z8 | +| HvArm64RegisterZ9 | 0x00030109 | Z9 | +| HvArm64RegisterZ10 | 0x0003010A | Z10 | +| HvArm64RegisterZ11 | 0x0003010B | Z11 | +| HvArm64RegisterZ12 | 0x0003010C | Z12 | +| HvArm64RegisterZ13 | 0x0003010D | Z13 | +| HvArm64RegisterZ14 | 0x0003010E | Z14 | +| HvArm64RegisterZ15 | 0x0003010F | Z15 | +| HvArm64RegisterZ16 | 0x00030110 | Z16 | +| HvArm64RegisterZ17 | 0x00030111 | Z17 | +| HvArm64RegisterZ18 | 0x00030112 | Z18 | +| HvArm64RegisterZ19 | 0x00030113 | Z19 | +| HvArm64RegisterZ20 | 0x00030114 | Z20 | +| HvArm64RegisterZ21 | 0x00030115 | Z21 | +| HvArm64RegisterZ22 | 0x00030116 | Z22 | +| HvArm64RegisterZ23 | 0x00030117 | Z23 | +| HvArm64RegisterZ24 | 0x00030118 | Z24 | +| HvArm64RegisterZ25 | 0x00030119 | Z25 | +| HvArm64RegisterZ26 | 0x0003011A | Z26 | +| HvArm64RegisterZ27 | 0x0003011B | Z27 | +| HvArm64RegisterZ28 | 0x0003011C | Z28 | +| HvArm64RegisterZ29 | 0x0003011D | Z29 | +| HvArm64RegisterZ30 | 0x0003011E | Z30 | +| HvArm64RegisterZ31 | 0x0003011F | Z31 | +| HvArm64RegisterP0 | 0x00030120 | P0 | +| HvArm64RegisterP1 | 0x00030121 | P1 | +| HvArm64RegisterP2 | 0x00030122 | P2 | +| HvArm64RegisterP3 | 0x00030123 | P3 | +| HvArm64RegisterP4 | 0x00030124 | P4 | +| HvArm64RegisterP5 | 0x00030125 | P5 | +| HvArm64RegisterP6 | 0x00030126 | P6 | +| HvArm64RegisterP7 | 0x00030127 | P7 | +| HvArm64RegisterP8 | 0x00030128 | P8 | +| HvArm64RegisterP9 | 0x00030129 | P9 | +| HvArm64RegisterP10 | 0x0003012A | P10 | +| HvArm64RegisterP11 | 0x0003012B | P11 | +| HvArm64RegisterP12 | 0x0003012C | P12 | +| HvArm64RegisterP13 | 0x0003012D | P13 | +| HvArm64RegisterP14 | 0x0003012E | P14 | +| HvArm64RegisterP15 | 0x0003012F | P15 | +| HvArm64RegisterFFR | 0x00030130 | SVE first-fault predicate | + +### Special Purpose / Status +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterCurrentEl | 0x00021003 | Current EL | +| HvArm64RegisterDaif | 0x00021004 | Interrupt mask bits | +| HvArm64RegisterDit | 0x00021005 | Data independent timing | +| HvArm64RegisterPstate | 0x00020023 | PSTATE (Deprecated) | +| HvArm64RegisterElrEl1 | 0x00040015 | ELR_EL1 (Deprecated) | +| HvArm64RegisterElrElx | 0x0002100C | Current EL return address | +| HvArm64RegisterFpcr | 0x00040012 | FPCR (Deprecated) | +| HvArm64RegisterFpsr | 0x00040013 | FPSR (Deprecated) | +| HvArm64RegisterNzcv | 0x00021006 | NZCV flags | +| HvArm64RegisterPan | 0x00021007 | PAN state | +| HvArm64RegisterSpSel | 0x00021008 | SP selection | +| HvArm64RegisterSpsrEl1 | 0x00040014 | SPSR_EL1 (Deprecated) | +| HvArm64RegisterSpsrElx | 0x0002100D | Current EL SPSR | +| HvArm64RegisterSsbs | 0x00021009 | Speculative store bypass safe | +| HvArm64RegisterTco | 0x0002100A | Tag check override | +| HvArm64RegisterUao | 0x0002100B | User access override | + +### ID Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterIdMidrEl1 | 0x00022000 | Main ID | +| HvArm64RegisterIdMpidrEl1 | 0x00022005 | Multiprocessor Affinity | +| HvArm64RegisterIdAa64Pfr0El1 | 0x00022020 | AArch64 feature 0 | +| HvArm64RegisterIdAa64Pfr1El1 | 0x00022021 | AArch64 feature 1 | +| HvArm64RegisterIdAa64Pfr2El1 | 0x00022022 | AArch64 feature 2 | +| HvArm64RegisterIdAa64Zfr0El1 | 0x00022024 | SVE feature 0 | +| HvArm64RegisterIdAa64Smfr0El1 | 0x00022025 | SME feature 0 | +| HvArm64RegisterIdAa64Dfr0El1 | 0x00022028 | Debug feature 0 | +| HvArm64RegisterIdAa64Isar0El1 | 0x00022030 | ISA attribute 0 | +| HvArm64RegisterIdAa64Mmfr0El1 | 0x00022038 | Memory model feature 0 | +| HvArm64RegisterIdAa64Mmfr1El1 | 0x00022039 | Memory model feature 1 | +| HvArm64RegisterIdAa64Mmfr2El1 | 0x0002203A | Memory model feature 2 | +| HvArm64RegisterIdAa64Mmfr3El1 | 0x0002203B | Memory model feature 3 | +| HvArm64RegisterIdAa64Mmfr4El1 | 0x0002203C | Memory model feature 4 | + +### General System Control Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterAccdataEl1 | 0x00040020 | ACCDATA | +| HvArm64RegisterActlrEl1 | 0x00040003 | ACTLR_EL1 | +| HvArm64RegisterAfsr0El1 | 0x00040016 | Asynchronous fault status 0 (EL1) | +| HvArm64RegisterAfsr0Elx | 0x00040073 | Asynchronous fault status 0 (ELx combined) | +| HvArm64RegisterAfsr1Elx | 0x00040074 | Asynchronous fault status 1 (ELx combined) | +| HvArm64RegisterAidrEl1 | 0x00040024 | Auxiliary ID | +| HvArm64RegisterAmairEl1 | 0x00040018 | Memory attribute indirection (EL1) | +| HvArm64RegisterAmairElx | 0x00040075 | Memory attribute indirection (ELx combined) | +| HvArm64RegisterApdAKeyHiEl1 | 0x00040026 | APDAKeyHi_EL1 | +| HvArm64RegisterApdAKeyLoEl1 | 0x00040027 | APDAKeyLo_EL1 | +| HvArm64RegisterApdBKeyHiEl1 | 0x00040028 | APDBKeyHi_EL1 | +| HvArm64RegisterApdBKeyLoEl1 | 0x00040029 | APDBKeyLo_EL1 | +| HvArm64RegisterApgAKeyHiEl1 | 0x0004002A | APGAKeyHi_EL1 | +| HvArm64RegisterApgAKeyLoEl1 | 0x0004002B | APGAKeyLo_EL1 | +| HvArm64RegisterApiAKeyHiEl1 | 0x0004002C | APIAKeyHi_EL1 | +| HvArm64RegisterApiAKeyLoEl1 | 0x0004002D | APIAKeyLo_EL1 | +| HvArm64RegisterApiBKeyHiEl1 | 0x0004002E | APIBKeyHi_EL1 | +| HvArm64RegisterApiBKeyLoEl1 | 0x0004002F | APIBKeyLo_EL1 | +| HvArm64RegisterCcsidrEl1 / Ccsidr2El1 | 0x00040030 /0x00040031 | Cache size ID | +| HvArm64RegisterClidrEl1 | 0x00040032 | Cache level ID | +| HvArm64RegisterContextidrEl1 | 0x0004000D | Context ID (EL1) | +| HvArm64RegisterContextidrElx | 0x00040076 | Context ID (ELx combined) | +| HvArm64RegisterCpacrEl1 | 0x00040004 | Coprocessor access (CPACR_EL1) | +| HvArm64RegisterCpacrElx | 0x00040077 | Coprocessor access (ELx combined) | +| HvArm64RegisterCsselrEl1 | 0x00040035 | Cache size selection | +| HvArm64RegisterCtrEl0 | 0x00040036 | Cache type | +| HvArm64RegisterDczidEl0 | 0x00040038 | DC ZVA parameters | +| HvArm64RegisterEsrEl1 | 0x00040008 | Exception syndrome (EL1) | +| HvArm64RegisterEsrElx | 0x00040078 | Exception syndrome (ELx combined) | +| HvArm64RegisterFarEl1 | 0x00040009 | Fault address (EL1) | +| HvArm64RegisterFarElx | 0x00040079 | Fault address (ELx combined) | +| HvArm64RegisterGcrEl1 | 0x0004003C | Guarded control | +| HvArm64RegisterGmidEl1 | 0x0004003D | Guest memory ID | +| HvArm64RegisterIsrEl1 | 0x0004004A | Interrupt status | +| HvArm64RegisterLorcEl1 | 0x0004004B | LORegion control | +| HvArm64RegisterLoreaEl1 | 0x0004004C | LORegion end address | +| HvArm64RegisterLoridEl1 | 0x0004004D | LORegion ID | +| HvArm64RegisterLornEl1 | 0x0004004E | LORegion number | +| HvArm64RegisterLorsaEl1 | 0x0004004F | LORegion start address | +| HvArm64RegisterMairEl1 | 0x0004000B | Memory attribute indirection (EL1) | +| HvArm64RegisterMairElx | 0x0004007A | Memory attribute indirection (ELx combined) | +| HvArm64RegisterMidrEl1 | 0x00040051 | MIDR (Deprecated) | +| HvArm64RegisterMpidrEl1 | 0x00040001 | MPIDR (Deprecated) | +| HvArm64RegisterMvfr0El1 | 0x00040052 | Media & VFP features 0 | +| HvArm64RegisterMvfr1El1 | 0x00040053 | Media & VFP features 1 | +| HvArm64RegisterMvfr2El1 | 0x00040054 | Media & VFP features 2 | +| HvArm64RegisterParEl1 | 0x0004000A | Physical address register | +| HvArm64RegisterRevidrEl1 | 0x00040055 | Revision ID | +| HvArm64RegisterRgsrEl1 | 0x00040056 | Random number generator seed status | +| HvArm64RegisterRndr | 0x00040057 | Random number (RNDR) | +| HvArm64RegisterRndrrs | 0x00040058 | Random number reseeded (RNDRRS) | +| HvArm64RegisterSctlrEl1 | 0x00040002 | System control (EL1) | +| HvArm64RegisterSctlrElx | 0x0004007B | System control (ELx combined) | +| HvArm64RegisterScxtnumEl0 | 0x0004005A | Context number (EL0) | +| HvArm64RegisterScxtnumEl1 | 0x0004005B | Context number (EL1) | +| HvArm64RegisterSmcrEl1 | 0x0004005D | SME control (EL1) | +| HvArm64RegisterSmidrEl1 | 0x0004005F | SME ID | +| HvArm64RegisterSmpriEl1 | 0x00040060 | SME priority (EL1) | +| HvArm64RegisterTcrEl1 | 0x00040007 | Translation control (EL1) | +| HvArm64RegisterTcrElx | 0x0004007C | Translation control (ELx combined) | +| HvArm64RegisterTfsre0El1 | 0x00040063 | Fault status (TFSRE0_EL1) | +| HvArm64RegisterTfsrEl1 | 0x00040064 | Fault status (TFSR_EL1) | +| HvArm64RegisterTpidr2El0 | 0x00040066 | TPIDR2 | +| HvArm64RegisterTpidrEl0 | 0x00040011 | Thread pointer (EL0) | +| HvArm64RegisterTpidrEl1 | 0x0004000E | Thread pointer (EL1) | +| HvArm64RegisterTpidrroEl0 | 0x00040010 | Read-only thread pointer | +| HvArm64RegisterTtbr0El1 | 0x00040005 | Translation table base 0 (EL1) | +| HvArm64RegisterTtbr0Elx | 0x0004007D | Translation table base 0 (ELx combined) | +| HvArm64RegisterTtbr1El1 | 0x00040006 | Translation table base 1 (EL1) | +| HvArm64RegisterTtbr1Elx | 0x0004007F | Translation table base 1 (ELx combined) | +| HvArm64RegisterVbarEl1 | 0x0004000C | Vector base (EL1) | +| HvArm64RegisterVbarElx | 0x00040080 | Vector base (ELx combined) | +| HvArm64RegisterZcrEl1 | 0x00040071 | SVE vector length control (EL1) | +| HvArm64RegisterZcrElx | 0x00040081 | SVE vector length control (ELx combined) | + +### Debug Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterDbgauthstatusEl1 | 0x00050040 | Debug auth status | +| HvArm64RegisterDbgbcr0El1 | 0x00050000 | Breakpoint control 0 | +| HvArm64RegisterDbgbcr1El1 | 0x00050001 | Breakpoint control 1 | +| HvArm64RegisterDbgbcr2El1 | 0x00050002 | Breakpoint control 2 | +| HvArm64RegisterDbgbcr3El1 | 0x00050003 | Breakpoint control 3 | +| HvArm64RegisterDbgbcr4El1 | 0x00050004 | Breakpoint control 4 | +| HvArm64RegisterDbgbcr5El1 | 0x00050005 | Breakpoint control 5 | +| HvArm64RegisterDbgbcr6El1 | 0x00050006 | Breakpoint control 6 | +| HvArm64RegisterDbgbcr7El1 | 0x00050007 | Breakpoint control 7 | +| HvArm64RegisterDbgbcr8El1 | 0x00050008 | Breakpoint control 8 | +| HvArm64RegisterDbgbcr9El1 | 0x00050009 | Breakpoint control 9 | +| HvArm64RegisterDbgbcr10El1 | 0x0005000A | Breakpoint control 10 | +| HvArm64RegisterDbgbcr11El1 | 0x0005000B | Breakpoint control 11 | +| HvArm64RegisterDbgbcr12El1 | 0x0005000C | Breakpoint control 12 | +| HvArm64RegisterDbgbcr13El1 | 0x0005000D | Breakpoint control 13 | +| HvArm64RegisterDbgbcr14El1 | 0x0005000E | Breakpoint control 14 | +| HvArm64RegisterDbgbcr15El1 | 0x0005000F | Breakpoint control 15 | +| HvArm64RegisterDbgbvr0El1 | 0x00050020 | Breakpoint value 0 | +| HvArm64RegisterDbgbvr1El1 | 0x00050021 | Breakpoint value 1 | +| HvArm64RegisterDbgbvr2El1 | 0x00050022 | Breakpoint value 2 | +| HvArm64RegisterDbgbvr3El1 | 0x00050023 | Breakpoint value 3 | +| HvArm64RegisterDbgbvr4El1 | 0x00050024 | Breakpoint value 4 | +| HvArm64RegisterDbgbvr5El1 | 0x00050025 | Breakpoint value 5 | +| HvArm64RegisterDbgbvr6El1 | 0x00050026 | Breakpoint value 6 | +| HvArm64RegisterDbgbvr7El1 | 0x00050027 | Breakpoint value 7 | +| HvArm64RegisterDbgbvr8El1 | 0x00050028 | Breakpoint value 8 | +| HvArm64RegisterDbgbvr9El1 | 0x00050029 | Breakpoint value 9 | +| HvArm64RegisterDbgbvr10El1 | 0x0005002A | Breakpoint value 10 | +| HvArm64RegisterDbgbvr11El1 | 0x0005002B | Breakpoint value 11 | +| HvArm64RegisterDbgbvr12El1 | 0x0005002C | Breakpoint value 12 | +| HvArm64RegisterDbgbvr13El1 | 0x0005002D | Breakpoint value 13 | +| HvArm64RegisterDbgbvr14El1 | 0x0005002E | Breakpoint value 14 | +| HvArm64RegisterDbgbvr15El1 | 0x0005002F | Breakpoint value 15 | +| HvArm64RegisterDbgclaimclrEl1 | 0x00050041 | Claim tag clear | +| HvArm64RegisterDbgclaimsetEl1 | 0x00050042 | Claim tag set | +| HvArm64RegisterDbgdtrrxEl0 | 0x00050043 | Debug data transfer receive | +| HvArm64RegisterDbgdtrtxEl0 | 0x00050044 | Debug data transfer transmit | +| HvArm64RegisterDbgprcrEl1 | 0x00050045 | External debug power/priv control | +| HvArm64RegisterDbgwcr0El1 | 0x00050010 | Watchpoint control 0 | +| HvArm64RegisterDbgwcr1El1 | 0x00050011 | Watchpoint control 1 | +| HvArm64RegisterDbgwcr2El1 | 0x00050012 | Watchpoint control 2 | +| HvArm64RegisterDbgwcr3El1 | 0x00050013 | Watchpoint control 3 | +| HvArm64RegisterDbgwcr4El1 | 0x00050014 | Watchpoint control 4 | +| HvArm64RegisterDbgwcr5El1 | 0x00050015 | Watchpoint control 5 | +| HvArm64RegisterDbgwcr6El1 | 0x00050016 | Watchpoint control 6 | +| HvArm64RegisterDbgwcr7El1 | 0x00050017 | Watchpoint control 7 | +| HvArm64RegisterDbgwcr8El1 | 0x00050018 | Watchpoint control 8 | +| HvArm64RegisterDbgwcr9El1 | 0x00050019 | Watchpoint control 9 | +| HvArm64RegisterDbgwcr10El1 | 0x0005001A | Watchpoint control 10 | +| HvArm64RegisterDbgwcr11El1 | 0x0005001B | Watchpoint control 11 | +| HvArm64RegisterDbgwcr12El1 | 0x0005001C | Watchpoint control 12 | +| HvArm64RegisterDbgwcr13El1 | 0x0005001D | Watchpoint control 13 | +| HvArm64RegisterDbgwcr14El1 | 0x0005001E | Watchpoint control 14 | +| HvArm64RegisterDbgwcr15El1 | 0x0005001F | Watchpoint control 15 | +| HvArm64RegisterDbgwvr0El1 | 0x00050030 | Watchpoint value 0 | +| HvArm64RegisterDbgwvr1El1 | 0x00050031 | Watchpoint value 1 | +| HvArm64RegisterDbgwvr2El1 | 0x00050032 | Watchpoint value 2 | +| HvArm64RegisterDbgwvr3El1 | 0x00050033 | Watchpoint value 3 | +| HvArm64RegisterDbgwvr4El1 | 0x00050034 | Watchpoint value 4 | +| HvArm64RegisterDbgwvr5El1 | 0x00050035 | Watchpoint value 5 | +| HvArm64RegisterDbgwvr6El1 | 0x00050036 | Watchpoint value 6 | +| HvArm64RegisterDbgwvr7El1 | 0x00050037 | Watchpoint value 7 | +| HvArm64RegisterDbgwvr8El1 | 0x00050038 | Watchpoint value 8 | +| HvArm64RegisterDbgwvr9El1 | 0x00050039 | Watchpoint value 9 | +| HvArm64RegisterDbgwvr10El1 | 0x0005003A | Watchpoint value 10 | +| HvArm64RegisterDbgwvr11El1 | 0x0005003B | Watchpoint value 11 | +| HvArm64RegisterDbgwvr12El1 | 0x0005003C | Watchpoint value 12 | +| HvArm64RegisterDbgwvr13El1 | 0x0005003D | Watchpoint value 13 | +| HvArm64RegisterDbgwvr14El1 | 0x0005003E | Watchpoint value 14 | +| HvArm64RegisterDbgwvr15El1 | 0x0005003F | Watchpoint value 15 | +| HvArm64RegisterDlrEl0 | 0x00050047 | Debug link register | +| HvArm64RegisterDspsrEl0 | 0x00050048 | Debug saved PSR | +| HvArm64RegisterMdccintEl1 | 0x00050049 | Monitor debug comms channel int | +| HvArm64RegisterMdccsrEl0 | 0x0005004A | Monitor debug comms channel status | +| HvArm64RegisterMdrarEl1 | 0x0005004C | Monitor debug ROM addr | +| HvArm64RegisterMdscrEl1 | 0x0005004D | Monitor debug system control | +| HvArm64RegisterOsdlrEl1 | 0x0005004E | OS double lock | +| HvArm64RegisterOsdtrrxEl1 | 0x0005004F | OS data transfer receive | +| HvArm64RegisterOsdtrtxEl1 | 0x00050050 | OS data transfer transmit | +| HvArm64RegisterOseccrEl1 | 0x00050051 | OS external debug context | +| HvArm64RegisterOslarEl1 | 0x00050052 | OS lock access | +| HvArm64RegisterOslsrEl1 | 0x00050053 | OS lock status | +| HvArm64RegisterTrfcrEl1 | 0x00050055 | Trace filter control (EL1) | +| HvArm64RegisterTrfcrElx | 0x00050057 | Trace filter control (ELx combined) | + +### Performance Monitors & Activity Monitors +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterPmccfiltrEl0 | 0x00052000 | PMU cycle counter filter | +| HvArm64RegisterPmccntrEl0 | 0x00052001 | Cycle counter | +| HvArm64RegisterPmceid0El0 | 0x00052002 | Event ID 0 | +| HvArm64RegisterPmceid1El0 | 0x00052003 | Event ID 1 | +| HvArm64RegisterPmcntenclrEl0 | 0x00052004 | Counter enable clear | +| HvArm64RegisterPmcntensetEl0 | 0x00052005 | Counter enable set | +| HvArm64RegisterPmcrEl0 | 0x00052006 | PMU control | +| HvArm64RegisterPmevcntr0El0 | 0x00052007 | Event counter 0 | +| HvArm64RegisterPmevcntr1El0 | 0x00052008 | Event counter 1 | +| HvArm64RegisterPmevcntr2El0 | 0x00052009 | Event counter 2 | +| HvArm64RegisterPmevcntr3El0 | 0x0005200A | Event counter 3 | +| HvArm64RegisterPmevcntr4El0 | 0x0005200B | Event counter 4 | +| HvArm64RegisterPmevcntr5El0 | 0x0005200C | Event counter 5 | +| HvArm64RegisterPmevcntr6El0 | 0x0005200D | Event counter 6 | +| HvArm64RegisterPmevcntr7El0 | 0x0005200E | Event counter 7 | +| HvArm64RegisterPmevcntr8El0 | 0x0005200F | Event counter 8 | +| HvArm64RegisterPmevcntr9El0 | 0x00052010 | Event counter 9 | +| HvArm64RegisterPmevcntr10El0 | 0x00052011 | Event counter 10 | +| HvArm64RegisterPmevcntr11El0 | 0x00052012 | Event counter 11 | +| HvArm64RegisterPmevcntr12El0 | 0x00052013 | Event counter 12 | +| HvArm64RegisterPmevcntr13El0 | 0x00052014 | Event counter 13 | +| HvArm64RegisterPmevcntr14El0 | 0x00052015 | Event counter 14 | +| HvArm64RegisterPmevcntr15El0 | 0x00052016 | Event counter 15 | +| HvArm64RegisterPmevcntr16El0 | 0x00052017 | Event counter 16 | +| HvArm64RegisterPmevcntr17El0 | 0x00052018 | Event counter 17 | +| HvArm64RegisterPmevcntr18El0 | 0x00052019 | Event counter 18 | +| HvArm64RegisterPmevcntr19El0 | 0x0005201A | Event counter 19 | +| HvArm64RegisterPmevcntr20El0 | 0x0005201B | Event counter 20 | +| HvArm64RegisterPmevcntr21El0 | 0x0005201C | Event counter 21 | +| HvArm64RegisterPmevcntr22El0 | 0x0005201D | Event counter 22 | +| HvArm64RegisterPmevcntr23El0 | 0x0005201E | Event counter 23 | +| HvArm64RegisterPmevcntr24El0 | 0x0005201F | Event counter 24 | +| HvArm64RegisterPmevcntr25El0 | 0x00052020 | Event counter 25 | +| HvArm64RegisterPmevcntr26El0 | 0x00052021 | Event counter 26 | +| HvArm64RegisterPmevcntr27El0 | 0x00052022 | Event counter 27 | +| HvArm64RegisterPmevcntr28El0 | 0x00052023 | Event counter 28 | +| HvArm64RegisterPmevcntr29El0 | 0x00052024 | Event counter 29 | +| HvArm64RegisterPmevcntr30El0 | 0x00052025 | Event counter 30 | +| HvArm64RegisterPmevtyper0El0 | 0x00052026 | Event type 0 | +| HvArm64RegisterPmevtyper1El0 | 0x00052027 | Event type 1 | +| HvArm64RegisterPmevtyper2El0 | 0x00052028 | Event type 2 | +| HvArm64RegisterPmevtyper3El0 | 0x00052029 | Event type 3 | +| HvArm64RegisterPmevtyper4El0 | 0x0005202A | Event type 4 | +| HvArm64RegisterPmevtyper5El0 | 0x0005202B | Event type 5 | +| HvArm64RegisterPmevtyper6El0 | 0x0005202C | Event type 6 | +| HvArm64RegisterPmevtyper7El0 | 0x0005202D | Event type 7 | +| HvArm64RegisterPmevtyper8El0 | 0x0005202E | Event type 8 | +| HvArm64RegisterPmevtyper9El0 | 0x0005202F | Event type 9 | +| HvArm64RegisterPmevtyper10El0 | 0x00052030 | Event type 10 | +| HvArm64RegisterPmevtyper11El0 | 0x00052031 | Event type 11 | +| HvArm64RegisterPmevtyper12El0 | 0x00052032 | Event type 12 | +| HvArm64RegisterPmevtyper13El0 | 0x00052033 | Event type 13 | +| HvArm64RegisterPmevtyper14El0 | 0x00052034 | Event type 14 | +| HvArm64RegisterPmevtyper15El0 | 0x00052035 | Event type 15 | +| HvArm64RegisterPmevtyper16El0 | 0x00052036 | Event type 16 | +| HvArm64RegisterPmevtyper17El0 | 0x00052037 | Event type 17 | +| HvArm64RegisterPmevtyper18El0 | 0x00052038 | Event type 18 | +| HvArm64RegisterPmevtyper19El0 | 0x00052039 | Event type 19 | +| HvArm64RegisterPmevtyper20El0 | 0x0005203A | Event type 20 | +| HvArm64RegisterPmevtyper21El0 | 0x0005203B | Event type 21 | +| HvArm64RegisterPmevtyper22El0 | 0x0005203C | Event type 22 | +| HvArm64RegisterPmevtyper23El0 | 0x0005203D | Event type 23 | +| HvArm64RegisterPmevtyper24El0 | 0x0005203E | Event type 24 | +| HvArm64RegisterPmevtyper25El0 | 0x0005203F | Event type 25 | +| HvArm64RegisterPmevtyper26El0 | 0x00052040 | Event type 26 | +| HvArm64RegisterPmevtyper27El0 | 0x00052041 | Event type 27 | +| HvArm64RegisterPmevtyper28El0 | 0x00052042 | Event type 28 | +| HvArm64RegisterPmevtyper29El0 | 0x00052043 | Event type 29 | +| HvArm64RegisterPmevtyper30El0 | 0x00052044 | Event type 30 | +| HvArm64RegisterPmintenclrEl1 | 0x00052045 | Interrupt enable clear | +| HvArm64RegisterPmintensetEl1 | 0x00052046 | Interrupt enable set | +| HvArm64RegisterPmovsclrEl0 | 0x00052048 | Overflow status clear | +| HvArm64RegisterPmovssetEl0 | 0x00052049 | Overflow status set | +| HvArm64RegisterPmselrEl0 | 0x0005204A | Event counter select | +| HvArm64RegisterPmuserenrEl0 | 0x0005204C | User enable | +| HvArm64RegisterPmxevcntrEl0 | 0x0005204D | Selected event counter | +| HvArm64RegisterPmxevtyperEl0 | 0x0005204E | Selected event type | +| HvArm64RegisterAmevcntr00El0 | 0x00053000 | Activity monitor counter 00 | +| HvArm64RegisterAmevcntr01El0 | 0x00053001 | Activity monitor counter 01 | +| HvArm64RegisterAmevcntr02El0 | 0x00053002 | Activity monitor counter 02 | +| HvArm64RegisterAmevcntr03El0 | 0x00053003 | Activity monitor counter 03 | + +### Statistical Profiling Extension (SPE) +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterPmbidrEl1 | 0x00054000 | SPE buffer ID | +| HvArm64RegisterPmblimitrEl1 | 0x00054001 | SPE buffer limit | +| HvArm64RegisterPmbptrEl1 | 0x00054002 | SPE buffer write pointer | +| HvArm64RegisterPmbsrEl1 | 0x00054003 | SPE status | +| HvArm64RegisterPmscrEl1 | 0x00054004 | SPE control EL1 | +| HvArm64RegisterPmsevfrEl1 | 0x00054006 | SPE exception filtering | +| HvArm64RegisterPmsfcrEl1 | 0x00054007 | SPE filter control | +| HvArm64RegisterPmsicrEl1 | 0x00054008 | SPE interrupt control | +| HvArm64RegisterPmsidrEl1 | 0x00054009 | SPE ID | +| HvArm64RegisterPmsirrEl1 | 0x0005400A | SPE interrupt status | +| HvArm64RegisterPmslatfrEl1 | 0x0005400B | SPE latency filtering | +| HvArm64RegisterPmsnevfrEl1 | 0x0005400C | SPE negative event filtering | + +### RAS Registers +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterDisrEl1 | 0x00056000 | RAS status | +| HvArm64RegisterErrselrEl1 | 0x00056002 | Error select | +| HvArm64RegisterErxaddrEl1 | 0x00056003 | Error record address | +| HvArm64RegisterErxctlrEl1 | 0x00056004 | Error control | +| HvArm64RegisterErrxfrEl1 | 0x00056005 | Error guest address | +| HvArm64RegisterErxmisc0El1 | 0x00056006 | Error record misc 0 | +| HvArm64RegisterErxmisc1El1 | 0x00056007 | Error record misc 1 | +| HvArm64RegisterErxmisc2El1 | 0x00056008 | Error record misc 2 | +| HvArm64RegisterErxmisc3El1 | 0x00056009 | Error record misc 3 | +| HvArm64RegisterErxpfgcdnEl1 | 0x0005600A | Pseudo-fault gen code low | +| HvArm64RegisterErxpfgctlEl1 | 0x0005600B | Pseudo-fault generation control | +| HvArm64RegisterErxpfgfEl1 | 0x0005600C | Pseudo-fault generation feature/status | +| HvArm64RegisterErxstatusEl1 | 0x0005600D | Error record status | + +### Generic Timer +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterCntfrqEl0 | 0x00058000 | Counter frequency | +| HvArm64RegisterCntkctlEl1 | 0x00058008 | Kernel timer control | +| HvArm64RegisterCntkctlElx | 0x00058013 | CntkctlEl1 or CnthctlEl2 depending on EL. | +| HvArm64RegisterCntpCtlEl0 | 0x00058009 | Physical timer control | +| HvArm64RegisterCntpCtlElx | 0x00058014 | CntpCtlEl0 or CnthpCtlEl2 depending on EL. | +| HvArm64RegisterCntpCvalEl0 | 0x0005800A | Physical timer compare | +| HvArm64RegisterCntpCvalElx | 0x00058015 | CntpCvalEl0 or CnthpCvalEl2 depending on EL. | +| HvArm64RegisterCntpTvalEl0 | 0x0005800B | Physical timer value | +| HvArm64RegisterCntpTvalElx | 0x00058016 | CntpTvalEl0 or CnthpTvalEl2 depending on EL. | +| HvArm64RegisterCntpctEl0 | 0x0005800C | Physical counter | +| HvArm64RegisterCntvCtlEl0 | 0x0005800E | Virtual timer control | +| HvArm64RegisterCntvCtlElx | 0x00058017 | CntvCtlEl0 or CnthvCtlEl2 depending on EL. | +| HvArm64RegisterCntvCvalEl0 | 0x0005800F | Virtual timer compare | +| HvArm64RegisterCntvCvalElx | 0x00058018 | CntvCvalEl0 or CnthvCvalEl2 depending on EL. | +| HvArm64RegisterCntvTvalEl0 | 0x00058010 | Virtual timer value | +| HvArm64RegisterCntvTvalElx | 0x00058019 | CntvTvalEl0 or CnthvTvalEl2 depending on EL. | +| HvArm64RegisterCntvctEl0 | 0x00058011 | Virtual counter | + +### GIC System Registers (CPU Interface) +| Register | Identifier | Comment | +|----------|------------|---------| +| Arm64RegisterIccAp1R0El1 | 0x00060000 | Active pri group1 reg0 | +| Arm64RegisterIccAp1R1El1 | 0x00060001 | Active pri group1 reg1 | +| Arm64RegisterIccAp1R2El1 | 0x00060002 | Active pri group1 reg2 | +| Arm64RegisterIccAp1R3El1 | 0x00060003 | Active pri group1 reg3 | +| Arm64RegisterIccAsgi1REl1 | 0x00060004 | SGI1R write alias | +| Arm64RegisterIccBpr1El1 | 0x00060005 | Binary point group1 | +| Arm64RegisterIccCtlrEl1 | 0x00060006 | CPU interface control | +| Arm64RegisterIccDirEl1 | 0x00060007 | Deactivate interrupt | +| Arm64RegisterIccEoir1El1 | 0x00060008 | End of interrupt group1 | +| Arm64RegisterIccHppir1El1 | 0x00060009 | Highest pending group1 | +| Arm64RegisterIccIar1El1 | 0x0006000A | Interrupt acknowledge g1 | +| Arm64RegisterIccIgrpen1El1 | 0x0006000B | Group1 enable | +| Arm64RegisterIccPmrEl1 | 0x0006000C | Priority mask | +| Arm64RegisterIccRprEl1 | 0x0006000D | Running priority | +| Arm64RegisterIccSgi1REl1 | 0x0006000E | SGI1R register access | +| Arm64RegisterIccSreEl1 | 0x0006000F | System reg enable EL1 | + +### GIC Redistributor +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterGicrBaseGpa | 0x00063000 | Redistributor base GPA | + +### Synthetic / Hypervisor Added +| Register | Identifier | Comment | +|----------|------------|---------| +| HvArm64RegisterPartitionInfoPage | 0x00090015 | Partition info page GPA | + +## See Also +* [HvCallGetVpRegisters](../hypercalls/HvCallGetVpRegisters.md) +* [HvCallSetVpRegisters](../hypercalls/HvCallSetVpRegisters.md) +* [HV_REGISTER_VALUE](hv_register_value.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_value.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_value.md index b899ce7f8..0c60ef4d3 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_value.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_register_value.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_REGISTER_VALUE @@ -33,5 +34,5 @@ typedef union HV_X64_PENDING_INTERRUPTION_REGISTER PendingInterruption; HV_X64_MSR_NPIEP_CONFIG_CONTENTS NpiepConfig; HV_X64_PENDING_EXCEPTION_EVENT PendingExceptionEvent; -} HV_REGISTER_VALUE, *PHV_REGISTER_VALUE; +} HV_REGISTER_VALUE; ``` \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_spa_page_number.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_spa_page_number.md new file mode 100644 index 000000000..053d7c5a2 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_spa_page_number.md @@ -0,0 +1,30 @@ +--- +title: HV_SPA_PAGE_NUMBER +description: HV_SPA_PAGE_NUMBER +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_SPA_PAGE_NUMBER + +Represents a system physical address page number. + +## Syntax + +```c +typedef UINT64 HV_SPA_PAGE_NUMBER; +``` + +## Remarks + +This type represents a 64-bit system physical address (SPA) page number. System physical addresses refer to the actual physical memory addresses in the host system, as opposed to guest physical addresses which are virtualized. + +The page size is typically 4KB, so the actual physical address can be calculated by shifting the page number left by 12 bits. + +## See also + +* [HV_GPA_PAGE_NUMBER](hv_gpa_page_number.md) + diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_stats_object_identity.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_stats_object_identity.md new file mode 100644 index 000000000..7db1ca4a4 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_stats_object_identity.md @@ -0,0 +1,82 @@ +--- +title: HV_STATS_OBJECT_IDENTITY +description: HV_STATS_OBJECT_IDENTITY +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_STATS_OBJECT_IDENTITY + +Identifies a specific object for statistics collection. + +## Syntax + +```c +typedef union +{ + struct + { + UINT64 ReservedZ0; + UINT32 ReservedZ1; + UINT16 ReservedZ2; + UINT8 ReservedZ3; + UINT8 StatsAreaType; + } Hypervisor; + + struct + { + HV_PARTITION_ID PartitionId; + UINT32 ReservedZ1; + UINT16 ReservedZ2; + UINT8 ReservedZ3; + UINT8 StatsAreaType; + } Partition; + + struct + { + HV_PARTITION_ID PartitionId; + HV_VP_INDEX VpIndex; + UINT16 ReservedZ2; + UINT8 ReservedZ3; + UINT8 StatsAreaType; + } Vp; + +} HV_STATS_OBJECT_IDENTITY; +``` + +## Fields + +The structure used depends on the `HV_STATS_OBJECT_TYPE`: + +### Hypervisor + +| Field | Description | +|-------|-------------| +| `ReservedZ0-ReservedZ3` | Reserved fields, must be zero | +| `StatsAreaType` | Type of statistics area | + +### Partition + +| Field | Description | +|-------|-------------| +| `PartitionId` | ID of the partition | +| `ReservedZ1-ReservedZ3` | Reserved fields, must be zero | +| `StatsAreaType` | HvStatsObjectPartition | + +### Vp + +| Field | Description | +|-------|-------------| +| `PartitionId` | ID of the partition containing the VP | +| `VpIndex` | Index of the virtual processor | +| `ReservedZ2-ReservedZ3` | Reserved fields, must be zero | +| `StatsAreaType` | HvStatsObjectVp | + +## See also + +* [HV_STATS_OBJECT_TYPE](hv_stats_object_type.md) +* [HV_PARTITION_ID](hv_partition_id.md) +* [HV_VP_INDEX](hv_vp_index.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_stats_object_type.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_stats_object_type.md new file mode 100644 index 000000000..bf405cd7e --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_stats_object_type.md @@ -0,0 +1,46 @@ +--- +title: HV_STATS_OBJECT_TYPE +description: HV_STATS_OBJECT_TYPE +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_STATS_OBJECT_TYPE + +Defines the types of objects for which statistics can be collected. + +## Syntax + +```c +typedef enum _HV_STATS_OBJECT_TYPE +{ + HvStatsObjectPartition = 0x00010001, + HvStatsObjectVp = 0x00010002 +} HV_STATS_OBJECT_TYPE; +``` + +## Constants + +| Name | Value | Description | +|------|-------|-------------| +| `HvStatsObjectPartition` | 0x00010001 | Partition-specific statistics | +| `HvStatsObjectVp` | 0x00010002 | Virtual processor statistics | + +## Remarks + +This enumeration defines the different types of objects for which the hypervisor can collect and report statistics. Access to each statistics object type is privilege-scoped: + +| Object Type | Allowed Callers | +|-------------|-----------------| +| Partition (`HvStatsObjectPartition`) | Parent for its children; partition itself for self | +| Vp (`HvStatsObjectVp`) | Parent for its children; partition itself for self | + +Each object type requires different identification parameters in the corresponding `HV_STATS_OBJECT_IDENTITY` structure. + +## See also + +* [HV_STATS_OBJECT_IDENTITY](hv_stats_object_identity.md) + diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_status.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_status.md new file mode 100644 index 000000000..78740190f --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_status.md @@ -0,0 +1,31 @@ +--- +title: HV_STATUS +description: HV_STATUS +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_STATUS + +Status codes for hypervisor operations. + +## Syntax + +```c +typedef UINT16 HV_STATUS; +``` + +## Fields + +This is a 16-bit unsigned integer representing the status code returned by hypervisor operations. + +## Remarks + +Status codes indicate the success or failure of hypervisor operations and provide additional information about any errors that occurred. + +Standard success values and error codes are defined by the hypervisor specification. + + diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_svm_enlightened_vmcb_fields.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_svm_enlightened_vmcb_fields.md index b9e91baa7..6149c7a52 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_svm_enlightened_vmcb_fields.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_svm_enlightened_vmcb_fields.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_SVM_ENLIGHTENED_VMCB_FIELDS diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_event_flags.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_event_flags.md index 0b06729ac..d28900ac8 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_event_flags.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_event_flags.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_SYNIC_EVENT_FLAGS diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_sint_index.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_sint_index.md new file mode 100644 index 000000000..dd3a8f06c --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_synic_sint_index.md @@ -0,0 +1,27 @@ +--- +title: HV_SYNIC_SINT_INDEX +description: HV_SYNIC_SINT_INDEX data type for synthetic interrupt index +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_SYNIC_SINT_INDEX + +The HV_SYNIC_SINT_INDEX type represents an index into the synthetic interrupt (SINT) table for the synthetic interrupt controller (SynIC). + +## Syntax + +```c +typedef UINT32 HV_SYNIC_SINT_INDEX; +``` + +The HV_SYNIC_SINT_INDEX is a 32-bit unsigned integer that identifies a specific synthetic interrupt source. Valid SINT indices range from 0 to 15, allowing for up to 16 different synthetic interrupt sources per virtual processor. + +## See also + + +[HvCallPostMessageDirect](../hypercalls/HvCallPostMessageDirect.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_timer_message_payload.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_timer_message_payload.md index 8bcff9dc1..c2275be0d 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_timer_message_payload.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_timer_message_payload.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_TIMER_MESSAGE_PAYLOAD diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_control_flags.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_control_flags.md new file mode 100644 index 000000000..7883d15f9 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_control_flags.md @@ -0,0 +1,47 @@ +--- +title: HV_TRANSLATE_GVA_CONTROL_FLAGS +description: HV_TRANSLATE_GVA_CONTROL_FLAGS +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_TRANSLATE_GVA_CONTROL_FLAGS + +The HV_TRANSLATE_GVA_CONTROL_FLAGS type defines the control flags used to specify how guest virtual address translation should be performed. + +## Syntax + +```c +typedef UINT64 HV_TRANSLATE_GVA_CONTROL_FLAGS; +``` + +### Flag Values + +The following flags can be combined using bitwise OR operations: + +| Flag | Value | Description | +|------|-------|-------------| +| HV_TRANSLATE_GVA_VALIDATE_READ | 0x0001 | Request data read access validation | +| HV_TRANSLATE_GVA_VALIDATE_WRITE | 0x0002 | Request data write access validation | +| HV_TRANSLATE_GVA_VALIDATE_EXECUTE | 0x0004 | Request instruction fetch access validation | +| HV_TRANSLATE_GVA_PRIVILEGE_EXEMPT | 0x0008 | Don't enforce access mode checks (x64 only) | +| HV_TRANSLATE_GVA_SET_PAGE_TABLE_BITS | 0x0010 | Set page table bits during translation | +| HV_TRANSLATE_GVA_TLB_FLUSH_INHIBIT | 0x0020 | Inhibit TLB flush operations | +| HV_TRANSLATE_GVA_SUPERVISOR_ACCESS | 0x0040 | Treat as supervisor mode access | +| HV_TRANSLATE_GVA_USER_ACCESS | 0x0080 | Treat as user mode access | +| HV_TRANSLATE_GVA_ENFORCE_SMAP | 0x0100 | (x64) Enforce SMAP restriction | +| HV_TRANSLATE_GVA_OVERRIDE_SMAP | 0x0200 | (x64) Override SMAP restriction | +| HV_TRANSLATE_GVA_PAN_SET | 0x0100 | (ARM64) Translate with PSTATE.PAN = 1 | +| HV_TRANSLATE_GVA_PAN_CLEAR | 0x0200 | (ARM64) Translate with PSTATE.PAN = 0 | +| HV_TRANSLATE_GVA_SHADOW_STACK | 0x0400 | Treat as shadow stack access (x64 only) | +| HV_TRANSLATE_GVA_INPUT_VTL_MASK | 0xFF00000000000000 | Mask for input VTL specification | + +## See Also + +[HvCallTranslateVirtualAddress](../hypercalls/HvCallTranslateVirtualAddress.md) +[HvCallTranslateVirtualAddressEx](../hypercalls/HvCallTranslateVirtualAddressEx.md) +[HV_TRANSLATE_GVA_RESULT](hv_translate_gva_result.md) +[HV_TRANSLATE_GVA_RESULT_EX](hv_translate_gva_result_ex.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_result.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_result.md new file mode 100644 index 000000000..25451ac45 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_result.md @@ -0,0 +1,77 @@ +--- +title: HV_TRANSLATE_GVA_RESULT +description: HV_TRANSLATE_GVA_RESULT data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_TRANSLATE_GVA_RESULT + +## Overview +Translation result for `HvCallTranslateVirtualAddress`. + +## Syntax + +```c +typedef union +{ + UINT64 AsUINT64; + + struct + { + HV_TRANSLATE_GVA_RESULT_CODE ResultCode; + UINT32 CacheType : 8; + UINT32 OverlayPage : 1; + UINT32 Reserved : 23; + }; +} HV_TRANSLATE_GVA_RESULT; +``` + +### Members + +| Member | Description | +|--------|-------------| +| AsUINT64 | Entire 64-bit packed representation | +| ResultCode | Outcome (success / fault classification) | +| CacheType | Host cache type enumeration for mapping | +| OverlayPage | 1 if backing page is overlay | +| Reserved | Must be zero; ignore on read | + +### Cache Types + +The `CacheType` field indicates the caching behavior for the translated memory region. The following values are supported: + +| Value | Name | Description | +|-------|------|-------------| +| 0 | HvCacheTypeUncached | Memory is not cached; all accesses go directly to memory | +| 1 | HvCacheTypeWriteCombining | Writes can be buffered and combined before being sent to memory | +| 4 | HvCacheTypeWriteThrough | Writes are cached and immediately written to memory | +| 5 | HvCacheTypeWriteProtected | Write-protected caching (x64 only) | +| 6 | HvCacheTypeWriteBack | Writes are cached and written to memory later | + +### Result Codes + +The `ResultCode` field can contain one of the following values: + +| Value | Name | Description | +|-------|------|-------------| +| 0 | HvTranslateGvaSuccess | Translation completed successfully | +| 1 | HvTranslateGvaPageNotPresent | The page is not present in memory | +| 2 | HvTranslateGvaPrivilegeViolation | Access violates privilege requirements | +| 3 | HvTranslateGvaInvalidPageTableFlags | Invalid page table flags encountered | +| 4 | HvTranslateGvaGpaUnmapped | The guest physical address is unmapped | +| 5 | HvTranslateGvaGpaNoReadAccess | No read access to the guest physical address | +| 6 | HvTranslateGvaGpaNoWriteAccess | No write access to the guest physical address | +| 7 | HvTranslateGvaGpaIllegalOverlayAccess | Illegal access to overlay memory | +| 8 | HvTranslateGvaIntercept | Memory access was intercepted | +| 9 | HvTranslateGvaGpaUnaccepted | The guest physical address is unaccepted | + +## See Also + +[HvCallTranslateVirtualAddress](../hypercalls/HvCallTranslateVirtualAddress.md) +[HV_TRANSLATE_GVA_CONTROL_FLAGS](hv_translate_gva_control_flags.md) +[HV_TRANSLATE_GVA_RESULT_EX](hv_translate_gva_result_ex.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_result_ex.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_result_ex.md new file mode 100644 index 000000000..e7eb7ef05 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_translate_gva_result_ex.md @@ -0,0 +1,80 @@ +--- +title: HV_TRANSLATE_GVA_RESULT_EX +description: HV_TRANSLATE_GVA_RESULT_EX data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_TRANSLATE_GVA_RESULT_EX + +## Overview +Extended translation result for `HvCallTranslateVirtualAddressEx`. + +## Syntax + +```c +typedef struct +{ + HV_TRANSLATE_GVA_RESULT_CODE ResultCode; + UINT32 CacheType : 8; + UINT32 OverlayPage : 1; + UINT32 Reserved : 23; + +#if !defined(_ARM64_) + HV_X64_PENDING_EVENT EventInfo; +#endif +} HV_TRANSLATE_GVA_RESULT_EX; +``` + +### Members + +| Member | Description | +|--------|-------------| +| ResultCode | See result code table (same values as basic result) | +| CacheType | Cache type enumeration, see Cache Types table below | +| OverlayPage | Overlay indicator | +| Reserved | Must be zero; ignore on read | +| EventInfo (x64) | Pending event / intercept metadata | + +### Cache Types + +The `CacheType` field indicates the caching behavior for the translated memory region. The following values are supported: + +| Value | Name | Description | +|-------|------|-------------| +| 0 | HvCacheTypeUncached | Memory is not cached; all accesses go directly to memory | +| 1 | HvCacheTypeWriteCombining | Writes can be buffered and combined before being sent to memory | +| 4 | HvCacheTypeWriteThrough | Writes are cached and immediately written to memory | +| 5 | HvCacheTypeWriteProtected | Write-protected caching (x64 only) | +| 6 | HvCacheTypeWriteBack | Writes are cached and written to memory later | + +### Result Codes + +The `ResultCode` field can contain one of the following values: + +| Value | Name | Description | +|-------|------|-------------| +| 0 | HvTranslateGvaSuccess | Translation completed successfully | +| 1 | HvTranslateGvaPageNotPresent | The page is not present in memory | +| 2 | HvTranslateGvaPrivilegeViolation | Access violates privilege requirements | +| 3 | HvTranslateGvaInvalidPageTableFlags | Invalid page table flags encountered | +| 4 | HvTranslateGvaGpaUnmapped | The guest physical address is unmapped | +| 5 | HvTranslateGvaGpaNoReadAccess | No read access to the guest physical address | +| 6 | HvTranslateGvaGpaNoWriteAccess | No write access to the guest physical address | +| 7 | HvTranslateGvaGpaIllegalOverlayAccess | Illegal access to overlay memory | +| 8 | HvTranslateGvaIntercept | Memory access was intercepted | +| 9 | HvTranslateGvaGpaUnaccepted | The guest physical address is unaccepted | + +### Architecture Differences + +On x64 platforms, this structure includes additional event information that can be used to understand the context of translation failures or intercepts. On ARM64 platforms, only the basic result information is provided. + +## See Also + +[HvCallTranslateVirtualAddressEx](../hypercalls/HvCallTranslateVirtualAddressEx.md) +[HV_TRANSLATE_GVA_CONTROL_FLAGS](hv_translate_gva_control_flags.md) +[HV_TRANSLATE_GVA_RESULT](hv_translate_gva_result.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_unmap_gpa_flags.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_unmap_gpa_flags.md new file mode 100644 index 000000000..3545751b7 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_unmap_gpa_flags.md @@ -0,0 +1,34 @@ +--- +title: HV_UNMAP_GPA_FLAGS +description: HV_UNMAP_GPA_FLAGS +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_UNMAP_GPA_FLAGS + +## Overview +Flags influencing behavior of GPA unmapping operations. + +## Syntax +```c +typedef UINT32 HV_UNMAP_GPA_FLAGS; +``` + +## Defined Bits +| Bit | Name | Meaning | +|-----|------|---------| +| 1 | HV_UNMAP_GPA_KEEP_PRECOMMITTED | Keep pages in a precommitted state (do not uncommit underlying memory) | +| 2 | HV_UNMAP_GPA_LARGE_PAGE | Treat the repetition count as large (2 MiB) pages | + +## Usage Notes +- When `HV_UNMAP_GPA_LARGE_PAGE` is set the repetition count is in units of large pages (architecture-defined 2 MiB size for this interface); partial coverage or misalignment fails with partial progress. +- `HV_UNMAP_GPA_KEEP_PRECOMMITTED` suppresses automatic uncommit of the pages being unmapped. The guest (or its parent) may later map them again without redeposit overhead. +- Large-page and keep-precommitted flags are orthogonal and MAY be combined. + +## See Also +* [HvCallUnmapGpaPages](../hypercalls/HvCallUnmapGpaPages.md) +* [HvCallMapGpaPages](../hypercalls/HvCallMapGpaPages.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_unregister_intercept_result_parameters.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_unregister_intercept_result_parameters.md new file mode 100644 index 000000000..a1c401316 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_unregister_intercept_result_parameters.md @@ -0,0 +1,40 @@ +--- +title: HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS +description: HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS + +## Overview +Parameter union selecting which previously registered intercept result entries to remove. + +Architecture: +- x64 only: Applies only where intercept result registration is supported. Not present on ARM64. + +## Syntax + +```c +typedef union +{ + HV_UNREGISTER_X64_CPUID_RESULT_PARAMETERS Cpuid; + HV_UNREGISTER_X64_MSR_RESULT_PARAMETERS Msr; +} HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS; +``` + +### Members + +- **Cpuid**: An `HV_UNREGISTER_X64_CPUID_RESULT_PARAMETERS` structure containing parameters for unregistering CPUID instruction intercepts. +- **Msr**: An `HV_UNREGISTER_X64_MSR_RESULT_PARAMETERS` structure containing parameters for unregistering Model Specific Register (MSR) access intercepts. + +## Description +- For CPUID unregistration supply the same masked pattern used during registration. +- For MSR unregistration supply the MSR index and access type combination. + +## See Also +* [HvCallUnregisterInterceptResult](../hypercalls/HvCallUnregisterInterceptResult.md) +* [HvCallRegisterInterceptResult](../hypercalls/HvCallRegisterInterceptResult.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_virtualization_fault_information.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_virtualization_fault_information.md index c9c3e83a6..1fbe69b46 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_virtualization_fault_information.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_virtualization_fault_information.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_VIRTUALIZATION_FAULT_INFORMATION @@ -24,7 +25,7 @@ typedef union UINT32 Code; UINT64 Parameter1; }; -} HV_VIRTUALIZATION_FAULT_INFORMATION, *PHV_VIRTUALIZATION_FAULT_INFORMATION; +} HV_VIRTUALIZATION_FAULT_INFORMATION; ``` ## See also diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vmx_enlightened_vmcs.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vmx_enlightened_vmcs.md index 9fcd3169f..881ab09b4 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vmx_enlightened_vmcs.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vmx_enlightened_vmcs.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_VMX_ENLIGHTENED_VMCS @@ -187,7 +188,7 @@ typedef struct UINT32 Rsvd5; UINT64 VmId; UINT64 PartitionAssistPage; - UINT64 Rsvd6[4]; + UINT64 Rsvd5[4]; UINT64 GuestBndcfgs; UINT64 GuestPerfGlobalCtrl; @@ -195,7 +196,7 @@ typedef struct UINT64 GuestSsp; UINT64 GuestInterruptSspTableAddr; UINT64 GuestLbrCtl; - UINT64 Rsvd7[2]; + UINT64 Rsvd6[2]; UINT64 XssExitingBitmap; UINT64 EnclsExitingBitmap; @@ -204,7 +205,7 @@ typedef struct UINT64 HostSCet; UINT64 HostSsp; UINT64 HostInterruptSspTableAddr; - UINT64 Rsvd8; + UINT64 TertiaryProcessorControls; } HV_VMX_ENLIGHTENED_VMCS; ``` @@ -326,6 +327,7 @@ The following table maps the Intel physical VMCS encoding to its corresponding e | 0x00006C18 | HostSCet | 8 | HOST_GRP1 | | 0x00006C1A | HostSsp | 8 | HOST_GRP1 | | 0x00006C1C | HostInterruptSspTableAddr | 8 | HOST_GRP1 | +| 0x00002034 | TertiaryProcessorControls | 8 | CONTROL_GRP1 | | 0x00002400 | ExitEptFaultGpa | 8 | NONE (Read only) | | 0x00004400 | ExitInstructionError | 4 | NONE (Read only) | | 0x00004402 | ExitReason | 4 | NONE (Read only) | diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_assist_page.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_assist_page.md index e0d39adba..6e8f56101 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_assist_page.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_assist_page.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_VP_ASSIST_PAGE @@ -46,7 +47,7 @@ typedef union UINT8 ReservedZBytePadding[HV_PAGE_SIZE]; -} HV_VP_ASSIST_PAGE, *PHV_VP_ASSIST_PAGE; +} HV_VP_ASSIST_PAGE; ``` ## See also diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_index.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_index.md new file mode 100644 index 000000000..62b268e5d --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_index.md @@ -0,0 +1,32 @@ +--- +title: HV_VP_INDEX +description: HV_VP_INDEX data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/28/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_VP_INDEX + +HV_VP_INDEX represents the index of a virtual processor within a partition. + +## Syntax + +```c +typedef UINT32 HV_VP_INDEX; +``` + +The virtual processor index is a 32-bit unsigned integer that uniquely identifies a virtual processor within a partition. + +**Special Values:** +- **HV_VP_INDEX_SELF (0xFFFFFFFE)**: Refers to the current virtual processor making the hypercall +- **HV_ANY_VP (0xFFFFFFFF)**: Refers to any virtual processor (used in some contexts where the specific VP doesn't matter) + +**Usage Notes:** +- VP indices must be unique within a partition +- VP indices are assigned when virtual processors are created +- Not all indices in the valid range need to be used (sparse allocation is allowed) +- The VP index remains constant for the lifetime of the virtual processor diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_set.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_set.md index 1e9fc6b95..fb87eb7ec 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_set.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_set.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_VP_SET diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_state_page_type.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_state_page_type.md new file mode 100644 index 000000000..88ae7ccc9 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_state_page_type.md @@ -0,0 +1,42 @@ +--- +title: HV_VP_STATE_PAGE_TYPE +description: HV_VP_STATE_PAGE_TYPE data type +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HV_VP_STATE_PAGE_TYPE + +## Overview +Enumeration that specifies the type of virtual processor state page to map or unmap. State pages provide access to different categories of VP-specific information and resources. + +## Syntax + +```c +typedef enum _HV_VP_STATE_PAGE_TYPE +{ + HvVpStatePageRegisters = 0, + HvVpStatePageInterceptMessage = 1, + HvVpVtlStatePageGhcb = 2 +} HV_VP_STATE_PAGE_TYPE; +``` + +## Values + +| Value | Name | Description | +|-------|------|-------------| +| 0 | HvVpStatePageRegisters | Register state page containing virtual processor register values | +| 1 | HvVpStatePageInterceptMessage | Intercept message page for handling VM exits and intercepts | +| 2 | HvVpVtlStatePageGhcb | Guest Hypervisor Communication Block (GHCB) page for SEV-SNP and VTL communication | + +## See Also + +* [HvCallMapVpStatePage](../hypercalls/HvCallMapVpStatePage.md) +* [HvCallUnmapVpStatePage](../hypercalls/HvCallUnmapVpStatePage.md) +* [HV_VP_INDEX](hv_vp_index.md) +* [HV_INPUT_VTL](hv_input_vtl.md) +* [HV_PARTITION_ID](hv_partition_id.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_vtl_control.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_vtl_control.md index 791fc50eb..3642b083e 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_vtl_control.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vp_vtl_control.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_VP_VTL_CONTROL diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vtl.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vtl.md new file mode 100644 index 000000000..022863f7d --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_vtl.md @@ -0,0 +1,29 @@ +--- +title: HV_VTL +description: HV_VTL +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/07/2025 +ms.topic: reference +--- + +# HV_VTL + +The HV_VTL data type represents a Virtual Trust Level (VTL) identifier used in the hypervisor's security model. VTLs provide different levels of trust and isolation within a partition, enabling secure execution environments. + +## Syntax + +```c +typedef UINT8 HV_VTL; +``` + +The HV_VTL is an 8-bit unsigned integer that identifies a Virtual Trust Level. Valid VTL values range from 0 to 15. + +Higher numbered VTLs have greater privilege and can access resources from lower numbered VTLs, but not vice versa. + +## See also + +* [HvCallEnableVpVtl](../hypercalls/HvCallEnableVpVtl.md) +* [HV_VP_INDEX](hv_vp_index.md) +* [HV_PARTITION_ID](hv_partition_id.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_control_status_register.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_control_status_register.md index cf914e58c..88f0e3375 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_control_status_register.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_control_status_register.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_X64_FP_CONTROL_STATUS_REGISTER diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_register.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_register.md index 62f9032fb..3e27f0e2a 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_register.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_fp_register.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_X64_FP_REGISTER diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_msr_npiep_config_contents.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_msr_npiep_config_contents.md index bf0263dcb..8a8fd91a2 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_msr_npiep_config_contents.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_msr_npiep_config_contents.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_X64_MSR_NPIEP_CONFIG_CONTENTS diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_segment_register.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_segment_register.md index b80c64fec..e944901d1 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_segment_register.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_segment_register.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_X64_SEGMENT_REGISTER diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_table_register.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_table_register.md index 7e1bfd641..3e3e3ccd1 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_table_register.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_table_register.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_X64_TABLE_REGISTER diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_xmm_control_status_register.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_xmm_control_status_register.md index 89a53c9cb..0a3094f5f 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_xmm_control_status_register.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_x64_xmm_control_status_register.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HV_X64_XMM_CONTROL_STATUS_REGISTER diff --git a/virtualization/hyper-v-on-windows/tlfs/datatypes/overview.md b/virtualization/hyper-v-on-windows/tlfs/datatypes/overview.md index 6a1b0154f..e187e2a92 100644 --- a/virtualization/hyper-v-on-windows/tlfs/datatypes/overview.md +++ b/virtualization/hyper-v-on-windows/tlfs/datatypes/overview.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Data Types @@ -59,7 +60,6 @@ typedef UINT64 HV_SPA_PAGE_NUMBER; typedef UINT64 HV_GPA_PAGE_NUMBER; typedef UINT64 HV_GVA_PAGE_NUMBER; typedef UINT32 HV_SPA_PAGE_OFFSET -typedef HV_GPA_PAGE_NUMBER *PHV_GPA_PAGE_NUMBER; ``` To convert an `HV_SPA` to an `HV_SPA_PAGE_NUMBER`, simply divide by `HV_PAGE_SIZE`. diff --git a/virtualization/hyper-v-on-windows/tlfs/feature-discovery.md b/virtualization/hyper-v-on-windows/tlfs/feature-discovery.md index 590fc35fc..0ae2f334a 100644 --- a/virtualization/hyper-v-on-windows/tlfs/feature-discovery.md +++ b/virtualization/hyper-v-on-windows/tlfs/feature-discovery.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Feature and Interface Discovery @@ -560,7 +561,7 @@ Indicates which hardware-specific features have been detected and are currently + +-------+---------------------------------------------------------------------------------------+ | | 14 | Physical destination mode required | + +-------+---------------------------------------------------------------------------------------+ -| | 15 | Reserved | +| | 15 | Use VMFUNC for alias map switch. | + +-------+---------------------------------------------------------------------------------------+ | | 16 | Support for hardware memory zeroing is present. | + +-------+---------------------------------------------------------------------------------------+ @@ -649,7 +650,7 @@ Indicates which hardware-specific features have been detected and are currently 15 - Reserved + Use VMFUNC for alias map switch. 16 @@ -858,7 +859,7 @@ Indicates which nested virtualization optimizations are available to a nested hy + +-------+---------------------------------------------------------------------------------------+ | | 17 | Indicates support for direct virtual flush hypercalls | + +-------+---------------------------------------------------------------------------------------+ -| | 18 | Indicates support for the HvFlushGuestPhysicalAddressSpace and HvFlushGuestPhysicalAddressList hypercalls (on Intel platforms) +| | 18 | Indicates support for the HvCallFlushGuestPhysicalAddressSpace and HvCallFlushGuestPhysicalAddressList hypercalls (on Intel platforms) + +-------+---------------------------------------------------------------------------------------+ | | 19 | Indicates support for using an enlightened MSR bitmap. | + +-------+---------------------------------------------------------------------------------------+ @@ -866,7 +867,7 @@ Indicates which nested virtualization optimizations are available to a nested hy + +-------+---------------------------------------------------------------------------------------+ | | 21 | Indicates support for non-zero value of the 0x00002802 (GuestIa32DebugCtl) field in the VMCS. + +-------+---------------------------------------------------------------------------------------+ -| | 22 | Indicates support for the enlightened TLB on AMD platforms. ASID flushes do not affect TLB entries derived from the NPT. Hypercalls must be used to invalidate NPT TLB entries. Also indicates support for the HvFlushGuestPhysicalAddressSpace and HvFlushGuestPhysicalAddressList hypercalls. +| | 22 | Indicates support for the enlightened TLB on AMD platforms. ASID flushes do not affect TLB entries derived from the NPT. Hypercalls must be used to invalidate NPT TLB entries. Also indicates support for the HvCallFlushGuestPhysicalAddressSpace and HvCallFlushGuestPhysicalAddressList hypercalls. + +-------+---------------------------------------------------------------------------------------+ | | 31-23 | Reserved | +-----------+-------+---------------------------------------------------------------------------------------+ @@ -909,7 +910,7 @@ Indicates which nested virtualization optimizations are available to a nested hy 18 - Indicates support for the HvFlushGuestPhysicalAddressSpace and HvFlushGuestPhysicalAddressList hypercalls (on Intel platforms). + Indicates support for the HvCallFlushGuestPhysicalAddressSpace and HvCallFlushGuestPhysicalAddressList hypercalls (on x64 platforms). 19 @@ -925,7 +926,7 @@ Indicates which nested virtualization optimizations are available to a nested hy 22 - Indicates support for the enlightened TLB on AMD platforms. ASID flushes do not affect TLB entries derived from the NPT. Hypercalls must be used to invalidate NPT TLB entries. Also indicates support for the HvFlushGuestPhysicalAddressSpace and HvFlushGuestPhysicalAddressList hypercalls. + Indicates support for the enlightened TLB on AMD platforms. ASID flushes do not affect TLB entries derived from the NPT. Hypercalls must be used to invalidate NPT TLB entries. Also indicates support for the HvCallFlushGuestPhysicalAddressSpace and HvCallFlushGuestPhysicalAddressList hypercalls. 31-21 diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercall-interface.md b/virtualization/hyper-v-on-windows/tlfs/hypercall-interface.md index 1a345edfc..49d4dae71 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercall-interface.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercall-interface.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Hypercall Interface @@ -50,17 +51,17 @@ The guest must avoid the examination and/or manipulation of any input or output ## Legal Hypercall Environments -Hypercalls can be invoked only from the most privileged guest processor mode. On x64 platfoms, this means protected mode with a current privilege level (CPL) of zero. Although real-mode code runs with an effective CPL of zero, hypercalls are not allowed in real mode. An attempt to invoke a hypercall within an illegal processor mode will generate a #UD (undefined operation) exception. +Hypercalls can be invoked only from the most privileged guest processor mode. On x64 platforms, this means protected mode with a current privilege level (CPL) of zero. Although real-mode code runs with an effective CPL of zero, hypercalls are not allowed in real mode. An attempt to invoke a hypercall within an illegal processor mode will generate a #UD (undefined operation) exception on x64, and undefined instruction exception on ARM64. All hypercalls should be invoked through the architecturally-defined hypercall interface (see below). An attempt to invoke a hypercall by any other means (for example, copying the code from the hypercall code page to an alternate location and executing it from there) might result in an undefined operation (#UD) exception. The hypervisor is not guaranteed to deliver this exception. ## Alignment Requirements -Callers must specify the 64-bit guest physical address (GPA) of the input and/or output parameters. GPA pointers must by 8-byte aligned. If the hypercall involves no input or output parameters, the hypervisor ignores the corresponding GPA pointer. +Callers must specify the 64-bit guest physical address (GPA) of the input and/or output parameters. GPA pointers must be 8-byte aligned. If the hypercall involves no input or output parameters, the hypervisor ignores the corresponding GPA pointer. The input and output parameter lists cannot overlap or cross page boundaries. Hypercall input and output pages are expected to be GPA pages and not “overlay” pages. If the virtual processor writes the input parameters to an overlay page and specifies a GPA within this page, hypervisor access to the input parameter list is undefined. -The hypervisor will validate that the calling partition can read from the input page before executing the requested hypercall. This validation consists of two checks: the specified GPA is mapped and the GPA is marked readable. If either of these tests fails, the hypervisor generates a memory intercept message. For hypercalls that have output parameters, the hypervisor will validate that the partition can be write to the output page. This validation consists of two checks: the specified GPA is mapped and the GPA is marked writable. +The hypervisor will validate that the calling partition can read from the input page before executing the requested hypercall. This validation consists of two checks: the specified GPA is mapped and the GPA is marked readable. If either of these tests fails, the hypervisor generates a memory intercept message. For hypercalls that have output parameters, the hypervisor will validate that the partition can write to the output page. This validation consists of two checks: the specified GPA is mapped and the GPA is marked writable. ## Hypercall Inputs @@ -80,7 +81,9 @@ Callers specify a hypercall by a 64-bit value called a hypercall input value. It For rep hypercalls, the rep count field indicates the total number of reps. The rep start index indicates the particular repetition relative to the start of the list (zero indicates that the first element in the list is to be processed). Therefore, the rep count value must always be greater than the rep start index. -Register mapping for hypercall inputs when the Fast flag is zero: +### Hypercall Register Conventions (x86/x64) + +On x86/x64, register mapping for hypercall inputs when the Fast flag is zero are as follows: | x64 | x86 | Information Provided | |---------|---------|-------------------------------------------------------------| @@ -90,7 +93,7 @@ Register mapping for hypercall inputs when the Fast flag is zero: The hypercall input value is passed in registers along with a GPA that points to the input and output parameters. -On x64, the register mappings depend 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 EFER.LMA and CS.L. If both of these flags are set, the caller is assumed to be a 64-bit caller. +The register mappings depend 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 EFER.LMA and CS.L. If both of these flags are set, the caller is assumed to be a 64-bit caller. Register mapping for hypercall inputs when the Fast flag is one: @@ -102,6 +105,43 @@ Register mapping for hypercall inputs when the Fast flag is one: The hypercall input value is passed in registers along with the input parameters. +### Hypercall Register Conventions (ARM64 SMCCC) + +On ARM64, hypercalls are executed using the "HVC #0" instruction. The calls adhere to the ARM64 SMCCC (SMC Calling Convention). + +Register mapping for hypercall inputs are as follows: + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X0 | SMCCC Function Identifier | +| X1 | Hypercall Input Value | +| X2 | Input Parameter | +| X3 | Output Parameter | + +The SMCCC Function Identifier in X0 follows this format: + +| Bits | Field | Value | Description | +|-------|----------------------|-------|---------------------------------------------------| +| 31 | Yielding Call | 0 | Always 0 | +| 30 | Calling Convention | 1 | 1 for HVC64 calling conventions | +| 29:24 | Service Call Type | 6 | 6 for Vendor Specific Hypervisor Service Calls | +| 23:16 | Reserved | 0 | Reserved, must be zero (Res0) | +| 15:0 | Function Number | 1 | 1 indicates HV call code is defined in X1 | + +The complete Function Identifier format: `0x46000001` + +### Hypercall Register Conventions (ARM64 HVC #1) + +For historical reasons, the ARM64 hypervisor interface also supports a different calling convention. The hypercalls are executed with the "HVC #1" instruction. We recommend using the SMCCC calling convention for new code. + +Register mapping for hypercall inputs are as follows: + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X0 | Hypercall Input Value | +| X1 | Input Parameter | +| X2 | Output Parameter | + ### Variable Sized Hypercall Input Headers Most hypercall input headers have fixed size. The amount of header data being passed from the guest to the hypervisor is therefore implicitly specified by the hypercall code and need not be specified separately. However, some hypercalls require a variable amount of header data. These hypercalls typically have a fixed size input header and additional header input that is of variable size. @@ -113,7 +153,7 @@ Since the fixed header size is implicit, instead of supplying the total header s ``` Variable Header Bytes = {Total Header Bytes - sizeof(Fixed Header)} rounded up to nearest multiple of 8 -Variable HeaderSize = Variable Header Bytes / 8 +Variable Header Size = Variable Header Bytes / 8 ``` It is illegal to specify a non-zero variable header size for a hypercall that is not explicitly documented as accepting variable sized input headers. In such a case the hypercall will result in a return code of `HV_STATUS_INVALID_HYPERCALL_INPUT`. @@ -122,9 +162,9 @@ It is possible that for a given invocation of a hypercall that does accept varia In all other regards, hypercalls accepting variable sized input headers are otherwise similar to fixed size input header hypercalls with regards to calling conventions. It is also possible for a variable sized header hypercall to additionally support rep semantics. In such a case the rep elements lie after the header in the usual fashion, except that the header's total size includes both the fixed and variable portions. All other rules remain the same, e.g. the first rep element must be 8 byte aligned. -### XMM Fast Hypercall Input +### XMM Fast Hypercall Input (x86/x64) -On x64 platforms, the hypervisor supports the use of XMM fast hypercalls, which allows some hypercalls to take advantage of the improved performance of the fast hypercall interface even though they require more than two input parameters. The XMM fast hypercall interface uses six XMM registers to allow the caller to pass an input parameter block up to 112 bytes in size. +On x86/x64 platforms, the hypervisor supports the use of XMM fast hypercalls, which allows some hypercalls to take advantage of the improved performance of the fast hypercall interface even though they require more than two input parameters. The XMM fast hypercall interface uses six XMM registers to allow the caller to pass an input parameter block up to 112 bytes in size. Availability of the XMM fast hypercall interface is indicated via the “Hypervisor Feature Identification” CPUID Leaf (0x40000003): @@ -148,6 +188,33 @@ Note that there is a separate flag to indicate support for XMM fast output. Any The hypercall input value is passed in registers along with the input parameters. The register mappings depend 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 EFER.LMA and CS.L. If both of these flags are set, the caller is assumed to be a 64-bit caller. If the input parameter block is smaller than 112 bytes, any extra bytes in the registers are ignored. +### Register Fast Call Input (ARM64 SMCCC) + +On ARM64 platforms, the hypervisor supports the use of register fast hypercalls, which allows some hypercalls to take advantage of the improved performance of the fast hypercall interface even though they require more than two input parameters. The register fast hypercall interface uses 15 general purpose registers to allow the caller to pass an input parameter block up to 120 bytes in size. + +#### Register Mapping (Input Only) + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X0 | SMCCC Function Identifier | +| X1 | Hypercall Input Value | +| X2 - X17 | Input Parameter Block | + +If the input parameter block is smaller than 120 bytes, any extra bytes in the registers are ignored. + +### Register Fast Call Input (ARM64 HVC #1) + +The register fast hypercall interface uses sixteen general purpose registers to allow the caller to pass an input parameter block up to 128 bytes in size. + +#### Register Mapping (Input Only) + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X0 | Hypercall Input Value | +| X1 - X17 | Input Parameter Block | + +If the input parameter block is smaller than 128 bytes, any extra bytes in the registers are ignored. + ## Hypercall Outputs All hypercalls return a 64-bit value called a hypercall result value. It is formatted as follows: @@ -161,13 +228,21 @@ All hypercalls return a 64-bit value called a hypercall result value. It is form For rep hypercalls, the reps complete field is the total number of reps complete and not relative to the rep start index. For example, if the caller specified a rep start index of 5, and a rep count of 10, the reps complete field would indicate 10 upon successful completion. -The hypercall result 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 (see above). The register mapping for hypercall outputs is as follows: +The hypercall result value is passed back in registers. + +On x64, the register mapping depends on whether the caller is running in 32-bit (x86) or 64-bit (x64) mode (see above). The register mapping for hypercall outputs is as follows: | x64 | x86 | Information Provided | |---------|---------|-------------------------------------------------------------| | RAX | EDX:EAX | Hypercall Result Value | -### XMM Fast Hypercall Output +On ARM64, the register mapping for hypercall outputs is as follows: + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X0 | Hypercall Result Value | + +### XMM Fast Hypercall Output (x86/x64) Similar to how the hypervisor supports XMM fast hypercall inputs, the same registers can be shared to return output. This is only supported on x64 platforms. @@ -194,7 +269,35 @@ Registers that are not being used to pass input parameters can be used to return For example, if the input parameter block is 20 bytes in size, the hypervisor would ignore the following 12 bytes. The remaining 80 bytes would contain hypercall output (if applicable). -## Volatile Registers +### Register Fast Call Output (ARM64 SMCCC) + +On ARM64 platforms, similar to how the hypervisor supports register fast hypercall inputs, the same registers can be shared to return output. + +#### Register Mapping (Input and Output) + +Registers that are not being used to pass input parameters can be used to return output. In other words, if the input parameter block is smaller than 120 bytes (rounded up to the nearest 8 byte aligned chunk), the remaining registers will return hypercall output. + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X2 - X17 | Input or Output Block | + +For example, if the input parameter block is 20 bytes in size, the hypervisor would ignore the following 4 bytes. The remaining 96 bytes would contain hypercall output (if applicable). + +### Register Fast Call Output (ARM64 HVC #1) + +Similar to the SMCCC versions, the HVC #1 interface uses the same registers to return output. + +#### Register Mapping (Input and Output) + +Registers that are not being used to pass input parameters can be used to return output. In other words, if the input parameter block is smaller than 128 bytes (rounded up to the nearest 8 byte aligned chunk), the remaining registers will return hypercall output. + +| Register | Information Provided | +|----------|--------------------------------------------------------------| +| X1 - X17 | Input or Output Block | + +For example, if the input parameter block is 20 bytes in size, the hypervisor would ignore the following 4 bytes. The remaining 104 bytes would contain hypercall output (if applicable). + +## Volatile Registers (x86/x64) Hypercalls will only modify the specified register values under the following conditions: @@ -203,9 +306,27 @@ Hypercalls will only modify the specified register values under the following co 1. [HvCallSetVpRegisters](./hypercalls/HvCallSetVpRegisters.md) can modify any registers that are supported with that hypercall. 1. RDX, R8, and XMM0 through XMM5, when used for fast hypercall input, remain unmodified. However, registers used for fast hypercall output can be modified, including RDX, R8, and XMM0 through XMM5. Hyper-V will only modify these registers for fast hypercall output, which is limited to x64. +## Volatile Registers (ARM64 SMCCC) + +Hypercalls will only modify the specified register values under the following conditions: + +1. X0 is always overwritten with the hypercall result value and output parameters, if any. +1. Rep hypercalls will modify X1 with the new rep start index. +1. [HvCallSetVpRegisters](./hypercalls/HvCallSetVpRegisters.md) can modify any registers that are supported with that hypercall. +1. X2 - X17, when used for fast hypercall input, remain unmodified. However, registers used for fast hypercall output can be modified, including X2 - X17. Hyper-V will only modify these registers for fast hypercall output. + +## Volatile Registers (ARM64 HVC #1) + +Hypercalls will only modify the specified register values under the following conditions: + +1. X0 is always overwritten with the hypercall result value and output parameters, if any. +1. Rep hypercalls will modify X0 with the new rep start index. +1. [HvCallSetVpRegisters](./hypercalls/HvCallSetVpRegisters.md) can modify any registers that are supported with that hypercall. +1. X1 - X17, when used for fast hypercall input, remain unmodified. However, registers used for fast hypercall output can be modified, including X1 - X17. Hyper-V will only modify these registers for fast hypercall output. + ## Hypercall Restrictions -Hypercalls may have restrictions associated with them for them to perform their intended function. If all restrictions are not met, the hypercall will terminate with an appropriate error. The following restrictions will be listed, if any apply: +Hypercalls may have associated restrictions that must be satisfied for them to perform their intended function. If all restrictions are not met, the hypercall will terminate with an appropriate error. The following restrictions will be listed, if any apply: - The calling partition must possess a particular privilege - The partition being acted upon must be in a particular state (e.g. “Active”) @@ -234,24 +355,34 @@ Several result codes are common to all hypercalls and are therefore not document | | The rep start index is not less than the rep count. | | | A reserved bit in the specified hypercall input value is non-zero. | | `HV_STATUS_INVALID_ALIGNMENT` | The specified input or output GPA pointer is not aligned to 8 bytes. | -| | The specified input or output parameter lists spans pages. | +| | The specified input or output parameter lists span pages. | | | The input or output GPA pointer is not within the bounds of the GPA space. | The return code `HV_STATUS_SUCCESS` indicates that no error condition was detected. ## Reporting the Guest OS Identity -The guest OS running within the partition must identify itself to the hypervisor by writing its signature and version to an MSR (`HV_X64_MSR_GUEST_OS_ID`) before it can invoke hypercalls. This MSR is partition-wide and is shared among all virtual processors. +The Guest OS running within the partition must identify itself to the hypervisor by writing its signature and version to an MSR (`HV_X64_MSR_GUEST_OS_ID`/`HvRegisterGuestOsId`) before it can invoke hypercalls. This MSR is partition-wide and is shared among all virtual processors. + +This register's value is initially zero. + +On x86/x64, a non-zero value must be written to the Guest OS ID MSR before the hypercall code page can be enabled (see [Establishing the Hypercall Interface (x86/x64)](#establishing-the-hypercall-interface-x86x64)). If this register is subsequently zeroed, the hypercall code page will be disabled. -This register’s value is initially zero. A non-zero value must be written to the Guest OS ID MSR before the hypercall code page can be enabled (see [Establishing the Hypercall Interface](#establishing-the-hypercall-interface)). If this register is subsequently zeroed, the hypercall code page will be disabled. +On ARM64, a non-zero value must be written to the Guest OS ID MSR before hypercall codes can be invoked. The exception is the [HvCallSetVpRegisters](hypercalls/HvCallGetVpRegisters.md)/[HvCallGetVpRegisters](hypercalls/HvCallGetVpRegisters.md) hypercalls. Please see their respective documentation for more information. ```c #define HV_X64_MSR_GUEST_OS_ID 0x40000000 ``` + ```c +#define HvRegisterGuestOsId 0x00090002 + ``` + +On ARM64, only HvRegisterGuestOsId is supported, which must be written using the [HvCallSetVpRegisters](hypercalls/HvCallGetVpRegisters.md) hypercall on the boot processor. + ### Guest OS Identity for proprietary Operating Systems -The following is the recommended encoding for this MSR. Some fields may not apply for some guest OSs. +The following is the recommended encoding for this MSR. Some fields may not apply for some Guest OSs. | Bits | Field | Description | |-----------|-----------------|-----------------------------------------------------------------------------| @@ -260,24 +391,25 @@ The following is the recommended encoding for this MSR. Some fields may not appl | 31:24 | Minor Version | Indicates the minor version of the OS | | 39:32 | Major Version | Indicates the major version of the OS | | 47:40 | OS ID | Indicates the OS variant. Encoding is unique to the vendor. Microsoft operating systems are encoded as follows: 0=Undefined, 1=MS-DOS®, 2=Windows® 3.x, 3=Windows® 9x, 4=Windows® NT (and derivatives), 5=Windows® CE -| 62:48 | Vendor ID | Indicates the guest OS vendor. A value of 0 is reserved. See list of vendors below. -| 63 | OS Type | Indicates the OS types. A value of 0 indicates a proprietary, closed source OS. A value of 1 indicates an open source OS. +| 62:48 | Vendor ID | Indicates the Guest OS vendor. A value of 0 is reserved. See list of vendors below. +| 63 | OS Type | Indicates the OS type. A value of 0 represents a proprietary (closed source) OS. A value of 1 represents an open source OS. Vendor values are allocated by Microsoft. To request a new vendor, please file an issue on the GitHub virtualization documentation repository (). -| Vendor | Value | -|-----------|--------------------------------------------------------------------------------------| -| Microsoft | 0x0001 | -| HPE | 0x0002 | -| LANCOM | 0x0200 | +| Vendor | Value | +|------------|--------------------------------------------------------------------------------------| +| Microsoft | 0x0001 | +| HPE | 0x0002 | +| BlackBerry | 0x0003 | +| LANCOM | 0x0200 | ### Guest OS Identity MSR for Open Source Operating Systems -The following encoding is offered as guidance for open source operating system vendors intending to conform to this specification. It is suggested that open source operating systems adapt the following convention. +The following encoding is offered as guidance for open source operating system vendors intending to conform to this specification. It is suggested that open source operating systems adopt the following convention. | Bits | Field | Description | |-----------|-----------------|-----------------------------------------------------------------------------| -| 15:0 | Build Number | Additional Information | +| 15:0 | Build Number | Distribution-specific information (e.g., build number). | | 47:16 | Version | Upstream kernel version information. | | 55:48 | OS ID | Additional vendor information | | 62:56 | OS Type | OS type (e.g., Linux, FreeBSD, etc.). See list of known OS types below | @@ -292,9 +424,9 @@ OS Type values are allocated by Microsoft. To request a new OS Type, please file | Xen | 0x3 | | Illumos | 0x4 | -## Establishing the Hypercall Interface +## Establishing the Hypercall Interface (x86/x64) -Hypercalls are invoked by using a special opcode. Because this opcode differs among virtualization implementations, it is necessary for the hypervisor to abstract this difference. This is done through a special hypercall page. This page is provided by the hypervisor and appears within the guest’s GPA space. The guest is required to specify the location of the page by programming the Guest Hypercall MSR. +On x86/x64, Hypercalls are invoked by using a special opcode. Because this opcode differs among virtualization implementations, it is necessary for the hypervisor to abstract this difference. This is done through a special hypercall page. This page is provided by the hypervisor and appears within the guest’s GPA space. The guest is required to specify the location of the page by programming the Guest Hypercall MSR. ```c #define HV_X64_MSR_HYPERCALL 0x40000001 @@ -311,7 +443,7 @@ The hypercall page can be placed anywhere within the guest’s GPA space, but mu This MSR is a partition-wide MSR. In other words, it is shared by all virtual processors in the partition. If one virtual processor successfully writes to the MSR, another virtual processor will read the same value. -Before the hypercall page is enabled, the guest OS must report its identity by writing its version signature to a separate MSR (HV_X64_MSR_GUEST_OS_ID). If no guest OS identity has been specified, attempts to enable the hypercall will fail. The enable bit will remain zero even if a one is written to it. Furthermore, if the guest OS identity is cleared to zero after the hypercall page has been enabled, it will become disabled. +Before the hypercall page is enabled, the Guest OS must report its identity by writing its version signature to a separate MSR (HV_X64_MSR_GUEST_OS_ID). If no Guest OS identity has been specified, attempts to enable the hypercall will fail. The enable bit will remain zero even when writing a one to it. Furthermore, if the Guest OS identity is cleared to zero after the hypercall page has been enabled, it will become disabled. The hypercall page appears as an “overlay” to the GPA space; that is, it covers whatever else is mapped to the GPA range. Its contents are readable and executable by the guest. Attempts to write to the hypercall page will result in a protection (#GP) exception. After the hypercall page has been enabled, invoking a hypercall simply involves a call to the start of the page. @@ -328,8 +460,12 @@ The following is a detailed list of the steps involved in establishing the hyper 9. The guest consults CPUID leaf 0x40000003 to determine which hypervisor facilities are available to it. After the interface has been established, the guest can initiate a hypercall. To do so, it populates the registers per the hypercall protocol and issues a CALL to the beginning of the hypercall page. The guest should assume the hypercall page performs the equivalent of a near return (0xC3) to return to the caller. As such, the hypercall must be invoked with a valid stack. +## Establishing the Hypercall Interface (ARM64) + +Because ARM64 natively supports the HVC instruction, the hypervisor does not need additional configuration to enable hypercalls. + ## Extended Hypercall Interface Hypercalls with call codes above 0x8000 are known as extended hypercalls. Extended hypercalls use the same calling convention as normal hypercalls and appear identical from a guest VM’s perspective. Extended hypercalls are internally handled differently within the Hyper-V hypervisor. -Extended hypercall capabilities can be queried with [HvExtCallQueryCapabilities](hypercalls/HvExtCallQueryCapabilities.md). \ No newline at end of file +Extended hypercall capabilities can be queried with [HvExtCallQueryCapabilities](hypercalls/HvExtCallQueryCapabilities.md). diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallAssertVirtualInterrupt.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallAssertVirtualInterrupt.md new file mode 100644 index 000000000..ee1bf4256 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallAssertVirtualInterrupt.md @@ -0,0 +1,51 @@ +--- +title: HvCallAssertVirtualInterrupt +description: HvCallAssertVirtualInterrupt hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallAssertVirtualInterrupt + +HvCallAssertVirtualInterrupt asserts a virtual interrupt to another partition. + +## Interface + + ```c +HV_STATUS +HvCallAssertVirtualInterrupt( + _In_ HV_PARTITION_ID TargetPartition, + _In_ HV_INTERRUPT_CONTROL InterruptControl, + _In_ UINT64 DestinationAddress, + _In_ HV_INTERRUPT_VECTOR RequestedVector, + _In_ HV_VTL TargetVtl, + _In_ UINT8 ReservedZ0, + _In_ UINT16 ReservedZ1 + ); + ``` + +## Call Code + +`0x0094` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `TargetPartition` | 0 | 8 | Specifies the ID of the target partition. | +| `InterruptControl` | 8 | 8 | Specifies control flags for the interrupt. | +| `DestinationAddress` | 16 | 8 | Specifies the destination address for the interrupt. | +| `RequestedVector` | 24 | 4 | Specifies the requested interrupt vector. | +| `TargetVtl` | 28 | 1 | Specifies the target VTL. | +| `ReservedZ0` | 29 | 1 | Reserved. Must be zero. | +| `ReservedZ1` | 30 | 2 | Reserved. Must be zero. | + +## See also + +[HV_INTERRUPT_CONTROL](../datatypes/hv_interrupt_control.md) +[HV_INTERRUPT_TYPE](../datatypes/hv_interrupt_type.md) +[HV_INTERRUPT_VECTOR](../datatypes/hv_interrupt_vector.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCheckForIoIntercept.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCheckForIoIntercept.md new file mode 100644 index 000000000..d0efdc839 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCheckForIoIntercept.md @@ -0,0 +1,54 @@ +--- +title: HvCallCheckForIoIntercept +description: HvCallCheckForIoIntercept hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallCheckForIoIntercept + +HvCallCheckForIoIntercept determines if I/O to a specific port would cause an intercept for a virtual processor in a specified partition. This hypercall allows the hypervisor to check if I/O operations will be intercepted without actually performing the I/O operation. + +Architecture: x64 only. + +## Interface + + ```c +HV_STATUS +HvCallCheckForIoIntercept( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_INPUT_VTL TargetVtl, + _In_ HV_IO_PORT Port, + _In_ UINT8 Size, + _In_ BOOLEAN IsWrite, + _Out_ BOOLEAN* Intercept +); + ``` + +## Call Code + +`0x00AD` (Simple) + + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `PartitionId` | 0 | 8 | Specifies the ID of the target partition. | +| `VpIndex` | 8 | 4 | Specifies the index of the virtual processor. | +| `TargetVtl` | 12 | 1 | Specifies the target VTL. | +| Padding (should be zero) | 13 | 1 | Alignment to 2-byte boundary. | +| `Port` | 14 | 2 | Specifies the I/O port to check. | +| `Size` | 16 | 1 | Specifies the size of the I/O operation (1, 2, or 4 bytes). | +| `IsWrite` | 17 | 1 | Specifies whether this is a write operation (TRUE) or read operation (FALSE). | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `Intercept` | 0 | 1 | Returns TRUE if the I/O operation would cause an intercept, FALSE otherwise. | diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallConnectPort.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallConnectPort.md new file mode 100644 index 000000000..733d6a53b --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallConnectPort.md @@ -0,0 +1,60 @@ +--- +title: HvCallConnectPort +description: HvCallConnectPort hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallConnectPort + +HvCallConnectPort establishes a connection between a partition and a port for inter-partition communication. This hypercall creates a communication channel that can be used for messaging, events, monitoring, or doorbell operations between partitions. + +## Interface + + ```c +HV_STATUS +HvCallConnectPort( + _In_ HV_PARTITION_ID ConnectionPartition, + _In_ HV_CONNECTION_ID ConnectionId, + _In_ HV_VTL ConnectionVtl, + _In_ UINT8 ReservedZ0, + _In_ UINT16 ReservedZ1, + _In_ HV_PARTITION_ID PortPartition, + _In_ HV_PORT_ID PortId, + _In_ UINT32 ReservedZ2, + _In_ HV_CONNECTION_INFO ConnectionInfo, + _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo + ); + ``` + +## Call Code + +`0x0096` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `ConnectionPartition` | 0 | 8 | Specifies the ID of the partition that will own the connection. | +| `ConnectionId` | 8 | 4 | Specifies the connection identifier for this communication channel. | +| `ConnectionVtl` | 12 | 1 | Specifies the VTL for the connection. | +| ReservedZ0 | 13 | 1 | | +| ReservedZ1 | 14 | 2 | | +| `PortPartition` | 16 | 8 | Specifies the ID of the partition that owns the port. | +| `PortId` | 24 | 4 | Specifies the port identifier to connect to. | +| ReservedZ2 | 28 | 4 | | +| `ConnectionInfo` | 32 | 32 | Specifies connection type-specific information including port type and connection parameters. | +| `ProximityDomainInfo` | 64 | 8 | Specifies NUMA proximity domain preferences for memory allocation. | + +## See also + +[HV_CONNECTION_ID](../datatypes/hv_connection_id.md) +[HV_PORT_ID](../datatypes/hv_port_id.md) +[HV_CONNECTION_INFO](../datatypes/hv_connection_info.md) +[HV_PROXIMITY_DOMAIN_INFO](../datatypes/hv_proximity_domain_info.md) + [HvCallDisconnectPort](HvCallDisconnectPort.md) + [HvCallCreatePort](HvCallCreatePort.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreatePartition.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreatePartition.md new file mode 100644 index 000000000..f08cb6823 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreatePartition.md @@ -0,0 +1,66 @@ +--- +title: HvCallCreatePartition +description: HvCallCreatePartition hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallCreatePartition + +HvCallCreatePartition creates a new child partition. + +## Interface + +```c +HV_STATUS +HvCallCreatePartition( + _In_ UINT64 Flags, + _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, + _In_ HV_COMPATIBILITY_VERSION CompatibilityVersion, + _In_ HV_PARTITION_CREATION_PROPERTIES Properties, + _In_ UINT64 ReservedZ0, + _Out_ HV_PARTITION_ID* NewPartitionId +); +``` + +## Call Code + +`0x0040` (Simple) + +### AMD64 Layout (total size 56 bytes) +| Name | Offset | Size | Information Provided | +|--------------------------------------------|--------|------|----------------------| +| Flags | 0 | 8 | Partition creation flags bitmask. | +| ProximityDomainInfo | 8 | 8 | Initial NUMA locality hint. | +| CompatibilityVersion | 16 | 4 | Requested compatibility version. | +| Padding (should be zero) | 20 | 4 | Alignment to 8-byte boundary. | +| Properties.DisabledProcessorFeatures | 24 | 16 | Banked processor feature disable mask(s). | +| Properties.DisabledProcessorXsaveFeatures | 40 | 8 | XSAVE state component disable mask. | +| ReservedZ0 | 48 | 8 | Must be 0. | + +### ARM64 Layout (total size 48 bytes) +| Name | Offset | Size | Information Provided | +|---------------------------------------|--------|------|----------------------| +| Flags | 0 | 8 | Partition creation flags bitmask. | +| ProximityDomainInfo | 8 | 8 | Initial NUMA locality hint. | +| CompatibilityVersion | 16 | 4 | Requested compatibility version. | +| Padding (should be zero) | 20 | 4 | Alignment to 8-byte boundary. | +| Properties.DisabledProcessorFeatures | 24 | 16 | Banked processor feature disable mask(s). | +| ReservedZ0 | 40 | 8 | Must be 0. | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|----------------|--------|------|----------------------| +| NewPartitionId | 0 | 8 | Assigned partition identifier. | + +## See Also + +- [HV_PARTITION_CREATION_PROPERTIES](../datatypes/hv_partition_creation_properties.md) +- [HV_PARTITION_CREATION_FLAGS](../datatypes/hv_partition_creation_flags.md) +- [HvCallInitializePartition](HvCallInitializePartition.md) +- [HvCallFinalizePartition](HvCallFinalizePartition.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreatePort.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreatePort.md new file mode 100644 index 000000000..2686af4d6 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreatePort.md @@ -0,0 +1,56 @@ +--- +title: HvCallCreatePort +description: HvCallCreatePort hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallCreatePort + +HvCallCreatePort creates a new communication port within a partition. + +## Interface + + ```c +HV_STATUS +HvCallCreatePort( + _In_ HV_PARTITION_ID PortPartition, + _In_ HV_PORT_ID PortId, + _In_ HV_VTL PortVtl, + _In_ HV_VTL MinConnectionVtl, + _In_ UINT16 ReservedZ0, + _In_ HV_PARTITION_ID ConnectionPartition, + _In_ HV_PORT_INFO PortInfo, + _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo + ); + ``` + +## Call Code + +`0x0095` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `PortPartition` | 0 | 8 | ID of the partition where the port will be created. | +| `PortId` | 8 | 4 | Unique identifier for the new port. | +| `PortVtl` | 12 | 1 | VTL at which the port exists. | +| `MinConnectionVtl` | 13 | 1 | Minimum VTL required for connections. | +| `ReservedZ0` | 14 | 2 | Reserved. Must be zero. | +| `ConnectionPartition` | 16 | 8 | Partition automatically connected on creation (if any). Set to zero if unused. | +| `PortInfo` | 24 | 24 | Type-specific port configuration (see `HV_PORT_INFO`). Reserved subfields must be zero. | +| `ProximityDomainInfo` | 48 | 8 | NUMA proximity domain preferences. | + +## See also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_PORT_ID](../datatypes/hv_port_id.md) +* [HV_PORT_INFO](../datatypes/hv_port_info.md) +* [HV_PROXIMITY_DOMAIN_INFO](../datatypes/hv_proximity_domain_info.md) +* [HvCallDeletePort](HvCallDeletePort.md) +* [HvCallConnectPort](HvCallConnectPort.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreateVp.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreateVp.md new file mode 100644 index 000000000..ca6da2bdd --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallCreateVp.md @@ -0,0 +1,53 @@ +--- +title: HvCallCreateVp +description: HvCallCreateVp hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallCreateVp + +HvCallCreateVp creates a new virtual processor within a partition. Virtual processors are the execution contexts that run guest code within a partition, and each partition must have at least one virtual processor to execute code. + +## Interface + + ```c +HV_STATUS +HvCallCreateVp( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ UINT8 ReservedZ0[3], + _In_ UINT8 SubnodeType, + _In_ UINT64 SubnodeId, + _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, + _In_ UINT64 Flags + ); + ``` + +## Call Code + +`0x004e` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---------------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition identifier. | +| VpIndex | 8 | 4 | New VP index (0-based, unique within partition). | +| ReservedZ0 | 12 | 3 | Must be zero. | +| SubnodeType | 15 | 1 | Subnode type (0 if not used). | +| SubnodeId | 16 | 8 | Subnode identifier (0 if not used). | +| ProximityDomainInfo | 24 | 8 | NUMA / locality hint. | +| Flags | 32 | 8 | Reserved – must be zero. | + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HV_VP_INDEX](../datatypes/hv_vp_index.md) +- [HV_PROXIMITY_DOMAIN_INFO](../datatypes/hv_proximity_domain_info.md) +- [HvCallDeleteVp](HvCallDeleteVp.md) +- [HvCallStartVirtualProcessor](HvCallStartVirtualProcessor.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeletePartition.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeletePartition.md new file mode 100644 index 000000000..c6b75fbc5 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeletePartition.md @@ -0,0 +1,38 @@ +--- +title: HvCallDeletePartition +description: HvCallDeletePartition hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallDeletePartition + +HvCallDeletePartition removes a child partition from the hypervisor. + +## Interface + + ```c +HV_STATUS +HvCallDeletePartition( + _In_ HV_PARTITION_ID PartitionId + ); + ``` + +## Call Code + +`0x0043` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Child partition identifier to delete (must not be `HV_PARTITION_ID_SELF`). | + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HvCallCreatePartition](HvCallCreatePartition.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeletePort.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeletePort.md new file mode 100644 index 000000000..f1067b257 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeletePort.md @@ -0,0 +1,44 @@ +--- +title: HvCallDeletePort +description: HvCallDeletePort hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallDeletePort + +HvCallDeletePort removes a communication port from a partition. + +## Interface + + ```c +HV_STATUS +HvCallDeletePort( + _In_ HV_PARTITION_ID PortPartition, + _In_ HV_PORT_ID PortId, + _In_ UINT32 Reserved + ); + ``` + +## Call Code + +`0x0058` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `PortPartition` | 0 | 8 | ID of the partition that owns the port. | +| `PortId` | 8 | 4 | Unique identifier of the port to be deleted. | +| `Reserved` | 12 | 4 | Reserved. Must be zero. | + +## See also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_PORT_ID](../datatypes/hv_port_id.md) +* [HvCallCreatePort](HvCallCreatePort.md) +* [HvCallDisconnectPort](HvCallDisconnectPort.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeleteVp.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeleteVp.md new file mode 100644 index 000000000..31ec6907a --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDeleteVp.md @@ -0,0 +1,41 @@ +--- +title: HvCallDeleteVp +description: HvCallDeleteVp hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallDeleteVp + +HvCallDeleteVp removes a virtual processor from a partition. + +## Interface + + ```c +HV_STATUS +HvCallDeleteVp( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex + ); + ``` + +## Call Code + +`0x004f` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Partition containing the VP. | +| VpIndex | 8 | 4 | Index of VP to delete. | + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HV_VP_INDEX](../datatypes/hv_vp_index.md) +- [HvCallCreateVp](HvCallCreateVp.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDepositMemory.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDepositMemory.md new file mode 100644 index 000000000..b1ab028bc --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDepositMemory.md @@ -0,0 +1,50 @@ +--- +title: HvCallDepositMemory +description: HvCallDepositMemory hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallDepositMemory + +HvCallDepositMemory adds physical memory pages to a partition's memory pool. This hypercall allows a parent partition to provide additional memory resources to the hypervisor, expanding its available memory for allocation on behalf of the partition. + +## Usage Notes + +- This is a REP hypercall: the `RepCount` specifies number of page elements in `GpaPageList`; `ElementsProcessed` (implicit output) indicates progress for retries. + +## Interface + + ```c +HV_STATUS +HvCallDepositMemory( + _In_ HV_PARTITION_ID PartitionId, + _In_ const HV_GPA_PAGE_NUMBER GpaPageList[] // Reads RepCount elements + ); + ``` + +## Call Code + +`0x0048` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition identifier. | +| GpaPageList | 8 | Var | Array of page numbers; element count = `RepCount`. | + +### Element List + +Each element of `GpaPageList` is one `HV_GPA_PAGE_NUMBER` (8 bytes). The hypercall control's `RepCount` specifies how many elements to consume. The hypervisor deposits pages in order until all are processed or a failure/limit condition is encountered. `ElementsProcessed` (from the hypercall result control) reports how many entries from the caller's array were successfully deposited. + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HV_GPA_PAGE_NUMBER](../datatypes/hv_gpa_page_number.md) +- [HvCallWithdrawMemory](HvCallWithdrawMemory.md) +- [HvCallGetMemoryBalance](HvCallGetMemoryBalance.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDisconnectPort.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDisconnectPort.md new file mode 100644 index 000000000..e69ea7ec6 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallDisconnectPort.md @@ -0,0 +1,42 @@ +--- +title: HvCallDisconnectPort +description: HvCallDisconnectPort hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallDisconnectPort + +HvCallDisconnectPort terminates an active connection between two communication ports. + +## Interface + + ```c +HV_STATUS +HvCallDisconnectPort( + _In_ HV_PARTITION_ID ConnectionPartition, + _In_ HV_CONNECTION_ID ConnectionId + ); + ``` + +## Call Code + +`0x005b` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `ConnectionPartition` | 0 | 8 | Specifies the ID of the partition that owns the port. | +| `ConnectionId` | 8 | 4 | Specifies the unique identifier of the port to disconnect. | + +## See also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_CONNECTION_ID](../datatypes/hv_connection_id.md) +* [HvCallConnectPort](HvCallConnectPort.md) +* [HvCallDeletePort](HvCallDeletePort.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnablePartitionVtl.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnablePartitionVtl.md index 564bcd56a..4b17e2e57 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnablePartitionVtl.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnablePartitionVtl.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallEnablePartitionVtl @@ -15,6 +16,7 @@ The HvCallEnablePartitionVtl hypercall enables a virtual trust level for a speci ## Interface ```c + typedef union { UINT8 AsUINT8; diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnableVpVtl.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnableVpVtl.md index 632487d04..06cf66b97 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnableVpVtl.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallEnableVpVtl.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallEnableVpVtl @@ -15,8 +16,9 @@ HvCallEnableVpVtl enables a VTL to run on a VP. This hypercall should be used in ## Interface ```c + HV_STATUS -HvEnableVpVtl( +HvCallEnableVpVtl( _In_ HV_PARTITION_ID TargetPartitionId, _In_ HV_VP_INDEX VpIndex, _In_ HV_VTL TargetVtl, @@ -46,4 +48,7 @@ This hypercall will fail if called to enable a VTL that is already enabled for a ## See also -[HV_INITIAL_VP_CONTEXT](../datatypes/HV_INITIAL_VP_CONTEXT.md) \ No newline at end of file +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_VP_INDEX](../datatypes/hv_vp_index.md) +* [HV_VTL](../datatypes/hv_vtl.md) +* [HV_INITIAL_VP_CONTEXT](../datatypes/HV_INITIAL_VP_CONTEXT.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFinalizePartition.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFinalizePartition.md new file mode 100644 index 000000000..4858b4438 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFinalizePartition.md @@ -0,0 +1,39 @@ +--- +title: HvCallFinalizePartition +description: HvCallFinalizePartition hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallFinalizePartition + +HvCallFinalizePartition prepares the partition for deletion, deleting any remaining VPs, ports and connections. After the finalize step, no additional activit for the partition is permitted other than deletion (including deposits). + +## Interface + +```c +HV_STATUS +HvCallFinalizePartition( + _In_ HV_PARTITION_ID PartitionId +); +``` + +## Call Code + +`0x0042` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Identifier of the partition to finalize. | + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HvCallCreatePartition](HvCallCreatePartition.md) +- [HvCallInitializePartition](HvCallInitializePartition.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressList.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressList.md index fb7bfc062..57b3a10a1 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressList.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressList.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallFlushGuestPhysicalAddressList @@ -19,7 +20,7 @@ HV_STATUS HvCallFlushGuestPhysicalAddressList( _In_ HV_SPA AddressSpace, _In_ UINT64 Flags, - _In_reads_(RangeCount) PHV_GPA_PAGE_RANGE GpaRangeList + _In_ HV_GPA_PAGE_RANGE* GpaRangeList // Reads RepCount elements ); ``` diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressSpace.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressSpace.md index 800bc43b6..95b21d545 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressSpace.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushGuestPhysicalAddressSpace.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallFlushGuestPhysicalAddressSpace diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressList.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressList.md index 9cfb8e16e..ff5d4176c 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressList.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressList.md @@ -1,14 +1,15 @@ --- -title: HvFlushVirtualAddressList -description: HvFlushVirtualAddressList hypercall +title: HvCallFlushVirtualAddressList +description: HvCallFlushVirtualAddressList hypercall keywords: hyper-v author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- -# HvFlushVirtualAddressList +# HvCallFlushVirtualAddressList The HvCallFlushVirtualAddressList hypercall invalidates portions of the virtual TLB that belong to a specified address space. @@ -20,8 +21,8 @@ HvCallFlushVirtualAddressList( _In_ HV_ADDRESS_SPACE_ID AddressSpace, _In_ HV_FLUSH_FLAGS Flags, _In_ UINT64 ProcessorMask, - _Inout_ PUINT32 GvaCount, - _In_reads_(GvaCount) PCHV_GVA GvaRangeList + _Inout_ UINT32* GvaCount, + _In_reads_(*GvaCount) const HV_GVA* GvaRangeList ); ``` diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressListEx.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressListEx.md index aa3a92cd2..cb00ca9ca 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressListEx.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressListEx.md @@ -1,16 +1,17 @@ --- -title: HvFlushVirtualAddressListEx -description: HvFlushVirtualAddressListEx hypercall +title: HvCallFlushVirtualAddressListEx +description: HvCallFlushVirtualAddressListEx hypercall keywords: hyper-v author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- -# HvFlushVirtualAddressListEx +# HvCallFlushVirtualAddressListEx -The HvFlushVirtualAddressListEx hypercall is similar to [HvCallFlushVirtualAddressList](HvCallFlushVirtualAddressList.md), but can take a variably-sized sparse VP set as an input. +The HvCallFlushVirtualAddressListEx hypercall is similar to [HvCallFlushVirtualAddressList](HvCallFlushVirtualAddressList.md), but can take a variably-sized sparse VP set as an input. The following checks should be used to infer the availability of this hypercall: - ExProcessorMasks must be indicated via CPUID leaf 0x40000004. @@ -23,8 +24,8 @@ HvCallFlushVirtualAddressListEx( _In_ HV_ADDRESS_SPACE_ID AddressSpace, _In_ HV_FLUSH_FLAGS Flags, _In_ HV_VP_SET ProcessorSet, - _Inout_ PUINT32 GvaCount, - _In_reads_(GvaCount) PCHV_GVA GvaRangeList + _Inout_ UINT32* GvaCount, + _In_reads_(*GvaCount) const HV_GVA* GvaRangeList ); ``` @@ -47,4 +48,4 @@ HvCallFlushVirtualAddressListEx( ## See also -[HV_VP_SET](../datatypes/HV_VP_SET.md) +[HV_VP_SET](../datatypes/hv_vp_set.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpace.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpace.md index aadaf449f..343e01ba6 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpace.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpace.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallFlushVirtualAddressSpace diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpaceEx.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpaceEx.md index c7c06b317..65e3702d3 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpaceEx.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallFlushVirtualAddressSpaceEx.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallFlushVirtualAddressSpaceEx diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetMemoryBalance.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetMemoryBalance.md new file mode 100644 index 000000000..1ed2fc51c --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetMemoryBalance.md @@ -0,0 +1,51 @@ +--- +title: HvCallGetMemoryBalance +description: HvCallGetMemoryBalance hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallGetMemoryBalance + +HvCallGetMemoryBalance retrieves the current memory allocation information for a partition. This hypercall provides details about the partition's memory usage in the hypervisor. + +## Interface + +```c +HV_STATUS +HvCallGetMemoryBalance( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, + _Out_ UINT64* PagesAvailable; + _Out_ UINT64* PagesInUse; +); +``` + +## Call Code + +`0x004A` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---------------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition identifier. | +| ProximityDomainInfo | 8 | 8 | NUMA domain hint; supply zeroed structure if domain not used. | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|---------------|--------|------|----------------------| +| PagesAvailable | 0 | 8 | Number of pages available for allocation | +| PagesInUse | 0 | 8 | Number of pages in use by the hypervisor | + +## See also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_PROXIMITY_DOMAIN_INFO](../datatypes/hv_proximity_domain_info.md) +* [HvCallDepositMemory](HvCallDepositMemory.md) +* [HvCallWithdrawMemory](HvCallWithdrawMemory.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetNextChildPartition.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetNextChildPartition.md new file mode 100644 index 000000000..5877f1ff7 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetNextChildPartition.md @@ -0,0 +1,54 @@ +--- +title: HvCallGetNextChildPartition +description: HvCallGetNextChildPartition hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallGetNextChildPartition + +HvCallGetNextChildPartition enumerates child partitions of the calling partition. This hypercall allows a parent partition to discover and iterate through all of its child partitions. + +## Interface + + ```c +HV_STATUS +HvCallGetNextChildPartition( + _In_ HV_PARTITION_ID ParentPartitionId, + _In_ HV_PARTITION_ID PreviousChildPartitionId, + _Out_ HV_PARTITION_ID* NextChildPartitionId +); + ``` + +## Call Code + +`0x0047` (Simple) + +## Notes + +- Specify `HV_PARTITION_ID_INVALID` for `PreviousChildPartitionId` to start the enumeration. +- Set `PreviousChildPartitionId` = `NextChildPartitionId` to get the next partition. +- The hypercall returns `HV_PARTITION_ID_INVALID` when there are no more partitions to enumerate. + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|------|--------|------|----------------------| +| ParentPartitionId | 0 | 8 | Parent (or SELF) | +| PreviousChildPartitionId | 8 | 8 | Last returned child or HV_PARTITION_ID_INVALID | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|------|--------|------|----------------------| +| NextChildPartitionId | 0 | 8 | Next child or HV_PARTITION_ID_INVALID if end | + +## See also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HvCallCreatePartition](HvCallCreatePartition.md) +* [HvCallDeletePartition](HvCallDeletePartition.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetPartitionProperty.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetPartitionProperty.md new file mode 100644 index 000000000..c88ca5f37 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetPartitionProperty.md @@ -0,0 +1,50 @@ +--- +title: HvCallGetPartitionProperty +description: HvCallGetPartitionProperty hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallGetPartitionProperty + +HvCallGetPartitionProperty retrieves the value of a specific property for a partition. + +## Interface + +```c +HV_STATUS +HvCallGetPartitionProperty( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_PARTITION_PROPERTY_CODE PropertyCode, + _Out_ UINT64* PropertyValue +); +``` + +## Call Code + +`0x0044` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `PartitionId` | 0 | 8 | Specifies the ID of the partition whose property is being queried. | +| `PropertyCode` | 8 | 4 | Specifies which partition property to retrieve. | +| RsvdZ | 12 | 4 | | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|---------------|--------|------|----------------------| +| PropertyValue | 0 | 8 | Returned property value | + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HV_PARTITION_PROPERTY_CODE](../datatypes/hv_partition_property_code.md) +- [HvCallSetPartitionProperty](HvCallSetPartitionProperty.md) +- [HvCallSetPartitionPropertyEx](HvCallSetPartitionPropertyEx.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpCpuidValues.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpCpuidValues.md new file mode 100644 index 000000000..3ef31474f --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpCpuidValues.md @@ -0,0 +1,60 @@ +--- +title: HvCallGetVpCpuidValues +description: HvCallGetVpCpuidValues hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallGetVpCpuidValues + +HvCallGetVpCpuidValues retrieves the CPUID values that are exposed to a specific virtual processor. This hypercall allows querying the virtualized CPUID information that the hypervisor presents to the guest, which may differ from the physical processor's CPUID values due to virtualization features and compatibility requirements. + +## Interface + +```c +HV_STATUS +HvCallGetVpCpuidValues( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_GET_VP_CPUID_VALUES_FLAGS Flags, + _In_ UINT32 ReservedZ, + _In_ const HV_CPUID_LEAF_INFO* CpuidLeafInfo, // Reads RepCount elements + _Out_ HV_CPUID_RESULT* CpuidResult // Writes RepCount elements +); +``` + +## Call Code + +`0x00F4` (Rep) + +## Restrictions + +Architecture: x64 only. + + +## Input Parameters (per repetition element) + +| Name | Offset | Size | Information Provided | +|---------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition | +| VpIndex | 8 | 4 | VP index | +| Flags | 12 | 4 | Flags | +| ReservedZ | 16 | 4 | Reserved (Must be zero) | +| CpuidLeafInfo | 24 | 8 | Leaf/Subleaf descriptor | + +## Output Parameters (per repetition element) + +| Name | Offset | Size | Information Provided | +|-------------|--------|------|----------------------| +| CpuidResult | 0 | 16 | EAX/EBX/ECX/EDX synthesized result | + +## See Also + +- [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +- [HV_VP_INDEX](../datatypes/hv_vp_index.md) +- [HV_GET_VP_CPUID_VALUES_FLAGS](../datatypes/hv_get_vp_cpuid_values_flags.md) +- [HV_CPUID_RESULT](../datatypes/hv_cpuid_result.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpIndexFromApicId.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpIndexFromApicId.md index 720b8ca14..7d83f994e 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpIndexFromApicId.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpIndexFromApicId.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallGetVpIndexFromApicId @@ -19,9 +20,9 @@ HV_STATUS HvCallGetVpIndexFromApicId( _In_ HV_PARTITION_ID PartitionId, _In_ HV_VTL TargetVtl, - _Inout_ PUINT32 ApicIdCoount, - _In_reads_(ApicIdCount) PHV_APIC_ID ApicIdList, - _Out_writes(ApicIdCount) PHV_VP_INDEX VpIndexList + _Inout_ UINT32* ApicIdCoount, + _In_reads_(ApicIdCount) HV_APIC_ID* ApicIdList, + _Out_writes(ApicIdCount) HV_VP_INDEX* VpIndexList ); ``` diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpRegisters.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpRegisters.md index f2800d566..57951a4ab 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpRegisters.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpRegisters.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallGetVpRegisters @@ -20,9 +21,9 @@ HvCallGetVpRegisters( _In_ HV_PARTITION_ID PartitionId, _In_ HV_VP_INDEX VpIndex, _In_ HV_INPUT_VTL InputVtl, - _Inout_ PUINT32 RegisterCount, - _In_reads(RegisterCount) PCHV_REGISTER_NAME RegisterNameList, - _In_writes(RegisterCount) PHV_REGISTER_VALUE RegisterValueList + _Inout_ UINT32* RegisterCount, + _In_reads_(*RegisterCount) const HV_REGISTER_NAME* RegisterNameList, + _Out_writes_(*RegisterCount) HV_REGISTER_VALUE* RegisterValueList ); ``` @@ -57,8 +58,36 @@ The state is returned as a series of register values, each corresponding to a re |-------------------------|------------|----------|-------------------------------------------| | `RegisterValue` | 0 | 16 | Returns the value of the specified register. | +## Early Register List (ARM64) + +On ARM64, certain registers can be read using this hypercall before the Guest OS ID register (`HvRegisterGuestOsId`) is set to a non-zero value. This allows early access to hypervisor information and critical system registers during the boot process. + +The following registers are permitted to be read before Guest OS identification: + +| Register Name | Description | +|---------------|-------------| +| `HvRegisterGuestOsId` | Guest operating system identification register | +| `HvRegisterHypervisorVersion` | Hypervisor version information | +| `HvRegisterPrivilegesAndFeaturesInfo` | Partition privileges and feature information | +| `HvRegisterFeaturesInfo` | Hypervisor feature information | +| `HvRegisterImplementationLimitsInfo` | Implementation-specific limits | +| `HvRegisterHardwareFeaturesInfo` | Hardware feature information | +| `HvRegisterTimeRefCount` | Time reference counter | +| `HvArm64RegisterSyntheticVbarEl1` | Synthetic Vector Base Address Register for EL1 | +| `HvArm64RegisterSyntheticEsrEl1` | Synthetic Exception Syndrome Register for EL1 | +| `HvRegisterGuestCrashCtl` | Guest crash control register | +| `HvRegisterGuestCrashP0` | Guest crash parameter 0 | +| `HvRegisterGuestCrashP1` | Guest crash parameter 1 | +| `HvRegisterGuestCrashP2` | Guest crash parameter 2 | +| `HvRegisterGuestCrashP3` | Guest crash parameter 3 | +| `HvRegisterGuestCrashP4` | Guest crash parameter 4 | + +All other registers require the Guest OS ID to be established (non-zero) before they can be read through this hypercall. + +**Note:** These early-accessible registers primarily provide hypervisor capability information and crash reporting functionality, enabling guests to discover hypervisor features and establish basic functionality before full Guest OS identification. + ## See also -[HV_REGISTER_NAME](../datatypes/HV_REGISTER_NAME.md) +[HV_REGISTER_NAME](../datatypes/hv_register_name.md) -[HV_REGISTER_VALUE](../datatypes/HV_REGISTER_VALUE.md) +[HV_REGISTER_VALUE](../datatypes/hv_register_value.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpSetFromMda.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpSetFromMda.md new file mode 100644 index 000000000..5310f1022 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallGetVpSetFromMda.md @@ -0,0 +1,59 @@ +--- +title: HvCallGetVpSetFromMda +description: HvCallGetVpSetFromMda hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallGetVpSetFromMda + +HvCallGetVpSetFromMda converts a Memory Descriptor Array (MDA) into a virtual processor set. This hypercall translates memory-based virtual processor specifications into the standard VP set format used by other hypervisor operations. + +## Interface + +```c +HV_STATUS +HvCallGetVpSetFromMda( + _In_ HV_PARTITION_ID TargetPartition, + _In_ UINT64 DestinationAddress, + _In_ HV_VTL TargetVtl, + _In_ BOOLEAN LogicalDestinationMode, + _In_ UINT16 ReservedZ0, + _In_ UINT32 ReservedZ1, + _Out_ HV_VP_SET* TargetVpSet +); +``` + +## Call Code + +`0x00E5` (Simple) + +## Restrictions + +Architecture: x64 only (not available on arm64). + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|----------------------|--------|------|----------------------| +| TargetPartition | 0 | 8 | Partition whose MDA is interpreted | +| DestinationAddress | 8 | 8 | APIC / GIC style destination bits | +| TargetVtl | 16 | 1 | Target VTL | +| LogicalDestinationMode | 17 | 1 | Interpret destination logically when set | +| Reserved | 18 | 6 | Must be zero | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------|--------|-------|----------------------| +| TargetVpSet | 0 | 4104 | Result VP set bitmap | + +## See also + +* [`HV_PARTITION_ID`](../datatypes/hv_partition_id.md) +* [`HV_VP_SET`](../datatypes/hv_vp_set.md) +* [`HV_VTL`](../datatypes/hv_vtl.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInitializePartition.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInitializePartition.md new file mode 100644 index 000000000..0bc14fee0 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInitializePartition.md @@ -0,0 +1,43 @@ +--- +title: HvCallInitializePartition +description: HvCallInitializePartition hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallInitializePartition + +HvCallInitializePartition initializes a newly created partition. + +## Usage Notes + +- Invoke after setting all early partition properties. Early-only properties cannot be changed once initialization completes. + +## Interface + +```c +HV_STATUS +HvCallInitializePartition( + _In_ HV_PARTITION_ID PartitionId + ); +``` + +## Call Code + +`0x0041` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Partition identifier to initialize. | + +## See Also + +- [`HV_PARTITION_ID`](../datatypes/hv_partition_id.md) +- [`HvCallCreatePartition`](HvCallCreatePartition.md) +- [`HvCallFinalizePartition`](HvCallFinalizePartition.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInstallIntercept.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInstallIntercept.md new file mode 100644 index 000000000..0896ef817 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInstallIntercept.md @@ -0,0 +1,46 @@ +--- +title: HvCallInstallIntercept +description: HvCallInstallIntercept hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallInstallIntercept + +HvCallInstallIntercept installs an intercept handler for specific virtualization events on a virtual processor. + +## Interface + +```c +HV_STATUS +HvCallInstallIntercept( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_INTERCEPT_ACCESS_TYPE_MASK AccessType, + _In_ HV_INTERCEPT_TYPE InterceptType, + _In_ HV_INTERCEPT_PARAMETERS InterceptParameter + ); +``` + +## Call Code + +`0x004d` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---|---|---|---| +| `PartitionId` | 0 | 8 | Specifies the ID of the partition for which to install the intercept. | +| `AccessType` | 8 | 4 | Specifies the access type mask for the intercept. | +| `InterceptType` | 12 | 4 | Specifies the type of operation to intercept. | +| `InterceptParameter` | 16 | 8 | Specifies additional parameters for the intercept configuration. | + +## See also + +* [`HV_PARTITION_ID`](../datatypes/hv_partition_id.md) +* [`HV_INTERCEPT_TYPE`](../datatypes/hv_intercept_type.md) +* [`HV_INTERCEPT_PARAMETERS`](../datatypes/hv_intercept_parameters.md) +* [`HvCallInstallInterceptEx`](HvCallInstallInterceptEx.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInstallInterceptEx.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInstallInterceptEx.md new file mode 100644 index 000000000..e0fd1306d --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallInstallInterceptEx.md @@ -0,0 +1,52 @@ +--- +title: HvCallInstallInterceptEx +description: HvCallInstallInterceptEx hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallInstallInterceptEx + +HvCallInstallInterceptEx installs an extended intercept handler for specific virtualization events. + +Architecture: ARM64 only. + +## Interface + +```c +HV_STATUS +HvCallInstallInterceptEx( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_INPUT_VTL InterceptingInputVtl, + _In_ HV_INTERCEPT_TYPE InterceptType, + _In_ UINT64 Reserved[4], + _In_ HV_INTERCEPT_PARAMETERS_EX* InterceptParametersEx, // Reads RepCount elements + ); +``` + +## Call Code + +`0x0110` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---|---|---|---| +| `PartitionId` | 0 | 8 | Specifies the ID of the partition containing the virtual processors. | +| `InterceptInputVtl` | 8 | 1 | Specifies the type of operation to intercept. | +| Padding | 9 | 2 | Padding (must be zero) | +| `InterceptType` | 12 | 4 | Specifies the type of operation to intercept. | +| Reserved[4] | 16 | 32 | Reserved (must be zero) | +| `InterceptParametersEx` | 48 | Variable | Specifies extended parameters for the intercept configuration. | + +## See also + +* [`HV_PARTITION_ID`](../datatypes/hv_partition_id.md) +* [`HV_VP_SET`](../datatypes/hv_vp_set.md) +* [`HV_INTERCEPT_TYPE`](../datatypes/hv_intercept_type.md) +* [`HV_INTERCEPT_PARAMETERS_EX`](../datatypes/hv_intercept_parameters_ex.md) +* [`HvCallInstallIntercept`](HvCallInstallIntercept.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapGpaPages.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapGpaPages.md new file mode 100644 index 000000000..8db58f957 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapGpaPages.md @@ -0,0 +1,48 @@ +--- +title: HvCallMapGpaPages +description: HvCallMapGpaPages hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallMapGpaPages + +`HvCallMapGpaPages` maps a list of physical pages owned by the caller to the target child partition's address space. + +## Interface + +```c +HV_STATUS +HvCallMapGpaPages( + _In_ HV_PARTITION_ID TargetPartitionId, + _In_ HV_GPA_PAGE_NUMBER TargetGpaBase, + _In_ HV_MAP_GPA_FLAGS MapFlags, + _In_ const HV_GPA_PAGE_NUMBER SourceGpaPageList[] // Reads RepCount elements +); +``` + +## Call Code + +`0x004B` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------|--------|------|----------------------| +| TargetPartitionId | 0 | 8 | Target partition | +| TargetGpaBase | 8 | 8 | Starting GPA page (increments per repetition) | +| MapFlags | 16 | 8 | Access / caching / semantics flags | +| SourceGpaPageList | 24 | var | Array of source GPA pages (one per repetition) | + +## See Also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_GPA_PAGE_NUMBER](../datatypes/hv_gpa_page_number.md) +* [HV_MAP_GPA_FLAGS](../datatypes/hv_map_gpa_flags.md) +* [HV_STATUS](../datatypes/hv_status.md) +* [HvCallUnmapGpaPages](HvCallUnmapGpaPages.md) +* [HvCallMapSparseGpaPages](HvCallMapSparseGpaPages.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapSparseGpaPages.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapSparseGpaPages.md new file mode 100644 index 000000000..4abf1dd16 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapSparseGpaPages.md @@ -0,0 +1,46 @@ +--- +title: HvCallMapSparseGpaPages +description: HvCallMapSparseGpaPages hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallMapSparseGpaPages + +`HvCallMapSparseGpaPages` maps non-contiguous guest physical pages using an array of mapping descriptors. + +## Interface + +```c +HV_STATUS +HvCallMapSparseGpaPages( + _In_ HV_PARTITION_ID TargetPartitionId, + _In_ HV_MAP_GPA_FLAGS MapFlags, + _In_ const HV_GPA_MAPPING PageList[] // Reads RepCount elements +); +``` + +## Call Code + +`0x006E` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------|--------|------|----------------------| +| TargetPartitionId | 0 | 8 | Target partition | +| MapFlags | 8 | 8 | Shared attributes applied to each mapping unless per-entry overrides exist (implementation-defined) | +| PageList | 16 | var | Array of mapping tuples. | + +## See Also + +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) +* [HV_MAP_GPA_FLAGS](../datatypes/hv_map_gpa_flags.md) +* [HV_GPA_MAPPING](../datatypes/hv_gpa_mapping.md) +* [HV_STATUS](../datatypes/hv_status.md) +* [HvCallMapGpaPages](HvCallMapGpaPages.md) +* [HvCallUnmapGpaPages](HvCallUnmapGpaPages.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapStatsPage2.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapStatsPage2.md new file mode 100644 index 000000000..c479434fb --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapStatsPage2.md @@ -0,0 +1,47 @@ +--- +title: HvCallMapStatsPage2 +description: HvCallMapStatsPage2 hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallMapStatsPage2 + +`HvCallMapStatsPage2` maps an statistics page for a specified object, providing access to detailed performance and operational metrics. This hypercall establishes a shared page between the hypervisor and the partition for collecting extended statistical information. + +## Interface + +```c +HV_STATUS +HvCallMapStatsPage2( + _In_ HV_STATS_OBJECT_TYPE StatsType, + _In_ UINT32 Reserved, + _In_ HV_STATS_OBJECT_IDENTITY ObjectIdentity, + _In_ HV_GPA_PAGE_NUMBER MapLocation +); +``` + +## Call Code + +`0x0131` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|----------------|--------|------|----------------------| +| StatsType | 0 | 4 | Object category | +| Reserved | 4 | 4 | Must be zero | +| ObjectIdentity | 8 | 16 | Object identity (partition id, VP index, etc) | +| MapLocation | 24 | 8 | Target GPA page | + +## See also + +* [HV_STATS_OBJECT_TYPE](../datatypes/hv_stats_object_type.md) +* [HV_STATS_OBJECT_IDENTITY](../datatypes/hv_stats_object_identity.md) +* [HV_GPA_PAGE_NUMBER](../datatypes/hv_gpa_page_number.md) +* [HV_STATUS](../datatypes/hv_status.md) +* [HvCallUnmapStatsPage](HvCallUnmapStatsPage.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapVpStatePage.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapVpStatePage.md new file mode 100644 index 000000000..a12104c36 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallMapVpStatePage.md @@ -0,0 +1,69 @@ +--- +title: HvCallMapVpStatePage +description: HvCallMapVpStatePage hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallMapVpStatePage + +The HvCallMapVpStatePage hypercall maps a virtual processor state page into the guest physical address space of a partition. It allows access to virtual processor state information such as registers and other VP-specific data. + +## Interface + + ```c +HV_STATUS +HvCallMapVpStatePage( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ UINT16 Type, + _In_ HV_INPUT_VTL InputVtl, + _In_ UINT8 Flags, + _In_ HV_GPA_PAGE_NUMBER RequestedMapLocation, + _Out_ HV_GPA_PAGE_NUMBER* MapLocation +); + ``` + +## Call Code + +`0x00E1` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---------------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition | +| VpIndex | 8 | 4 | Virtual processor index | +| Type | 12 | 2 | State page type ([HV_VP_STATE_PAGE_TYPE](../datatypes/hv_vp_state_page_type.md)) | +| InputVtl | 14 | 1 | VTL context | +| Flags | 15 | 1 | Control flags. | +| RequestedMapLocation| 16 | 8 | Desired GPA page | + +## Control Flags + +| Name | Value | Notes | +|------|-------|-------| +| MapLocationProvided | 1 | RequestedMapLocation is valid. + +## Remarks + +- Layered Virtualization Hosts must specify the `MapLocationProvided` flag and set the `RequestedMapLocation` value. + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| MapLocation | 0 | 8 | GPA page number where state page is mapped| + +## See also + +[HV_PARTITION_ID](../datatypes/hv_partition_id.md) +[HV_VP_INDEX](../datatypes/hv_vp_index.md) +[HV_INPUT_VTL](../datatypes/hv_input_vtl.md) +[HV_VP_STATE_PAGE_TYPE](../datatypes/hv_vp_state_page_type.md) +[HV_GPA_PAGE_NUMBER](../datatypes/hv_gpa_page_number.md) +[HvCallUnmapVpStatePage](HvCallUnmapVpStatePage.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifySparseGpaPages.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifySparseGpaPages.md new file mode 100644 index 000000000..2808a5941 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifySparseGpaPages.md @@ -0,0 +1,50 @@ +--- +title: HvCallModifySparseGpaPages +description: HvCallModifySparseGpaPages hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallModifySparseGpaPages + +The HvCallModifySparseGpaPages hypercall updates access / caching attributes for already-mapped (sparse) GPA pages. + +## Interface + +```c +HV_STATUS +HvCallModifySparseGpaPages( + _In_ HV_PARTITION_ID TargetPartitionId, + _In_ HV_MAP_GPA_FLAGS MapFlags, + _In_ UINT32 Rsvdz, + _In_ const HV_GPA_PAGE_NUMBER GpaPageList[] // Reads RepCount elements +); +``` + +## Call Code + +`0x0090` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------|--------|------|----------------------| +| TargetPartitionId | 0 | 8 | Target partition | +| MapFlags | 8 | 4 | New attribute flags (subset mutable) | +| Rsvdz | 12 | 4 | Must be zero | + +## Input List Element + +| Name | Offset | Size | Information Provided | +|---------------|--------|------|----------------------| +| GpaPageNumber | 0 | 8 | GPA page to re-attribute | + +## See also + +[HV_PARTITION_ID](../datatypes/hv_partition_id.md) +[HV_MAP_GPA_FLAGS](../datatypes/hv_map_gpa_flags.md) +[HV_GPA_PAGE_NUMBER](../datatypes/hv_gpa_page_number.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifyVtlProtectionMask.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifyVtlProtectionMask.md index d320c4ccc..b813e7477 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifyVtlProtectionMask.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallModifyVtlProtectionMask.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallModifyVtlProtectionMask diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallNotifyLongSpinWait.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallNotifyLongSpinWait.md index f368b58f7..6c2229a14 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallNotifyLongSpinWait.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallNotifyLongSpinWait.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallNotifyLongSpinWait @@ -16,7 +17,7 @@ The HvCallNotifyLongSpinWait hypercall is used by a guest OS to notify the hyper ```c HV_STATUS -HvNotifyLongSpinWait( +HvCallNotifyLongSpinWait( _In_ UINT64 SpinCount ); ``` diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessage.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessage.md index b541a9334..04d2fbe78 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessage.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessage.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallPostMessage diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessageDirect.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessageDirect.md new file mode 100644 index 000000000..9138da2fb --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallPostMessageDirect.md @@ -0,0 +1,50 @@ +--- +title: HvCallPostMessageDirect +description: HvCallPostMessageDirect hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallPostMessageDirect + +The HvCallPostMessageDirect hypercall posts a message directly to a target virtual processor's message queue without going through the traditional message port mechanism. + +## Interface + + ```c +HV_STATUS +HvCallPostMessageDirect( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_VTL Vtl, + _In_ HV_SYNIC_SINT_INDEX SintIndex, + _In_reads_bytes_(HV_MESSAGE_SIZE) UINT8* Message +); + ``` + +## Call Code + +`0x00C1` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| PartitionId | 0 | 8 | Partition ID of the target partition | +| VpIndex | 8 | 4 | Target virtual processor index | +| Vtl | 12 | 1 | Virtual Trust Level | +| SintIndex | 13 | 1 | Synthetic interrupt index | +| Message | 16 | 240 | Message data to post (HV_MESSAGE_SIZE) | + +## See also + +[HV_PARTITION_ID](../datatypes/hv_partition_id.md) +[HV_VP_INDEX](../datatypes/hv_vp_index.md) +[HV_VTL](../datatypes/hv_vtl.md) +[HV_SYNIC_SINT_INDEX](../datatypes/hv_synic_sint_index.md) +[HV_MESSAGE](../datatypes/hv_message.md) +[HvCallSignalEventDirect](HvCallSignalEventDirect.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRegisterInterceptResult.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRegisterInterceptResult.md new file mode 100644 index 000000000..d27467502 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRegisterInterceptResult.md @@ -0,0 +1,50 @@ +--- +title: HvCallRegisterInterceptResult +description: HvCallRegisterInterceptResult hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallRegisterInterceptResult + +The HvCallRegisterInterceptResult hypercall registers the result of handling an intercept, providing the hypervisor with information on how the intercept was processed. + +## Interface + + ```c +HV_STATUS +HvCallRegisterInterceptResult( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_INTERCEPT_TYPE InterceptType, + _In_ HV_REGISTER_INTERCEPT_RESULT_PARAMETERS Parameters +); + ``` + +## Call Code + +`0x0091` (Simple) + +## Restrictions + +- Architecture: x64 only. + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| PartitionId | 0 | 8 | Partition ID where intercept occurred | +| VpIndex | 8 | 4 | Virtual processor index | +| InterceptType | 12 | 4 | Type of intercept that was handled | +| Parameters | 16 | Variable | Parameters specific to the intercept type| + +## See also + +[HV_PARTITION_ID](../datatypes/hv_partition_id.md) +[HV_VP_INDEX](../datatypes/hv_vp_index.md) +[HV_INTERCEPT_TYPE](../datatypes/hv_intercept_type.md) +[HV_REGISTER_INTERCEPT_RESULT_PARAMETERS](../datatypes/hv_register_intercept_result_parameters.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRetargetDeviceInterrupt.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRetargetDeviceInterrupt.md index 0d6982848..d13102a5d 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRetargetDeviceInterrupt.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallRetargetDeviceInterrupt.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallRetargetDeviceInterrupt @@ -32,7 +33,7 @@ HvRetargetDeviceInterrupt( | Name | Offset | Size | Information Provided | |-------------------------|------------|----------|-------------------------------------------| -| `PartitionId` | 0 | 8 | Partition Id (can be HV_PARTITION_SELF) | +| `PartitionId` | 0 | 8 | Partition Id (can be HV_PARTITION_ID_SELF) | | `DeviceId` | 8 | 6 | Supplies the unique (within a guest) logical device ID that is assigned by the host. | | RsvdZ | 32 | 8 | Reserved | | `InterruptEntry` | 16 | 16 | Supplies the MSI address and data that identifies the interrupt. | @@ -41,5 +42,4 @@ HvRetargetDeviceInterrupt( ## See also [HV_INTERRUPT_ENTRY](../datatypes/HV_INTERRUPT_ENTRY.md) - [HV_DEVICE_INTERRUPT_TARGET](../datatypes/HV_DEVICE_INTERRUPT_TARGET.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpi.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpi.md index 528db16ec..5ba1404d5 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpi.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpi.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallSendSyntheticClusterIpi diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpiEx.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpiEx.md index f8c103dfb..e8b44b602 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpiEx.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSendSyntheticClusterIpiEx.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallSendSyntheticClusterIpiEx diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetPartitionProperty.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetPartitionProperty.md new file mode 100644 index 000000000..5f477b9ff --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetPartitionProperty.md @@ -0,0 +1,34 @@ +--- +title: HvCallSetPartitionProperty +description: HvCallSetPartitionProperty hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallSetPartitionProperty + +HvCallSetPartitionProperty sets the value of a fixed-size property for a partition. + +## Interface + +```c +HV_STATUS +HvCallSetPartitionProperty( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_PARTITION_PROPERTY_CODE PropertyCode, + _In_ UINT64 PropertyValue +); +``` + +## Call Code +`0x0045` (Simple) + +## See also +* [HvCallGetPartitionProperty](HvCallGetPartitionProperty.md) +* [HvCallSetPartitionPropertyEx](HvCallSetPartitionPropertyEx.md) +* [HV_PARTITION_PROPERTY_CODE](../datatypes/hv_partition_property_code.md) +* [HV_PARTITION_ID](../datatypes/hv_partition_id.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetPartitionPropertyEx.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetPartitionPropertyEx.md new file mode 100644 index 000000000..18a992e42 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetPartitionPropertyEx.md @@ -0,0 +1,41 @@ +--- +title: HvCallSetPartitionPropertyEx +description: HvCallSetPartitionPropertyEx hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallSetPartitionPropertyEx + +HvCallSetPartitionPropertyEx sets the value of a partition property whose payload size exceeds the fixed-size value supported by [HvCallSetPartitionProperty](HvCallSetPartitionProperty.md). It accepts a variable-size property value buffer. + +## Interface +```c +HV_STATUS +HvCallSetPartitionPropertyEx( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_PARTITION_PROPERTY_CODE PropertyCode, + _In_ UINT64 PropertyArgument, + _In_reads_bytes_(VariableHeaderSize) const VOID* PropertyValue, +); +``` +## Call Code +`0x010A` (Variable, simple input) + +## Input Parameters +| Name | Offset | Size | Information Provided | +|--------------|--------|-----------|----------------------| +| PartitionId | 0 | 8 | Target partition | +| PropertyCode | 8 | 4 | Property selector | +| Padding | 12 | 4 | Padding for alignment (must be zero) | +| PropertyArgument | 16 | 4 | Property Argument | +| PropertyValue| 24 | VariableHeaderSize | Value bytes | + +## See also +* [HvCallGetPartitionProperty](HvCallGetPartitionProperty.md) +* [HvCallSetPartitionProperty](HvCallSetPartitionProperty.md) +* [HV_PARTITION_PROPERTY_CODE](../datatypes/hv_partition_property_code.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVirtualInterruptTarget.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVirtualInterruptTarget.md new file mode 100644 index 000000000..54f2211a4 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVirtualInterruptTarget.md @@ -0,0 +1,43 @@ +--- +title: HvCallSetVirtualInterruptTarget +description: HvCallSetVirtualInterruptTarget hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallSetVirtualInterruptTarget + +Sets the target VP for a virtual interrupt. + +## Interface + + ```c +HV_STATUS +HvCallSetVirtualInterruptTarget( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_INTERRUPT_VECTOR InterruptId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_VTL Vtl + ); + ``` + +## Call Code + +`0x011F` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| PartitionId | 0 | 8 | Specifies the partition ID | +| InterruptId | 8 | 4 | Specifies the virtual interrupt vector | +| VpIndex | 12 | 4 | Specifies the target VP index | +| Vtl | 16 | 1 | Specifies the target VTL | + +## See Also + +[HV_INTERRUPT_VECTOR](../datatypes/hv_interrupt_vector.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVpRegisters.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVpRegisters.md index 3e1264fc2..28ff31130 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVpRegisters.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSetVpRegisters.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallSetVpRegisters @@ -20,9 +21,9 @@ HvCallSetVpRegisters( _In_ HV_PARTITION_ID PartitionId, _In_ HV_VP_INDEX VpIndex, _In_ HV_INPUT_VTL InputVtl, - _Inout_ PUINT32 RegisterCount, - _In_reads(RegisterCount) PCHV_REGISTER_NAME RegisterNameList, - _In_reads(RegisterCount) PCHV_REGISTER_VALUE RegisterValueList + _Inout_ UINT32* RegisterCount, + _In_reads_(*RegisterCount) const HV_REGISTER_NAME* RegisterNameList, + _In_reads_(*RegisterCount) const HV_REGISTER_VALUE* RegisterValueList ); ``` @@ -59,8 +60,29 @@ Side-effects of modifying a register are not performed. This includes generation | RsvdZ | 4 | 12 | | | `RegisterValue` | 16 | 16 | Specifies the new value for the specified register. | +## Early Register List (ARM64) + +On ARM64, certain registers can be set using this hypercall before the Guest OS ID register (`HvRegisterGuestOsId`) is set to a non-zero value. This allows early initialization of critical system registers during the boot process. + +The following registers are permitted to be set before Guest OS identification: + +| Register Name | Description | +|---------------|-------------| +| `HvRegisterGuestOsId` | Guest operating system identification register | +| `HvArm64RegisterSyntheticVbarEl1` | Synthetic Vector Base Address Register for EL1 | +| `HvRegisterGuestCrashCtl` | Guest crash control register | +| `HvRegisterGuestCrashP0` | Guest crash parameter 0 | +| `HvRegisterGuestCrashP1` | Guest crash parameter 1 | +| `HvRegisterGuestCrashP2` | Guest crash parameter 2 | +| `HvRegisterGuestCrashP3` | Guest crash parameter 3 | +| `HvRegisterGuestCrashP4` | Guest crash parameter 4 | + +All other registers require the Guest OS ID to be established (non-zero) before they can be modified through this hypercall. + +**Note:** Setting `HvRegisterGuestOsId` to a non-zero value is typically the first step in the hypervisor initialization sequence, as it identifies the guest operating system to the hypervisor and enables access to the full register set. + ## See also -[HV_REGISTER_NAME](../datatypes/HV_REGISTER_NAME.md) +[HV_REGISTER_NAME](../datatypes/hv_register_name.md) -[HV_REGISTER_VALUE](../datatypes/HV_REGISTER_VALUE.md) +[HV_REGISTER_VALUE](../datatypes/hv_register_value.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEvent.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEvent.md index 47cd7392f..c94bad39f 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEvent.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEvent.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallSignalEvent diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEventDirect.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEventDirect.md new file mode 100644 index 000000000..b25d8102b --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallSignalEventDirect.md @@ -0,0 +1,55 @@ +--- +title: HvCallSignalEventDirect +description: HvCallSignalEventDirect hypercall +keywords: hyper-v +author: alexgrest +ms.author: hvdev +ms.date: 11/03/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallSignalEventDirect + +The HvCallSignalEventDirect hypercall signals an event directly to a specified virtual processor in a target partition. + +The event is signaled by setting the target flag within the [SIEF page](../inter-partition-communication.md) of the specified virtual processor and VTL, and asserting the target SINT. The hypercall returns whether the event was newly signaled or was already set. + +## Interface + + ```c +HV_STATUS +HvCallSignalEventDirect( + _In_ HV_PARTITION_ID TargetPartition, + _In_ HV_VP_INDEX TargetVp, + _In_ HV_VTL TargetVtl, + _In_ UINT8 TargetSint, + _In_ UINT16 FlagNumber, + _Out_ BOOLEAN* NewlySignaled + ); + ``` + +## Call Code + +`0x00C0` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `TargetPartition` | 0 | 8 | Specifies the partition ID of the target partition. | +| `TargetVp` | 8 | 4 | Specifies the target virtual processor index. | +| `TargetVtl` | 12 | 1 | Specifies the target Virtual Trust Level (VTL). | +| `TargetSint` | 13 | 1 | Specifies the target synthetic interrupt source (SINT) index. | +| `FlagNumber` | 14 | 2 | Specifies the event flag number to set within the target SIEF area. | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| `NewlySignaled` | 0 | 1 | Indicates whether the event was newly signaled (TRUE) or was already set (FALSE). | + +## See Also + +[HvCallSignalEvent](HvCallSignalEvent.md) +[HvCallPostMessageDirect](HvCallPostMessageDirect.md) \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallStartVirtualProcessor.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallStartVirtualProcessor.md index f8f24d8af..5bc5f5c57 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallStartVirtualProcessor.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallStartVirtualProcessor.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallStartVirtualProcessor @@ -35,7 +36,7 @@ HvCallStartVirtualProcessor( | Name | Offset | Size | Information Provided | |-------------------------|------------|----------|-------------------------------------------| | `PartitionId` | 0 | 8 | Partition | -| `VpIndex` | 8 | 4 | VP Index to start. To get the VP index from an APIC ID, use HvGetVpIndexFromApicId. | +| `VpIndex` | 8 | 4 | VP Index to start. To get the VP index from an APIC ID, use HvCallGetVpIndexFromApicId. | | `TargetVtl` | 12 | 1 | Target VTL | | `VpContext` | 16 | 224 | Specifies the initial context in which the VP should start. | diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallTranslateVirtualAddress.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallTranslateVirtualAddress.md new file mode 100644 index 000000000..1dc774c38 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallTranslateVirtualAddress.md @@ -0,0 +1,53 @@ +--- +title: HvCallTranslateVirtualAddress +description: HvCallTranslateVirtualAddress hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallTranslateVirtualAddress + +The HvCallTranslateVirtualAddress hypercall translates a guest virtual address to a guest physical address using the context of the specified VP. + +## Interface + +```c +HV_STATUS +HvCallTranslateVirtualAddress( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_TRANSLATE_GVA_CONTROL_FLAGS ControlFlags, + _In_ HV_GVA_PAGE_NUMBER GvaPage, + _Out_ HV_TRANSLATE_GVA_RESULT* TranslationResult, + _Out_ HV_GPA_PAGE_NUMBER* GpaPage +); +``` + +## Call Code + +`0x0052` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|--------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition | +| VpIndex | 8 | 4 | VP performing translation context | +| ControlFlags | 16 | 8 | Control / privilege / walk modifiers | +| GvaPage | 24 | 8 | Guest virtual page | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------------|--------|------|----------------------| +| TranslationResult | 0 | 8 | Result code / attributes | +| GpaPage | 8 | 8 | Translated GPA page (valid if success) | + +## See Also + +[HV_TRANSLATE_GVA_CONTROL_FLAGS](../datatypes/hv_translate_gva_control_flags.md) +[HV_TRANSLATE_GVA_RESULT](../datatypes/hv_translate_gva_result.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallTranslateVirtualAddressEx.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallTranslateVirtualAddressEx.md new file mode 100644 index 000000000..c00859f04 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallTranslateVirtualAddressEx.md @@ -0,0 +1,54 @@ +--- +title: HvCallTranslateVirtualAddressEx +description: HvCallTranslateVirtualAddressEx hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallTranslateVirtualAddressEx + +The HvCallTranslateVirtualAddressEx hypercall translates a guest virtual address to a guest physical address using the context of the specified VP, providing extended translation results. + +## Interface + +```c +HV_STATUS +HvCallTranslateVirtualAddressEx( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_TRANSLATE_GVA_CONTROL_FLAGS ControlFlags, + _In_ HV_GVA_PAGE_NUMBER GvaPage, + _Out_ HV_TRANSLATE_GVA_RESULT_EX* TranslationResult, + _Out_ HV_GPA_PAGE_NUMBER* GpaPage +); +``` + +## Call Code + +`0x00AC` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|--------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition | +| VpIndex | 8 | 4 | VP context | +| Reserved | 12 | 4 | Must be zero | +| ControlFlags | 16 | 8 | Control flags | +| GvaPage | 24 | 8 | Guest virtual page | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------------|--------|------|----------------------| +| TranslationResult | 0 | 16 | Extended result (fault info, attributes) | +| GpaPage | 16 | 8 | GPA page | + +## See Also + +[HV_TRANSLATE_GVA_CONTROL_FLAGS](../datatypes/hv_translate_gva_control_flags.md) +[HV_TRANSLATE_GVA_RESULT_EX](../datatypes/hv_translate_gva_result_ex.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapGpaPages.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapGpaPages.md new file mode 100644 index 000000000..a24cb23c0 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapGpaPages.md @@ -0,0 +1,42 @@ +--- +title: HvCallUnmapGpaPages +description: HvCallUnmapGpaPages hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallUnmapGpaPages + +The HvCallUnmapGpaPages hypercall unmaps a contiguous run of GPA pages from a target partition, releasing backing pages / references. + +## Interface + +```c +HV_STATUS +HvCallUnmapGpaPages( + _In_ HV_PARTITION_ID TargetPartitionId, + _In_ HV_GPA_PAGE_NUMBER TargetGpaBase, + _In_ HV_UNMAP_GPA_FLAGS UnmapFlags +); +``` + +## Call Code + +`0x004C` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------|--------|------|----------------------| +| TargetPartitionId | 0 | 8 | Target partition | +| TargetGpaBase | 8 | 8 | First GPA page to unmap (up to RepCount) | +| UnmapFlags | 16 | 4 | [HV_UNMAP_GPA_FLAGS](../datatypes/hv_unmap_gpa_flags.md) controlling precommit retention and large page handling | + +## See Also + +- [HV_UNMAP_GPA_FLAGS](../datatypes/hv_unmap_gpa_flags.md) +- [HvCallMapGpaPages](HvCallMapGpaPages.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapStatsPage.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapStatsPage.md new file mode 100644 index 000000000..61428735d --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapStatsPage.md @@ -0,0 +1,42 @@ +--- +title: HvCallUnmapStatsPage +description: HvCallUnmapStatsPage hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 11/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallUnmapStatsPage + +`HvCallUnmapStatsPage` unmaps a previously mapped statistics page from the caller's guest physical address space. + +## Interface + +```c +HV_STATUS +HvCallUnmapStatsPage( + _In_ HV_STATS_OBJECT_TYPE StatsType, + _In_ HV_STATS_OBJECT_IDENTITY ObjectIdentity +); +``` + +## Call Code + +`0x006D` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|----------------|--------|------|----------------------| +| StatsType | 0 | 4 | Object category to unmap | +| ObjectIdentity | 4 | 16 | Object identity (partition id, VP index, etc) | + +## See also + +* [HV_STATS_OBJECT_TYPE](../datatypes/hv_stats_object_type.md) +* [HV_STATS_OBJECT_IDENTITY](../datatypes/hv_stats_object_identity.md) +* [HV_STATUS](../datatypes/hv_status.md) +* [HvCallMapStatsPage2](HvCallMapStatsPage2.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapVpStatePage.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapVpStatePage.md new file mode 100644 index 000000000..39b2210f9 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnmapVpStatePage.md @@ -0,0 +1,49 @@ +--- +title: HvCallUnmapVpStatePage +description: HvCallUnmapVpStatePage hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallUnmapVpStatePage + +The HvCallUnmapVpStatePage hypercall unmaps a previously mapped VP state page. + +## Interface + +```c +HV_STATUS +HvCallUnmapVpStatePage( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ UINT16 Type, + _In_ HV_INPUT_VTL InputVtl, + _In_ UINT8 Reserved0 +); +``` + +## Call Code + +`0x00E2` (Simple) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| PartitionId | 0 | 8 | Specifies the partition ID | +| VpIndex | 8 | 4 | Specifies the VP index | +| Type | 12 | 2 | State page type ([HV_VP_STATE_PAGE_TYPE](../datatypes/hv_vp_state_page_type.md)) | +| InputVtl | 14 | 1 | Specifies the input VTL | +| Reserved0 | 15 | 1 | Reserved | + +## See Also + +[HV_PARTITION_ID](../datatypes/hv_partition_id.md) +[HV_VP_INDEX](../datatypes/hv_vp_index.md) +[HV_INPUT_VTL](../datatypes/hv_input_vtl.md) +[HV_VP_STATE_PAGE_TYPE](../datatypes/hv_vp_state_page_type.md) +[HvCallMapVpStatePage](HvCallMapVpStatePage.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnregisterInterceptResult.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnregisterInterceptResult.md new file mode 100644 index 000000000..ef1162d5a --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallUnregisterInterceptResult.md @@ -0,0 +1,49 @@ +--- +title: HvCallUnregisterInterceptResult +description: HvCallUnregisterInterceptResult hypercall +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/31/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallUnregisterInterceptResult + +The HvCallUnregisterInterceptResult hypercall unregisters a previously registered intercept result for a specific intercept type within a partition. + +## Interface + +```c +HV_STATUS +HvCallUnregisterInterceptResult( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_VP_INDEX VpIndex, + _In_ HV_INTERCEPT_TYPE InterceptType, + _In_ HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS Parameters +); +``` + +## Call Code + +`0x0092` (Simple) + +## Restrictions + +- Architecture: x64 only. + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|-------------------------|------------|----------|-------------------------------------------| +| PartitionId | 0 | 8 | Specifies the partition for which to unregister the intercept result | +| VpIndex | 8 | 4 | Specifies the VP index for the intercept | +| InterceptType | 12 | 4 | Specifies the type of intercept for which to unregister the result | +| Parameters | 16 | Variable | [HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS](../datatypes/hv_unregister_intercept_result_parameters.md) union selecting CPUID or MSR unregister parameters | + +## See Also + +* [HvCallRegisterInterceptResult](HvCallRegisterInterceptResult.md) +* [HV_INTERCEPT_TYPE](../datatypes/hv_intercept_type.md) +* [HV_UNREGISTER_INTERCEPT_RESULT_PARAMETERS](../datatypes/hv_unregister_intercept_result_parameters.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlCall.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlCall.md index 1b6dd14e4..6aecf9dfa 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlCall.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlCall.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallVtlCall diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlReturn.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlReturn.md index cc2b2a296..3b8b19572 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlReturn.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallVtlReturn.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvCallVtlReturn diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallWithdrawMemory.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallWithdrawMemory.md new file mode 100644 index 000000000..f9be98275 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvCallWithdrawMemory.md @@ -0,0 +1,48 @@ +--- +title: HvCallWithdrawMemory +description: HvCallWithdrawMemory hypercall specification +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 09/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# HvCallWithdrawMemory + +HvCallWithdrawMemory withdraws physical pages from a partition's memory pool returning their page numbers to the caller. + +## Interface + +```c +HV_STATUS +HvCallWithdrawMemory( + _In_ HV_PARTITION_ID PartitionId, + _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, + _Out_ HV_GPA_PAGE_NUMBER* GpaPageList // Writes RepCount elements +); +``` + +## Call Code + +`0x0049` (Rep) + +## Input Parameters + +| Name | Offset | Size | Information Provided | +|---------------------|--------|------|----------------------| +| PartitionId | 0 | 8 | Target partition identifier. | +| ProximityDomainInfo | 8 | 8 | NUMA domain hint for withdrawal. | + +## Output Parameters + +| Name | Offset | Size | Information Provided | +|-------------|--------|------|----------------------| +| GpaPageList | 0 | Var | Output array of withdrawn page numbers (count = ElementsProcessed). | + +## See Also + +- [HvCallDepositMemory](HvCallDepositMemory.md) +- [HvCallGetMemoryBalance](HvCallGetMemoryBalance.md) +- [HV_PROXIMITY_DOMAIN_INFO](../datatypes/hv_proximity_domain_info.md) diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallGetBootZeroedMemory.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallGetBootZeroedMemory.md index 20d18cd22..bacbaeca0 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallGetBootZeroedMemory.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallGetBootZeroedMemory.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 11/16/2022 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvExtCallGetBootZeroedMemory @@ -21,7 +22,7 @@ Ranges can include memory that don’t exist and can overlap. The hypervisor sho ```c HV_STATUS HvExtCallGetBootZeroedMemory( - _Out_ PUINT64 RangeCount, + _Out_ UINT64* RangeCount, _Out_ HV_EXT_OUTPUT_BOOT_ZEROED_MEMORY_RANGE Ranges[] ); ``` diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallQueryCapabilities.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallQueryCapabilities.md index 6a0f443c9..8e1260120 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallQueryCapabilities.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/HvExtCallQueryCapabilities.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # HvExtCallQueryCapabilities diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/TOC.yml b/virtualization/hyper-v-on-windows/tlfs/hypercalls/TOC.yml index e6c543164..41a68db49 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/TOC.yml +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/TOC.yml @@ -1,9 +1,33 @@ - name: Overview href: overview.md +- name: HvCallAssertVirtualInterrupt + href: HvCallAssertVirtualInterrupt.md +- name: HvCallCheckForIoIntercept + href: HvCallCheckForIoIntercept.md +- name: HvCallConnectPort + href: HvCallConnectPort.md +- name: HvCallCreatePartition + href: HvCallCreatePartition.md +- name: HvCallCreatePort + href: HvCallCreatePort.md +- name: HvCallCreateVp + href: HvCallCreateVp.md +- name: HvCallDeletePartition + href: HvCallDeletePartition.md +- name: HvCallDeletePort + href: HvCallDeletePort.md +- name: HvCallDeleteVp + href: HvCallDeleteVp.md +- name: HvCallDepositMemory + href: HvCallDepositMemory.md +- name: HvCallDisconnectPort + href: HvCallDisconnectPort.md - name: HvCallEnablePartitionVtl href: HvCallEnablePartitionVtl.md - name: HvCallEnableVpVtl href: HvCallEnableVpVtl.md +- name: HvCallFinalizePartition + href: HvCallFinalizePartition.md - name: HvCallFlushGuestPhysicalAddressList href: HvCallFlushGuestPhysicalAddressList.md - name: HvCallFlushGuestPhysicalAddressSpace @@ -16,33 +40,83 @@ href: HvCallFlushVirtualAddressSpace.md - name: HvCallFlushVirtualAddressSpaceEx href: HvCallFlushVirtualAddressSpaceEx.md +- name: HvCallGetMemoryBalance + href: HvCallGetMemoryBalance.md +- name: HvCallGetNextChildPartition + href: HvCallGetNextChildPartition.md +- name: HvCallGetPartitionProperty + href: HvCallGetPartitionProperty.md +- name: HvCallGetVpCpuidValues + href: HvCallGetVpCpuidValues.md - name: HvCallGetVpIndexFromApicId href: HvCallGetVpIndexFromApicId.md - name: HvCallGetVpRegisters href: HvCallGetVpRegisters.md +- name: HvCallGetVpSetFromMda + href: HvCallGetVpSetFromMda.md +- name: HvCallInitializePartition + href: HvCallInitializePartition.md +- name: HvCallInstallIntercept + href: HvCallInstallIntercept.md +- name: HvCallInstallInterceptEx + href: HvCallInstallInterceptEx.md +- name: HvCallMapGpaPages + href: HvCallMapGpaPages.md +- name: HvCallMapSparseGpaPages + href: HvCallMapSparseGpaPages.md +- name: HvCallMapStatsPage2 + href: HvCallMapStatsPage2.md +- name: HvCallMapVpStatePage + href: HvCallMapVpStatePage.md +- name: HvCallModifySparseGpaPages + href: HvCallModifySparseGpaPages.md - name: HvCallModifyVtlProtectionMask href: HvCallModifyVtlProtectionMask.md - name: HvCallNotifyLongSpinWait href: HvCallNotifyLongSpinWait.md - name: HvCallPostMessage href: HvCallPostMessage.md +- name: HvCallPostMessageDirect + href: HvCallPostMessageDirect.md +- name: HvCallRegisterInterceptResult + href: HvCallRegisterInterceptResult.md - name: HvCallRetargetDeviceInterrupt href: HvCallRetargetDeviceInterrupt.md - name: HvCallSendSyntheticClusterIpi href: HvCallSendSyntheticClusterIpi.md - name: HvCallSendSyntheticClusterIpiEx href: HvCallSendSyntheticClusterIpiEx.md +- name: HvCallSetPartitionProperty + href: HvCallSetPartitionProperty.md +- name: HvCallSetPartitionPropertyEx + href: HvCallSetPartitionPropertyEx.md +- name: HvCallSetVirtualInterruptTarget + href: HvCallSetVirtualInterruptTarget.md - name: HvCallSetVpRegisters href: HvCallSetVpRegisters.md - name: HvCallSignalEvent href: HvCallSignalEvent.md +- name: HvCallSignalEventDirect + href: HvCallSignalEventDirect.md - name: HvCallStartVirtualProcessor href: HvCallStartVirtualProcessor.md +- name: HvCallTranslateVirtualAddress + href: HvCallTranslateVirtualAddress.md +- name: HvCallTranslateVirtualAddressEx + href: HvCallTranslateVirtualAddressEx.md +- name: HvCallUnmapGpaPages + href: HvCallUnmapGpaPages.md +- name: HvCallUnmapVpStatePage + href: HvCallUnmapVpStatePage.md +- name: HvCallUnregisterInterceptResult + href: HvCallUnregisterInterceptResult.md - name: HvCallVtlCall href: HvCallVtlCall.md - name: HvCallVtlReturn href: HvCallVtlReturn.md -- name: HvExtCallQueryCapabilities - href: HvExtCallQueryCapabilities.md +- name: HvCallWithdrawMemory + href: HvCallWithdrawMemory.md - name: HvExtCallGetBootZeroedMemory - href: HvExtCallGetBootZeroedMemory.md \ No newline at end of file + href: HvExtCallGetBootZeroedMemory.md +- name: HvExtCallQueryCapabilities + href: HvExtCallQueryCapabilities.md \ No newline at end of file diff --git a/virtualization/hyper-v-on-windows/tlfs/hypercalls/overview.md b/virtualization/hyper-v-on-windows/tlfs/hypercalls/overview.md index 8e875e3ff..fc911a4c7 100644 --- a/virtualization/hyper-v-on-windows/tlfs/hypercalls/overview.md +++ b/virtualization/hyper-v-on-windows/tlfs/hypercalls/overview.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Hypercall Reference diff --git a/virtualization/hyper-v-on-windows/tlfs/inter-partition-communication.md b/virtualization/hyper-v-on-windows/tlfs/inter-partition-communication.md index a05278e62..4c8d257e2 100644 --- a/virtualization/hyper-v-on-windows/tlfs/inter-partition-communication.md +++ b/virtualization/hyper-v-on-windows/tlfs/inter-partition-communication.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Inter-Partition Communication diff --git a/virtualization/hyper-v-on-windows/tlfs/nested-virtualization.md b/virtualization/hyper-v-on-windows/tlfs/nested-virtualization.md index 427bf47b5..01d610e45 100644 --- a/virtualization/hyper-v-on-windows/tlfs/nested-virtualization.md +++ b/virtualization/hyper-v-on-windows/tlfs/nested-virtualization.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Nested Virtualization diff --git a/virtualization/hyper-v-on-windows/tlfs/partition-properties.md b/virtualization/hyper-v-on-windows/tlfs/partition-properties.md index 3ab2e33b6..20a9ecc35 100644 --- a/virtualization/hyper-v-on-windows/tlfs/partition-properties.md +++ b/virtualization/hyper-v-on-windows/tlfs/partition-properties.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Partitions diff --git a/virtualization/hyper-v-on-windows/tlfs/timers.md b/virtualization/hyper-v-on-windows/tlfs/timers.md index 669beae92..8ef0ed002 100644 --- a/virtualization/hyper-v-on-windows/tlfs/timers.md +++ b/virtualization/hyper-v-on-windows/tlfs/timers.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Timers @@ -155,7 +156,7 @@ Synthetic timers are configured by using model-specific registers (MSRs) associa | 0x400000B4 | HV_X64_MSR_STIMER2_CONFIG | Configuration register for synthetic timer 2. | | 0x400000B5 | HV_X64_MSR_STIMER2_COUNT | Expiration time or period for synthetic timer 2. | | 0x400000B6 | HV_X64_MSR_STIMER3_CONFIG | Configuration register for synthetic timer 3. | -| 0x400000B7 | HV_X64_MSR_STIMER4_COUNT | Expiration time or period for synthetic timer 3. | +| 0x400000B7 | HV_X64_MSR_STIMER3_COUNT | Expiration time or period for synthetic timer 3. | #### Synthetic Timer Configuration Register @@ -171,7 +172,7 @@ Synthetic timers are configured by using model-specific registers (MSRs) associa | 1 | Periodic - Set if timer is periodic | Read / Write | | 0 | Enabled - set if timer is enabled | Read / Write | -When a virtual processor is created and reset, the value of all HV_X64_MSR_STIMERx_CONFIG (synthetic timer configuration) registers is set to 0x0000000000000000. Thus, all synthetic timers are disabled by default. +When a virtual processor is created and reset, the value of all synthetic timer configuration registers (HV_X64_MSR_STIMER0_CONFIG through HV_X64_MSR_STIMER3_CONFIG) is set to 0x0000000000000000. Thus, all synthetic timers are disabled by default. If AutoEnable is set, then writing a non-zero value to the corresponding count register will cause Enable to be set and activate the counter. Otherwise, Enable should be set after writing the corresponding count register in order to activate the counter. For information about the Count register, see the following section. diff --git a/virtualization/hyper-v-on-windows/tlfs/tlfs.md b/virtualization/hyper-v-on-windows/tlfs/tlfs.md index 6864a0452..089e4d4d1 100644 --- a/virtualization/hyper-v-on-windows/tlfs/tlfs.md +++ b/virtualization/hyper-v-on-windows/tlfs/tlfs.md @@ -6,22 +6,23 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Hypervisor Top Level Functional Specification The Hyper-V Hypervisor Top-Level Functional Specification (TLFS) describes the hypervisor's guest-visible behavior to other operating system components. This specification is meant to be useful for guest operating system developers. -> This specification is provided under the Microsoft Open Specification Promise. Read the following for further details about the [Microsoft Open Specification Promise](/openspecs/dev_center/ms-devcentlp/51a0d3ff-9f77-464c-b83f-2de08ed28134). +> This specification is provided under the Microsoft Open Specification Promise. Read the following for further details about the [Microsoft Open Specification Promise](https://docs.microsoft.com/openspecs/dev_center/ms-devcentlp/51a0d3ff-9f77-464c-b83f-2de08ed28134). Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in these materials. Except as expressly provided in the Microsoft Open Specification Promise, the furnishing of these materials does not give you any license to these patents, trademarks, copyrights, or other intellectual property. ## Glossary -- **Partition** - Hyper-V supports isolation in terms of a partition. A partition is a logical unit of isolation, supported by the hypervisor, in which operating systems execute. -- **Root Partition** - The root partition (a.k.a the"parent" or"host") is a privileged management partition. The root partition manages machine-level functions such as device drivers, power management, and device addition/removal. The virtualization stack runs in the parent partition and has direct access to the hardware devices. The root partition then creates the child partitions which host the guest operating systems. -- **Child Partition** - The child partition (a.k.a. the"guest") hosts a guest operating system. All access to physical memory and devices by a child partition is provided via the Virtual Machine Bus (VMBus) or the hypervisor. -- **Hypercall** - Hypercalls are an interface for communication with the hypervisor. +- **Partition** – Hyper-V supports isolation in terms of a partition. A partition is a logical unit of isolation, supported by the hypervisor, in which operating systems execute. +- **Root Partition** – The root partition (a.k.a the “parent” or “host”) is a privileged management partition. The root partition manages machine-level functions such as device drivers, power management, and device addition/removal. The virtualization stack runs in the parent partition and has direct access to the hardware devices. The root partition then creates the child partitions which host the guest operating systems. +- **Child Partition** – The child partition (a.k.a. the “guest”) hosts a guest operating system. All access to physical memory and devices by a child partition is provided via the Virtual Machine Bus (VMBus) or the hypervisor. +- **Hypercall** – Hypercalls are an interface for communication with the hypervisor. ## Specification Style @@ -31,15 +32,18 @@ This specification is informal; that is, the interfaces are not specified in a f ## Previous Versions +> No new TLFS PDFs will be published. Please consider this document as the main reference. + Release | Document --- | --- -Windows Server 2016 (Revision C) | [Hypervisor Top Level Functional Specification v5.0c.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v5.0C.pdf) -Windows Server 2012 R2 (Revision B) | [Hypervisor Top Level Functional Specification v4.0b.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v4.0b.pdf) -Windows Server 2012 | [Hypervisor Top Level Functional Specification v3.0.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v3.0.pdf) -Windows Server 2008 R2 | [Hypervisor Top Level Functional Specification v2.0.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v2.0.pdf) +Windows Server 2019 (Revision B) | [Hypervisor Top Level Functional Specification v6.0b.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/raw/live/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v6.0b.pdf) +Windows Server 2016 (Revision C) | [Hypervisor Top Level Functional Specification v5.0c.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/raw/live/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v5.0C.pdf) +Windows Server 2012 R2 (Revision B) | [Hypervisor Top Level Functional Specification v4.0b.pdf](https://github.com/Microsoft/Virtualization-Documentation/raw/live/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v4.0b.pdf) +Windows Server 2012 | [Hypervisor Top Level Functional Specification v3.0.pdf](https://github.com/Microsoft/Virtualization-Documentation/raw/live/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v3.0.pdf) +Windows Server 2008 R2 | [Hypervisor Top Level Functional Specification v2.0.pdf](https://github.com/Microsoft/Virtualization-Documentation/live/master/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v2.0.pdf) ## Requirements for Implementing the Microsoft Hypervisor Interface The TLFS fully describes all aspects of the Microsoft-specific hypervisor architecture, which is declared to guest virtual machines as the "HV#1" interface. However, not all interfaces described in the TLFS are required to be implemented by third-party hypervisor wishing to declare conformance with the Microsoft HV#1 hypervisor specification. The document "Requirements for Implementing the Microsoft Hypervisor Interface" describes the minimal set of hypervisor interfaces which must be implemented by any hypervisor which claims compatibility with the Microsoft HV#1 interface. -[Requirements for Implementing the Microsoft Hypervisor Interface.pdf](https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/tlfs/Requirements%20for%20Implementing%20the%20Microsoft%20Hypervisor%20Interface.pdf) \ No newline at end of file +[Requirements for Implementing the Microsoft Hypervisor Interface.pdf](https://github.com/Microsoft/Virtualization-Documentation/raw/live/tlfs/Requirements%20for%20Implementing%20the%20Microsoft%20Hypervisor%20Interface.pdf) diff --git a/virtualization/hyper-v-on-windows/tlfs/virtual-interrupts.md b/virtualization/hyper-v-on-windows/tlfs/virtual-interrupts.md index dc248b5b9..7d156d259 100644 --- a/virtualization/hyper-v-on-windows/tlfs/virtual-interrupts.md +++ b/virtualization/hyper-v-on-windows/tlfs/virtual-interrupts.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Virtual Interrupt Controller diff --git a/virtualization/hyper-v-on-windows/tlfs/virtual-mmu.md b/virtualization/hyper-v-on-windows/tlfs/virtual-mmu.md index f2c898ef0..8ca6811d3 100644 --- a/virtualization/hyper-v-on-windows/tlfs/virtual-mmu.md +++ b/virtualization/hyper-v-on-windows/tlfs/virtual-mmu.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Virtual MMU @@ -20,7 +21,7 @@ Virtual processors expose virtual memory and a virtual TLB (translation look-asi The virtual MMU exposed by the hypervisor is generally compatible with the physical MMU found within an x64 processor. The following guest-observable differences exist: -- The CR3.PWT and CR3.PCD bits may not be supported in some hypervisor implementations. On such implementations, any attempt by the guest to set these flags through a MOV to CR3 instruction or a task gate switch will be ignored. Attempts to set these bits programmatically through HvSetVpRegisters or HvSwitchVirtualAddressSpace may result in an error. +- The CR3.PWT and CR3.PCD bits may not be supported in some hypervisor implementations. On such implementations, any attempt by the guest to set these flags through a MOV to CR3 instruction or a task gate switch will be ignored. Attempts to set these bits programmatically through HvSetVpRegisters or HvCallSwitchVirtualAddressSpace may result in an error. - The PWT and PCD bits within a leaf page table entry (for example, a PTE for 4-K pages and a PDE for large pages) specify the cacheability of the page being mapped. The PAT, PWT, and PCD bits within non-leaf page table entries indicate the cacheability of the next page table in the hierarchy. Some hypervisor implementations may not support these flags. On such implementations, all page table accesses performed by the hypervisor are done by using write-back cache attributes. This affects, in particular, accessed and dirty bits written to the page table entries. If the guest sets the PAT, PWT, or PCD bits within non-leaf page table entries, an “unsupported feature” message may be generated when a virtual processor accesses a page that is mapped by that page table. - The CR0.CD (cache disable) bit may not be supported in some hypervisor implementations. On such implementations, the CR0.CD bit must be set to 0. Any attempt by the guest to set this flag through a MOV to CR0 instruction will be ignored. Attempts to set this bit programmatically through HvSetVpRegisters will result in an error. - The PAT (page address type) MSR is a per-VP register. However, when all the virtual processors in a partition set the PAT MSR to the same value, the new effect becomes a partition-wide effect. @@ -51,7 +52,7 @@ The hypervisor supports the following hypercalls to invalidate TLBs: On some systems (those with sufficient virtualization support in hardware), the legacy TLB management instructions may be faster for local or remote (cross-processor) TLB invalidation. Guests who are interested in optimal performance should use the CPUID leaf 0x40000004 to determine which behaviors to implement using hypercalls: -- UseHypercallForAddressSpaceSwitch: If this flag is set, the caller should assume that it’s faster to use HvCallSwitchAddressSpace to switch between address spaces. If this flag is clear, a MOV to CR3 instruction is recommended. +- UseHypercallForAddressSpaceSwitch: If this flag is set, the caller should assume that it’s faster to use HvCallSwitchVirtualAddressSpace to switch between address spaces. If this flag is clear, a MOV to CR3 instruction is recommended. - UseHypercallForLocalFlush: If this flag is set, the caller should assume that it’s faster to use hypercalls (as opposed to INVLPG or MOV to CR3) to flush one or more pages from the virtual TLB. - UseHypercallForRemoteFlushAndLocalFlushEntire: If this flag is set, the caller should assume that it’s faster to use hypercalls (as opposed to using guest-generated inter-processor interrupts) to flush one or more pages from the virtual TLB. diff --git a/virtualization/hyper-v-on-windows/tlfs/virtualization-host.md b/virtualization/hyper-v-on-windows/tlfs/virtualization-host.md new file mode 100644 index 000000000..c7a25d0f6 --- /dev/null +++ b/virtualization/hyper-v-on-windows/tlfs/virtualization-host.md @@ -0,0 +1,234 @@ +--- +title: Virtualization Host +description: Virtualization Host +keywords: hyper-v +author: hvdev +ms.author: hvdev +ms.date: 08/01/2025 +ms.topic: reference +ms.prod: windows-10-hyperv +--- + +# Virtualization Host + +Virtualization Host capability refers to a partition's ability to create and manage child partitions when it has the CreatePartitions partition privilege (['HV_PARTITION_PRIVILEGE_MASK'](datatypes/hv_partition_privilege_mask.md)). + +This capability provides comprehensive partition lifecycle management, memory pool management, address space control, and inter-partition communication. A virtualization host maintains parent-child relationships with managed partitions and coordinates their execution, resource allocation, and communication. + +## Windows compatibility + +The hypercall interfaces are intended to be used when running non-Windows operating systems. + +Windows applications MUST use the [Windows Hypervisor Platform](/virtualization/api/hypervisor-platform/hypervisor-platform) APIs to implement a Virtualization Host. This guarantees full compatibility with other Windows features, such as Virtualization Based Security. + +## Terminology + +The following terminology is used to define virtualization host relationships: + +| Term | Definition | +|------------------------|-------------------------------------------------------------------------| +| **Virtualization Host**| A partition with CreatePartitions privilege that manages child partitions. | +| **Parent Partition** | A partition that has created and manages one or more child partitions. | +| **Child Partition** | A partition created and managed by another partition (its parent). | +| **Root Partition** | The partition that manages the bare-metal host. | +| **Virtual Processor (VP)** | Execution context within a partition that runs guest code. | +| **Guest Physical Address (GPA)** | Physical memory address as seen by guest software. | + +## Partition Lifecycle Management + +Partition lifecycle management encompasses the creation, configuration, execution, and cleanup of child partitions. The lifecycle follows a strict state model with defined transitions between states. + +### Partition States + +Child partitions progress through the following states: + +| State | Description | Allowed Operations | +|----------------|-------------------------------------------------------|---------------------------------------| +| **Created** | Partition exists but cannot execute code | Configure properties, deposit memory | +| **Initialized**| Configuration validated, ready for VP creation | Create VPs, adjust properties* | +| **Active** | Ready for execution, configuration locked | Execute guest code, runtime management | +| **Finalized** | Resources cleaned up, prepared for deletion | Withdraw memory, Delete partition | +| **Deleted** | Partition no longer exists | | + +## Typical Usage Patterns + +### Basic Partition Creation + +The most common pattern for creating a child partition follows this sequence: + +1. Call [`HvCallCreatePartition`](hypercalls/HvCallCreatePartition.md) to establish the partition +2. Call [`HvCallSetPartitionProperty`](hypercalls/HvCallSetPartitionProperty.md) to configure partition properties as needed for the guest workload +3. Call [`HvCallInitializePartition`](hypercalls/HvCallInitializePartition.md) to validate configuration and transition to active state +4. Call [`HvCallCreateVp`](hypercalls/HvCallCreateVp.md) for each required virtual processor +5. Configure initial VP state (registers, memory mappings, etc.) +7. Start VP0 by clearing the HvRegisterExplicitSuspend VP register. The guest handles starting the rest of the VPs. + +### Partition Cleanup + +When shutting down a child partition: + +1. Stop all virtual processor execution +2. Call [`HvCallFinalizePartition`](hypercalls/HvCallFinalizePartition.md) to clean up VPs, ports, connections, and resources +3. Withdraw remaining partition memory +4. Call [`HvCallDeletePartition`](hypercalls/HvCallDeletePartition.md) to destroy the partition + +## Memory Pool Management + +Virtualization Hosts are expected to provide the hypervisor with sufficient memory to allow it to allocate its internal tracking structures on behalf of any given partition. The hypervisor maintains separate memory pools for each partition and the virtualization host provides memory to the hypervisor using the Deposit interfaces. + +### Memory Operations + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallDepositMemory`](hypercalls/HvCallDepositMemory.md) | Deposit memory for the target partition | +| [`HvCallWithdrawMemory`](hypercalls/HvCallWithdrawMemory.md) | Reclaim memory pages from child partition | +| [`HvCallGetMemoryBalance`](hypercalls/HvCallGetMemoryBalance.md) | Query current memory allocation and usage statistics | + +When a page is deposited, the Virtualization Host loses access to it. + +### Memory Management Patterns + +#### Initial Memory Allocation + +When creating a child partition: + +1. Create and initialize the partition +2. Call [`HvCallDepositMemory`](hypercalls/HvCallDepositMemory.md) to provide initial memory allocation +3. Create virtual processors (which may require additional memory) +4. Finalize the partition + +## Partition and VP Configuration + +Partition and virtual processor configuration provides control over capabilities, features, isolation settings, and execution environments. Configuration properties must be set during specific partition states. + +### Partition Properties + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallSetPartitionProperty`](hypercalls/HvCallSetPartitionProperty.md) | Configure partition capabilities, features, and behavior (small fixed-size values) | +| [`HvCallSetPartitionPropertyEx`](hypercalls/HvCallSetPartitionPropertyEx.md) | Extended variant for larger variable-size property values | +| [`HvCallGetPartitionProperty`](hypercalls/HvCallGetPartitionProperty.md) | Query current partition property values | + +#### Usage Notes + +- Early partition properties must be set before [`HvCallInitializePartition`](hypercalls/HvCallInitializePartition.md). See [HV_PARTITION_PROPERTY_CODE](datatypes/hv_partition_property_code.md) for more details. + +### Virtual Processor State Management + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallGetVpRegisters`](hypercalls/HvCallGetVpRegisters.md) | Rep interface to read architectural register sets (batched) | +| [`HvCallSetVpRegisters`](hypercalls/HvCallSetVpRegisters.md) | Rep interface to write architectural register sets (batched) | +| [`HvCallGetVpCpuidValues`](hypercalls/HvCallGetVpCpuidValues.md) | Query CPUID values exposed to a VP | + +## Address Space Management + +Address space operations support both contiguous and sparse mapping patterns, enabling efficient memory layout for various guest configurations. + +### Memory Mapping Operations + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallMapGpaPages`](hypercalls/HvCallMapGpaPages.md) | Map contiguous GPA ranges to physical addresses | +| [`HvCallMapSparseGpaPages`](hypercalls/HvCallMapSparseGpaPages.md) | Map non-contiguous GPA pages with individual control | +| [`HvCallUnmapGpaPages`](hypercalls/HvCallUnmapGpaPages.md) | Remove GPA mappings and release resources | +| [`HvCallModifySparseGpaPages`](hypercalls/HvCallModifySparseGpaPages.md) | Modify existing sparse GPA page mappings | + +### Memory Access Operations + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallTranslateVirtualAddress`](hypercalls/HvCallTranslateVirtualAddress.md) | Translate guest virtual addresses to physical addresses | +| [`HvCallTranslateVirtualAddressEx`](hypercalls/HvCallTranslateVirtualAddressEx.md) | Extended guest address translation with additional control | + +## Interception and Monitoring + +Interception capabilities enable parent partitions to monitor and control child partition access to various system resources including MSRs, IO ports, and CPUID instructions. + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallInstallIntercept`](hypercalls/HvCallInstallIntercept.md) | Install intercepts for child partition resource access | +| [`HvCallInstallInterceptEx`](hypercalls/HvCallInstallInterceptEx.md) | Extended intercept installation | +| [`HvCallCheckForIoIntercept`](hypercalls/HvCallCheckForIoIntercept.md) | Check if IO port access should be intercepted | +| [`HvCallRegisterInterceptResult`](hypercalls/HvCallRegisterInterceptResult.md) | Register result handlers for specific intercept types | +| [`HvCallUnregisterInterceptResult`](hypercalls/HvCallUnregisterInterceptResult.md) | Remove previously registered intercept result handlers | + +## Capability & Privilege Discovery + +- System-wide optional features (e.g., supported intercept classes) are enumerated via architecturally defined CPUID leaves and other documented discovery mechanisms. +- Per-partition privileges (CreatePartitions, AccessVpRegisters, StartVirtualProcessor, etc.) are reflected in the privilege mask property. +- A virtualization host should degrade gracefully when optional capabilities are absent. + +### Usage Notes + +- Cache static capability indicators for the boot lifetime; avoid re-querying in hot paths. + +## Cache and TLB Management + +Cache and TLB invalidation operations provide control over processor caching behavior for virtual machines. + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallFlushVirtualAddressSpace`](hypercalls/HvCallFlushVirtualAddressSpace.md) | Invalidate virtual address mappings in guest TLBs | +| [`HvCallFlushVirtualAddressList`](hypercalls/HvCallFlushVirtualAddressList.md) | Invalidate specific virtual address ranges in guest TLBs | + +## Statistics and Monitoring + +Statistics and monitoring provide visibility into partition and virtual processor performance, resource utilization, and operational metrics. + +### Statistics Collection + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallMapStatsPage2`](hypercalls/HvCallMapStatsPage2.md) | Map partition statistics page for performance monitoring | +| [`HvCallMapVpStatePage`](hypercalls/HvCallMapVpStatePage.md) | Map virtual processor statistics page for detailed metrics | +| [`HvCallUnmapVpStatePage`](hypercalls/HvCallUnmapVpStatePage.md) | Remove VP statistics page mappings | + +Statistics pages provide real-time metrics including execution time, interrupt counts, hypercall statistics, and resource utilization data. + +## Partition Enumeration + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallGetNextChildPartition`](hypercalls/HvCallGetNextChildPartition.md) | Enumerate child partitions managed by this virtualization host | + +## Virtual Interrupt Management + +Virtual interrupt management enables control and coordination of interrupt delivery between partitions. + +### Interrupt Operations + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallAssertVirtualInterrupt`](hypercalls/HvCallAssertVirtualInterrupt.md) | Deliver virtual interrupts from parent to child partitions | + +### Virtual Interrupt Resource Management (ARM64) + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallSetVirtualInterruptTarget`](hypercalls/HvCallSetVirtualInterruptTarget.md) | Configure target VP for virtual interrupt routing | + +## Port Management and Inter-Partition Communication + +Port management provides the foundation for structured communication between partitions. + +### Port Lifecycle Operations + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallCreatePort`](hypercalls/HvCallCreatePort.md) | Create communication ports for inter-partition communication | +| [`HvCallDeletePort`](hypercalls/HvCallDeletePort.md) | Remove ports and release associated resources | + +### Connection Management + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallConnectPort`](hypercalls/HvCallConnectPort.md) | Establish active communication channels between partitions | +| [`HvCallDisconnectPort`](hypercalls/HvCallDisconnectPort.md) | Terminate connections while preserving port infrastructure | + +### Direct Communication Operations + +| Hypercall | Description | +|-----------|-------------| +| [`HvCallPostMessageDirect`](hypercalls/HvCallPostMessageDirect.md) | Post messages directly to VP message queues | + diff --git a/virtualization/hyper-v-on-windows/tlfs/vp-properties.md b/virtualization/hyper-v-on-windows/tlfs/vp-properties.md index 5c062d84e..e37940900 100644 --- a/virtualization/hyper-v-on-windows/tlfs/vp-properties.md +++ b/virtualization/hyper-v-on-windows/tlfs/vp-properties.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Virtual Processors diff --git a/virtualization/hyper-v-on-windows/tlfs/vsm.md b/virtualization/hyper-v-on-windows/tlfs/vsm.md index 5c641f589..db80df9b8 100644 --- a/virtualization/hyper-v-on-windows/tlfs/vsm.md +++ b/virtualization/hyper-v-on-windows/tlfs/vsm.md @@ -6,6 +6,7 @@ author: alexgrest ms.author: hvdev ms.date: 10/15/2020 ms.topic: reference +ms.prod: windows-10-hyperv --- # Virtual Secure Mode @@ -310,9 +311,9 @@ This field can be set with bit 0 of the VTL return input. If it is set to 0, the ## Hypercall Page Assist -The hypervisor provides mechanisms to assist with VTL calls and returns via the [hypercall page](hypercall-interface.md#establishing-the-hypercall-interface). This page abstracts the specific code sequence required to switch VTLs. +The hypervisor provides mechanisms to assist with VTL calls and returns via the [hypercall page](hypercall-interface.md#establishing-the-hypercall-interface-x86x64). This page abstracts the specific code sequence required to switch VTLs. -The code sequences to execute VTL calls and returns may be accessed by executing specific instructions in the hypercall page. The call/return chunks are located at an offset in the hypercall page determined by the HvRegisterVsmCodePageOffset virtual register. This is a read-only and partition-wide register, with a separate instance per-VTL. +The code sequences to execute VTL calls and returns may be accessed by executing specific instructions in the hypercall page. The call/return chunks are located at an offset in the hypercall page determined by the HvRegisterVsmCodePageOffsets virtual register. This is a read-only and partition-wide register, with a separate instance per-VTL. A VTL can execute a VTL call/return using the CALL instruction. A CALL to the correct location in the hypercall page will initiate a VTL call/return. @@ -385,7 +386,7 @@ Apart from the traditional three memory protections (read, write, execute), MBEC | Read | Controls whether read access is allowed to a memory page | | Write | Controls whether write access allowed to a memory page | | User Mode Execute (UMX) | Controls whether instruction fetches generated in user-mode are allowed for a memory page. NOTE: If MBEC is disabled, this setting is ignored. | -| Kernel Mode Execute (UMX) | Controls whether instruction fetches generated in kernel-mode are allowed for a memory page. NOTE: If MBEC is disabled, this setting controls both user-mode and kernel-mode execute accesses. | +| Kernel Mode Execute (KMX) | Controls whether instruction fetches generated in kernel-mode are allowed for a memory page. NOTE: If MBEC is disabled, this setting controls both user-mode and kernel-mode execute accesses. | Memory marked with the “User-Mode Execute” protections would only be executable when the virtual processor is running in user-mode. Likewise, “Kernel-Mode Execute” memory would only be executable when the virtual processor is running in kernel-mode. @@ -402,7 +403,7 @@ Any user-mode code that accesses descriptor tables must be in GPA pages marked a To make use of Mode-based execution control, it must be enabled at two levels: 1. When the VTL is enabled for a partition, MBEC must be enabled using HvCallEnablePartitionVtl -2. MBEC must be configured on a per-VP and per-VTL basis, using HvRegisterVsmVpSecureVtlConfig. +2. MBEC must be configured on a per-VP and per-VTL basis, using HvRegisterVsmVpSecureConfigVtlX. #### MBEC Interaction with Supervisor Mode Execution Prevention (SMEP)