From 2e215f993a0bc63b43b5d947a81ce8b22ab2ef1d Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath <[email protected]> Date: Sat, 4 Jun 2022 12:16:14 +0530 Subject: [PATCH] headers: Add new APIs and symbols in hyperv headers
Signed-off-by: Biswapriyo Nath <[email protected]> --- mingw-w64-headers/include/computecore.h | 2 ++ mingw-w64-headers/include/computedefs.h | 21 +++++++++++++++++-- mingw-w64-headers/include/computenetwork.h | 2 ++ mingw-w64-headers/include/winhvplatformdefs.h | 6 ++++-- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/mingw-w64-headers/include/computecore.h b/mingw-w64-headers/include/computecore.h index e6d53a9..9183a35 100644 --- a/mingw-w64-headers/include/computecore.h +++ b/mingw-w64-headers/include/computecore.h @@ -23,6 +23,7 @@ extern "C" { HRESULT WINAPI HcsEnumerateComputeSystems (PCWSTR query, HCS_OPERATION operation); HRESULT WINAPI HcsEnumerateComputeSystemsInNamespace (PCWSTR idNamespace, PCWSTR query, HCS_OPERATION operation); HCS_OPERATION WINAPI HcsCreateOperation (const void *context, HCS_OPERATION_COMPLETION callback); +HCS_OPERATION WINAPI HcsCreateOperationWithNotifications (HCS_OPERATION_OPTIONS eventTypes, const void *context, HCS_EVENT_CALLBACK callback); void WINAPI HcsCloseOperation (HCS_OPERATION operation); void* WINAPI HcsGetOperationContext (HCS_OPERATION operation); HRESULT WINAPI HcsSetOperationContext (HCS_OPERATION operation, const void *context); @@ -32,6 +33,7 @@ HCS_OPERATION_TYPE WINAPI HcsGetOperationType (HCS_OPERATION operation); UINT64 WINAPI HcsGetOperationId (HCS_OPERATION operation); HRESULT WINAPI HcsGetOperationResult (HCS_OPERATION operation, PWSTR *resultDocument); HRESULT WINAPI HcsGetOperationResultAndProcessInfo (HCS_OPERATION operation, HCS_PROCESS_INFORMATION *processInformation, PWSTR *resultDocument); +HRESULT WINAPI HcsAddResourceToOperation (HCS_OPERATION operation, HCS_RESOURCE_TYPE type, PCWSTR uri, HANDLE handle); HRESULT WINAPI HcsGetProcessorCompatibilityFromSavedState (PCWSTR RuntimeFileName, PCWSTR *ProcessorFeaturesString); HRESULT WINAPI HcsWaitForOperationResult (HCS_OPERATION operation, DWORD timeoutMs, PWSTR *resultDocument); HRESULT WINAPI HcsWaitForOperationResultAndProcessInfo (HCS_OPERATION operation, DWORD timeoutMs, HCS_PROCESS_INFORMATION *processInformation, PWSTR *resultDocument); diff --git a/mingw-w64-headers/include/computedefs.h b/mingw-w64-headers/include/computedefs.h index 0847e8e..a4151f0 100644 --- a/mingw-w64-headers/include/computedefs.h +++ b/mingw-w64-headers/include/computedefs.h @@ -46,7 +46,9 @@ typedef enum HCS_EVENT_TYPE { HcsEventSystemGuestConnectionClosed = 0x00000006, HcsEventProcessExited = 0x00010000, HcsEventOperationCallback = 0x01000000, - HcsEventServiceDisconnect = 0x02000000 + HcsEventServiceDisconnect = 0x02000000, + HcsEventGroupVmLifecycle = 0x80000002, + HcsEventGroupOperationInfo = 0xC0000001 } HCS_EVENT_TYPE; typedef struct HCS_EVENT { @@ -57,13 +59,27 @@ typedef struct HCS_EVENT { typedef enum HCS_EVENT_OPTIONS { HcsEventOptionNone = 0x00000000, - HcsEventOptionEnableOperationCallbacks = 0x00000001 + HcsEventOptionEnableOperationCallbacks = 0x00000001, + HcsEventOptionEnableVmLifecycle = 0x00000002 } HCS_EVENT_OPTIONS; DEFINE_ENUM_FLAG_OPERATORS(HCS_EVENT_OPTIONS); +typedef enum HCS_OPERATION_OPTIONS { + HcsOperationOptionNone = 0x00000000, + HcsOperationOptionProgressUpdate = 0x00000001 +} HCS_OPERATION_OPTIONS; + +DEFINE_ENUM_FLAG_OPERATORS(HCS_OPERATION_OPTIONS); + typedef void (CALLBACK *HCS_EVENT_CALLBACK)(HCS_EVENT *event, void *context); +typedef enum HCS_RESOURCE_TYPE { + HcsResourceTypeNone = 0, + HcsResourceTypeFile = 1, + HcsResourceTypeJob = 2 +} HCS_RESOURCE_TYPE; + typedef enum HCS_NOTIFICATION_FLAGS { HcsNotificationFlagSuccess = 0x00000000, HcsNotificationFlagFailure = 0x80000000 @@ -88,6 +104,7 @@ typedef enum HCS_NOTIFICATIONS { HcsNotificationSystemGuestConnectionClosed = 0x0000000E, HcsNotificationSystemOperationCompletion = 0x0000000F, HcsNotificationSystemPassThru = 0x00000010, + HcsNotificationOperationProgressUpdate = 0x00000100, HcsNotificationProcessExited = 0x00010000, HcsNotificationServiceDisconnect = 0x01000000, HcsNotificationFlagsReserved = 0xF0000000 diff --git a/mingw-w64-headers/include/computenetwork.h b/mingw-w64-headers/include/computenetwork.h index 3fc8080..4a69514 100644 --- a/mingw-w64-headers/include/computenetwork.h +++ b/mingw-w64-headers/include/computenetwork.h @@ -132,6 +132,8 @@ HRESULT WINAPI HcnReserveGuestNetworkServicePortRange (HCN_GUESTNETWORKSERVICE G HRESULT WINAPI HcnReleaseGuestNetworkServicePortReservationHandle (HANDLE PortReservationHandle); HRESULT WINAPI HcnEnumerateGuestNetworkPortReservations (ULONG* ReturnCount, HCN_PORT_RANGE_ENTRY** PortEntries); VOID WINAPI HcnFreeGuestNetworkPortReservations (HCN_PORT_RANGE_ENTRY* PortEntries); +HRESULT WINAPI HcnQueryEndpointStats (HCN_ENDPOINT Endpoint, PCWSTR Query, PWSTR *Stats, PWSTR *ErrorRecord); +HRESULT WINAPI HcnQueryEndpointAddresses (HCN_ENDPOINT Endpoint, PCWSTR Query, PWSTR *Addresses, PWSTR *ErrorRecord); #ifdef __cplusplus } diff --git a/mingw-w64-headers/include/winhvplatformdefs.h b/mingw-w64-headers/include/winhvplatformdefs.h index ba18cfe..6f06f86 100644 --- a/mingw-w64-headers/include/winhvplatformdefs.h +++ b/mingw-w64-headers/include/winhvplatformdefs.h @@ -169,7 +169,8 @@ typedef union WHV_PROCESSOR_FEATURES1 { UINT64 FZLRepMovsb : 1; UINT64 FSRepStosb : 1; UINT64 FSRepCmpsb : 1; - UINT64 Reserved5 : 42; + UINT64 TsxLdTrkSupport : 1; + UINT64 Reserved5 : 41; }; UINT64 AsUINT64; } WHV_PROCESSOR_FEATURES1; @@ -978,7 +979,8 @@ typedef union WHV_X64_DELIVERABILITY_NOTIFICATIONS_REGISTER { UINT64 NmiNotification:1; UINT64 InterruptNotification:1; UINT64 InterruptPriority:4; - UINT64 Reserved:58; + UINT64 Reserved:42; + UINT64 Sint:16; }; UINT64 AsUINT64; } WHV_X64_DELIVERABILITY_NOTIFICATIONS_REGISTER; -- 2.36.1
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
