WHvRequestInterrupt

파티션에 있는 하나 이상의 가상 프로세서에 인터럽트를 전달하도록 요청합니다.

문법

#if defined(_AMD64_)

typedef enum WHV_INTERRUPT_TYPE
{
    WHvX64InterruptTypeFixed            = 0,
    WHvX64InterruptTypeLowestPriority   = 1,
    WHvX64InterruptTypeNmi              = 4,
    WHvX64InterruptTypeInit             = 5,
    WHvX64InterruptTypeSipi             = 6,
    WHvX64InterruptTypeLocalInt1        = 9,
} WHV_INTERRUPT_TYPE;

typedef enum WHV_INTERRUPT_DESTINATION_MODE
{
    WHvX64InterruptDestinationModePhysical,
    WHvX64InterruptDestinationModeLogical,
} WHV_INTERRUPT_DESTINATION_MODE;

typedef enum WHV_INTERRUPT_TRIGGER_MODE
{
    WHvX64InterruptTriggerModeEdge,
    WHvX64InterruptTriggerModeLevel,
} WHV_INTERRUPT_TRIGGER_MODE;

typedef struct WHV_INTERRUPT_CONTROL
{
    UINT64 Type : 8;             // WHV_INTERRUPT_TYPE
    UINT64 DestinationMode : 4;  // WHV_INTERRUPT_DESTINATION_MODE
    UINT64 TriggerMode : 4;      // WHV_INTERRUPT_TRIGGER_MODE
    UINT64 TargetVtl : 8;        // WHV_VTL
    UINT64 Reserved : 40;
    UINT32 Destination;
    UINT32 Vector;
} WHV_INTERRUPT_CONTROL;

#elif defined(_ARM64_)

typedef enum WHV_INTERRUPT_TYPE
{
    WHvArm64InterruptTypeFixed             = 0x0000,

    //
    // Maximum (exclusive) value of interrupt type.
    //
    WHvArm64InterruptTypeMaximum           = 0x0008,
} WHV_INTERRUPT_TYPE;

typedef union WHV_INTERRUPT_CONTROL2
{
    UINT64 AsUINT64;
    struct
    {
        WHV_INTERRUPT_TYPE InterruptType;
        UINT32 Reserved1:2;
        UINT32 Asserted:1;
        UINT32 Retarget:1;
        UINT32 Reserved2:28;
    };
} WHV_INTERRUPT_CONTROL2;

typedef struct WHV_INTERRUPT_CONTROL
{
    UINT64                  TargetPartition;
    WHV_INTERRUPT_CONTROL2  InterruptControl;
    UINT64                  DestinationAddress;
    UINT32                  RequestedVector;
    UINT8                   TargetVtl;
    UINT8                   ReservedZ0;
    UINT16                  ReservedZ1;
} WHV_INTERRUPT_CONTROL;

#endif // defined(_ARCH_)

HRESULT
WINAPI
WHvRequestInterrupt(
    _In_ WHV_PARTITION_HANDLE Partition,
    _In_ const WHV_INTERRUPT_CONTROL* Interrupt,
    _In_ UINT32 InterruptControlSize
    );

Parameters

Partition

인터럽트할 파티션을 지정합니다.

Interrupt

인터럽트의 특성과 대상을 지정합니다.

InterruptControlSize

크기 Interrupt(바이트)를 지정합니다.

반환 값

함수가 성공하면 반환 값은 .입니다 S_OK.

Remarks

이 함수는 WHvRequestInterrupt 구조체에서 설명하는 WHV_INTERRUPT_CONTROL 인터럽트를 파티션에 전달하도록 요청합니다.

Requirements

요구 사항 Value
지원되는 최소 Windows Windows 10, 버전 1809(x64); Windows 11 버전 24H2, 빌드 26100.3915(Arm64)
Header WinHvPlatform.h
라이브러리 WinHvPlatform.lib
동적 링크 라이브러리 (DLL) WinHvPlatform.dll
아키텍처 x64, Arm64

참고하십시오