HvAssertVirtualInterrupt function

The HvAssertVirtualInterrupt function requests for a virtual interrupt to be presented to the specified virtual processors.

Syntax


HV_STATUS  HvAssertVirtualInterrupt(
  _In_  HV_PARTITION_ID DestinationPartition,
  _In_  HV_INTERRUPT_CONTROL InterruptControl,
  _In_  UINT64 DestinationAddress,
  _In_  HV_INTERRUPT_VECTOR RequestedVector
);

Parameters

DestinationPartition [in]

An HV_PARTITION_ID value that identifies the partition on which HvAssertVirtualInterrupt requests a virtual interrupt. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.

InterruptControl [in]

An HV_INTERRUPT_CONTROL union that describes the type of the virtual interrupt that should be asserted, the virtual interrupt's destination mode, and whether the virtual interrupt is edge- or level-triggered.

DestinationAddress [in]

A value that specifies the destination virtual processors. In case of physical destination mode, the destination address specifies the physical APIC identifier of the target virtual processor. In case of logical destination mode, the destination address specifies the logical APIC identifier of the set of target virtual processors. This value must be zero for external interrupt delivery mode where the interrupt request is always sent to the boot processor.

RequestedVector [in]

An HV_INTERRUPT_VECTOR value that specifies the interrupt vector. This value is used only for fixed, lowest-priority, external, and SIPI interrupt types. In all other cases, a vector of zero must be specified.

Return value

HvAssertVirtualInterrupt returns one of the following values. In addition to these values, HvAssertVirtualInterrupt can also return one of the values that are specified in Common Hypercall Status Codes.

Return codeDescription
HV_STATUS_SUCCESS

HvAssertVirtualInterrupt successfully asserted the specified virtual interrupt.

HV_STATUS_ACCESS_DENIED

The caller is not the parent of the specified partition.

HV_STATUS_INVALID_PARTITION_ID

The specified partition identifier is invalid.

HV_STATUS_INVALID_VP_INDEX

The virtual processor that was selected by the DestinationAddress parameter is not valid.

For interrupts of type HvX64InterruptTypeExtInt, the DestinationAddress was nonzero.

HV_STATUS_INVALID_PARAMETER

One of the following invalid parameter conditions exists:

  • One or more fields of the specified interrupt control are invalid or reserved bits within the interrupt control are set.

  • The specified destination address is invalid or is nonzero for an external interrupt type.

  • The specified vector is not within a valid range (0 to 255 inclusive or HV_INTERRUPT_VECTOR_NONE).

  • A nonzero vector is specified with an interrupt type that is not fixed, lowest-priority, external, or SIPI.

HV_STATUS_ACKNOWLEDGED

An external interrupt cannot be asserted because a previously-asserted external interrupt was acknowledged by the virtual processor and has not yet been cleared.

HV_STATUS_INVALID_PARTITION_STATE

The specified partition is not in the active state.

 

Remarks

If a caller calls HvAssertVirtualInterrupt twice in a row with the same interrupt type specified in the InterruptControl parameter, the following behavior of the calls depends on whether the first interrupt was acknowledged by the virtual processor before the second call is made.

  • If the first interrupt has already been acknowledged, the second call is treated as a new assertion.

  • If the first interrupt has not yet been acknowledged, the second call supersedes the previous assertion with the new vector. If the second call specifies the vector HV_INTERRUPT_VECTOR_NONE, the second call acts as a deassertion.

The behavior of the second call differs for interrupts of type HvX64InterruptTypeExtInt (which is identified in the InterruptType member of the HV_INTERRUPT_CONTROL union that the InterruptControl parameter specifies) in the following ways:

  • This interrupt type is always targeted at the boot processor. The boot processor is identified by a virtual processor index of zero. The DestinationAddress parameter must, therefore, be zero.

  • Calls to HvAssertVirtualInterrupt will fail if the interrupt asserted by a previous call has already been acknowledged by the processor. This acknowledgment must first be cleared by calling the HvClearVirtualInterrupt function. This is especially useful when implementing an external interrupt controller, such as the 8259 PIC. It prevents HvAssertVirtualInterrupt from overwriting the previous acknowledgment, which might need to be reported through the external interrupt controller.

HvAssertVirtualInterrupt has the following restrictions:

  • The partition that DestinationPartition specifies must be in the active state.

  • The caller must be the parent of the partition that is specified by DestinationPartition.

Native Interface

HvAssertVirtualInterrupt

Call Code = 0x0055

Input Parameters

0

DestinationPartition (8 bytes)

8

InterruptControl (8 bytes)

16

DestinationAddress (8 bytes)

24

RequestedVector (4 bytes) Padding (4 bytes)

 

Requirements

Version

HvAssertVirtualInterrupt is available in version 1.0 and later versions of the hypervisor.

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

See also

HV_INTERRUPT_CONTROL

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.