Skip to content

NoirSetVirtualProcessorOptions

Zero Tang edited this page Nov 25, 2021 · 1 revision

Syntax

typedef enum _NOIR_CVM_VIRTUAL_PROCESSOR_OPTION_TYPE
{
	NoirCvmGuestVpOptions,
	NoirCvmExceptionBitmap,
	NoirCvmSchedulingPriority
}NOIR_CVM_VIRTUAL_PROCESSOR_OPTION_TYPE;*PNOIR_CVM_VIRTUAL_PROCESSOR_OPTION_TYPE;

NOIR_STATUS NoirSetVirtualProcessorOptions(IN CVM_HANDLE VirtualMachine,IN ULONG32 VpIndex,IN NOIR_CVM_VIRTUAL_PROCESSOR_OPTION_TYPE Type,IN ULONG32 Data)
Enum NoirCvmVirtualProcessorOptionType
    NoirCvmGuestVpOptions
    NoirCvmExceptionBitmap
    NoirCvmSchedulingPriority
End Enum

Declare Function NoirSetVirtualProcessorOptions Lib "NoirCvmApi.dll" (ByVal VirtualMachine As Long, ByVal VpIndex As UInteger, ByVal Type As NoirCvmVirtualProcessorOptionType, ByVal Data As UInteger)

Parameters

VirtualMachine

This parameter expects the handle of the virtual machine to which the virtual processor belongs.

VpIndex

This parameter expects the index of the virtual processor in the virtual machine.

Type

This parameter expects what type of option is to be set by User Hypervisor. See NoirCvmVirtualProcessorOptionType for further details.

Data

This parameter specifies the exact 32-bit option of the virtual processor.

Return Value

The NoirSetVirtualProcessorOptions function returns either NOIR_SUCCESS or an appropriate error status value.

Return Value Details
NOIR_SUCCESS The operation is completed successfully.
NOIR_UNSUCCESSFUL The library is not connected to the NoirVisor Driver. Either you did not initialize the library, or the NoirVisor driver is not loaded.
NOIR_HYPERVISION_ABSENT NoirVisor did not subvert the host system. Consult the NoirVisor loader.
NOIR_VCPU_NOT_EXIST The vCPU does not exist.

Remarks

The NoirSetVirtualProcessorOptions can set various options of a vCPU. Most options are debugging-purpose.