Expand description
Hyper-V hypercall parsing.
This crate helps you implement handling for Hyper-V hypercalls issued by guest VMs. These are the hypercalls defined in the Hypervisor Top Level Functional Specification.
Besides providing parsing of the core hypercall ABI, it also provides Rust traits for each supported hypercall.
To use this crate, you provide access to the processor’s registers, and you
implement the trait corresponding to each hypercall you want to support.
Then you use the dispatcher macro to instantiate a dispatcher, and you
call Dispatcher::dispatch dispatch the hypercall.
Macros§
- dispatcher
- Creates a hypercall dispatcher, where the dispatcher can support any of the list of provided hypercalls.
Structs§
- Arm64
Register Io - An implementation of
HypercallIoon top ofArm64RegisterState. - Dispatcher
- Hypercall dispatcher.
- HvInterrupt
Parameters - Configuration for a hypervisor device interrupt.
- X64Register
Io - An implementation of
HypercallIoon X64 register state.
Enums§
- X64Hypercall
Register - An x64 GP register. This just contains the subset used in the hypercall ABI.
Traits§
- Accept
GpaPages - Implements the
HvAcceptGpaPageshypercall. - Arm64
Register State - Provides access to the ARM64 register state needed to parse hypercalls.
- AsHandler
- Trait for getting the handler from the
handlerparameter passed toDispatcher::dispatch. - Assert
Virtual Interrupt - Implements the
HvAssertVirtualInterrupthypercall. - Enable
Partition Vtl - Implements the
HvEnablePartitionVtlhypercall. - Enable
VpVtl - Implements the
HvEnableVpVtlhypercall. - Extended
Query Capabilities - Implements the
HvExtQueryCapabilitieshypercall. - Flush
Virtual Address List - Implements the
HvFlushVirtualAddressListhypercall. - Flush
Virtual Address List Ex - Implements the
HvFlushVirtualAddressListExhypercall. - Flush
Virtual Address Space - Implements the
HvFlushVirtualAddressSpacehypercall. - Flush
Virtual Address Space Ex - Implements the
HvFlushVirtualAddressSpaceExhypercall. - GetVp
Index From Apic Id - Implements the
HvGetVpIndexFromApicIdhypercall. - GetVp
Registers - Implements the
HvGetVpRegistershypercall. - Hypercall
Definition - A trait defined on dummy objects to provide metadata for a hypercall.
- Hypercall
Io - Provides input and output parameters for a hypercall.
- Install
Intercept - Implements the
HvInstallIntercepthypercall. - Modify
Sparse GpaPage Host Visibility - Implements the
HvModifySparseGpaPageHostVisibilityhypercall. - Modify
VtlProtection Mask - Implements the
HvModifyVtlProtectionMaskhypercall. - Post
Message - Implements the
HvPostMessagehypercall. - Post
Message Direct - Implements the
HvPostMessageDirecthypercall. - Query
Sparse GpaPage Host Visibility - Implements the
HvQuerySparseGpaPageHostVisibilityhypercall. - Retarget
Device Interrupt - Implements the
HvRetargetDeviceInterrupthypercall. - Send
Synthetic Cluster Ipi - Implements the
HvSendSyntheticClusterIpihypercall. - Send
Synthetic Cluster IpiEx - Implements the
HvSendSyntheticClusterIpihypercall. - SetVp
Registers - Implements the
HvSetVpRegistershypercall. - Signal
Event - Implements the
HvSignalEventhypercall. - Signal
Event Direct - Implements the
HvSignalEventDirecthypercall. - Start
Virtual Processor - Implements the
HvStartVirtualProcessorhypercall. - Translate
Virtual Address ExAarch64 - Implements the
HvTranslateVirtualAddressExhypercall. - Translate
Virtual Address ExX64 - Implements the
HvTranslateVirtualAddressExhypercall. - Translate
Virtual Address X64 - Implements the
HvTranslateVirtualAddresshypercall. - VbsVm
Call Report - Implements the
HvVbsVmCallReporthypercall. - VtlCall
- Implements the
HvVtlCallhypercall. - VtlReturn
- Implements the
HvVtlReturnhypercall. - VtlSwitch
Ops - Operations required to handle VTL switch hypercalls.
- X64Register
State - Register state access for x86/x64.
Type Aliases§
- HvAarch64
Translate Virtual Address Ex - Defines the
HvTranslateVirtualAddressExhypercall. - HvAccept
GpaPages - Defines the
HvAcceptGpaPageshypercall. - HvArm64
Enable VpVtl - Defines the
HvEnableVpVtlhypercall for arm64. - HvArm64
Start Virtual Processor - Defines the
HvStartVirtualProcessorhypercall for arm64. - HvAssert
Virtual Interrupt - Defines the
HvAssertVirtualInterrupthypercall. - HvEnable
Partition Vtl - Defines the
HvEnablePartitionVtlhypercall. - HvExt
Query Capabilities - Defines the
HvExtQueryCapabilitieshypercall. - HvFlush
Virtual Address List - Defines the
HvFlushVirtualAddressListhypercall. - HvFlush
Virtual Address List Ex - Defines the
HvFlushVirtualAddressListExhypercall. - HvFlush
Virtual Address Space - Defines the
HvFlushVirtualAddressSpacehypercall. - HvFlush
Virtual Address Space Ex - Defines the
HvFlushVirtualAddressSpaceExhypercall. - HvGet
VpIndex From Apic Id - Defines the
HvGetVpIndexFromApicIdhypercall. - HvGet
VpRegisters - Defines the
HvGetVpRegistershypercall. - HvInstall
Intercept - Defines the
HvInstallIntercepthypercall. - HvModify
Sparse GpaPage Host Visibility - Defines the
HvModifySparseGpaPageHostVisibilityhypercall. - HvModify
VtlProtection Mask - Defines the
HvModifyVtlProtectionMaskhypercall. - HvPost
Message - Defines the
HvPostMessagehypercall. - HvPost
Message Direct - Defines the
HvPostMessageDirecthypercall. - HvQuery
Sparse GpaPage Host Visibility - Defines the
HvQuerySparseGpaPageHostVisibilityhypercall. - HvRep
Result - Hypervisor result type for rep hypercalls. These hypercalls have either no or only rep output
data, which is passed separately from the result. The error is an a tuple consisting of an
HvErrorand the number of elements successfully processed prior to the error being returned. AnOkresult implies that all input elements were processed successfully. - HvRetarget
Device Interrupt - Defines the
HvRetargetDeviceInterrupthypercall. - HvSend
Synthetic Cluster Ipi - Defines the
HvSendSyntheticClusterIpihypercall. - HvSend
Synthetic Cluster IpiEx - Defines the
HvSendSyntheticClusterIpihypercall. - HvSet
VpRegisters - Defines the
HvSetVpRegistershypercall. - HvSignal
Event - Defines the
HvSignalEventhypercall. - HvSignal
Event Direct - Defines the
HvSignalEventDirecthypercall. - HvVbs
VmCall Report - Defines the
HvVbsVmCallReporthypercall. - HvVtl
Call - Defines the
HvVtlCallhypercall. - HvVtl
Return - Defines the
HvVtlReturnhypercall. - HvX64
Enable VpVtl - Defines the
HvEnableVpVtlhypercall for x64. - HvX64
Start Virtual Processor - Defines the
HvStartVirtualProcessorhypercall for x64. - HvX64
Translate Virtual Address - Defines the
HvTranslateVirtualAddresshypercall. - HvX64
Translate Virtual Address Ex - Defines the
HvTranslateVirtualAddressExhypercall.