hsXenCtrl-0.0.7: FFI bindings to the Xen Control library.Source codeContentsIndex
System.Xen.CBindings
Synopsis
xc_interface_open :: IO CInt
xc_interface_close :: XCHandle -> IO CInt
xc_find_device_number :: CString -> IO CInt
xc_domain_create :: XCHandle -> Word32 -> XenDomainHandleT -> Word32 -> Ptr Word32 -> IO CInt
xc_domain_dumpcore :: XCHandle -> DomId -> CString -> IO CInt
xc_domain_dumpcore_via_callback :: XCHandle -> DomId -> Ptr Word8 -> FunPtr Dumpcore_rtn_t -> IO CInt
xc_domain_max_vcpus :: XCHandle -> DomId -> CUInt -> IO CInt
xc_domain_pause :: XCHandle -> DomId -> IO CInt
xc_domain_unpause :: XCHandle -> DomId -> IO CInt
xc_domain_destroy :: XCHandle -> DomId -> IO CInt
xc_domain_resume :: XCHandle -> DomId -> CInt -> IO CInt
xc_domain_shutdown :: XCHandle -> DomId -> CInt -> IO CInt
xc_vcpu_setaffinity :: XCHandle -> DomId -> CInt -> Word64 -> IO CInt
xc_vcpu_getaffinity :: XCHandle -> DomId -> CInt -> Ptr Word64 -> IO CInt
xc_domain_getinfo :: XCHandle -> DomId -> CUInt -> Ptr XCDomInfo -> IO CInt
xc_domain_getinfolist :: XCHandle -> DomId -> CUInt -> Ptr XCDomInfo -> CInt
xc_domain_hvm_getcontext :: XCHandle -> DomId -> Ptr Word8 -> Word32 -> IO CInt
xc_domain_hvm_setcontext :: XCHandle -> DomId -> Ptr Word8 -> Word32 -> IO CInt
xc_domain_setcpuweight :: XCHandle -> DomId -> CFloat -> IO CInt
xc_domain_get_cpu_usage :: XCHandle -> DomId -> CInt -> IO CLLong
xc_domain_sethandle :: XCHandle -> DomId -> XenDomainHandleT -> IO CInt
xc_sedf_domain_set :: XCHandle -> DomId -> Word64 -> Word64 -> Word64 -> Word16 -> Word16 -> IO CInt
xc_sedf_domain_get :: XCHandle -> DomId -> Ptr Word64 -> Ptr Word64 -> Ptr Word64 -> Ptr Word16 -> Ptr Word16 -> IO CInt
xc_domain_send_trigger :: XCHandle -> DomId -> Word32 -> Word32 -> IO CInt
xc_vcpu_getinfo :: XCHandle -> DomId -> Word32 -> Ptr VCPUInfo -> IO CInt
data VCPUInfo = VCPUInfo {
viVCPU :: Word32
viOnline :: Word8
viBlocked :: Word8
viRunning :: Word8
viCPUTime :: Word64
viCPU :: Word32
}
xc_evtchn_alloc_unbound :: XCHandle -> DomId -> DomId -> IO EventChanPortOrError
xc_evtchn_reset :: XCHandle -> DomId -> IO CInt
xc_evtchn_open :: IO CInt
xc_evtchn_close :: XCEHandle -> IO CInt
xc_evtchn_fd :: CInt -> IO CInt
xc_evtchn_notify :: XCEHandle -> EventChannelPort -> IO CInt
xc_evtchn_bind_unbound_port :: XCEHandle -> DomId -> IO EventChanPortOrError
xc_evtchn_bind_interdomain :: XCEHandle -> DomId -> EventChannelPort -> IO EventChanPortOrError
xc_evtchn_bind_virq :: XCEHandle -> CUInt -> IO EventChanPortOrError
xc_evtchn_unbind :: XCEHandle -> EventChannelPort -> IO CInt
xc_evtchn_pending :: XCEHandle -> IO EventChanPortOrError
xc_evtchn_unmask :: XCEHandle -> EventChannelPort -> IO CInt
xc_physdev_pci_access_modify :: XCHandle -> DomId -> Bus -> Dev -> Function -> Enable -> IO CInt
xc_readconsolering :: XCHandle -> Ptr CString -> Ptr CUInt -> CInt -> IO CInt
xc_send_debug_keys :: XCHandle -> CString -> IO CInt
xc_physinfo :: XCHandle -> Ptr XCPhysInfo -> IO CInt
xc_sched_id :: XCHandle -> Ptr CInt -> IO CInt
xc_getcpuinfo :: XCHandle -> CInt -> Ptr XCCPUInfo -> Ptr CInt -> IO CInt
xc_domain_setmaxmem :: XCHandle -> DomId -> CUInt -> IO CInt
xc_domain_set_memmap_limit :: XCHandle -> DomId -> CULong -> IO CInt
xc_domain_set_time_offset :: XCHandle -> DomId -> Int32 -> IO CInt
xc_domain_memory_increase_reservation :: XCHandle -> DomId -> CULong -> CUInt -> CUInt -> Ptr XenPFN -> IO CInt
xc_domain_memory_decrease_reservation :: XCHandle -> DomId -> CULong -> CUInt -> Ptr XenPFN -> IO CInt
xc_domain_memory_populate_physmap :: XCHandle -> DomId -> CULong -> CUInt -> CUInt -> Ptr XenPFN -> IO CInt
xc_domain_ioport_permission :: XCHandle -> DomId -> Word32 -> Word32 -> Word32 -> IO CInt
xc_domain_irq_permission :: XCHandle -> DomId -> Word8 -> Word8 -> IO CInt
xc_make_page_below_4G :: XCHandle -> DomId -> CULong -> IO CULong
xc_perfc_control :: XCHandle -> PerfcOp -> Ptr XCperfcDesc -> Ptr XCperfcVal -> Ptr CInt -> Ptr CInt -> IO CInt
xc_map_foreign_range :: XCHandle -> DomId -> CInt -> MemoryProtectionFlags -> CULong -> IO ()
xc_map_foreign_batch :: XCHandle -> DomId -> MemoryProtectionFlags -> Ptr XenPFN -> CInt -> IO ()
xc_translate_foreign_address :: XCHandle -> DomId -> CInt -> CULLong -> IO CULong
xc_get_pfn_list :: XCHandle -> DomId -> Ptr Word64 -> CULong -> IO CInt
xc_copy_to_domain_page :: XCHandle -> DomId -> CULong -> CString -> IO CInt
xc_clear_domain_page :: XCHandle -> DomId -> CULong -> IO CInt
xc_mmuext_op :: XCHandle -> Ptr MMUExtOp -> CUInt -> DomId -> IO CInt
xc_memory_op :: XCHandle -> CInt -> Ptr () -> IO CInt
xc_get_pfn_type_batch :: XCHandle -> DomId -> CInt -> Ptr Word32 -> IO CInt
xc_get_tot_pages :: XCHandle -> DomId -> IO CLong
xc_tbuf_enable :: XCHandle -> CULong -> Ptr CULong -> Ptr CULong -> IO CInt
xc_tbuf_disable :: XCHandle -> IO CInt
xc_tbuf_get_size :: XCHandle -> Ptr CULong -> IO CInt
xc_tbuf_set_cpu_mask :: XCHandle -> Word32 -> IO CInt
xc_tbuf_set_evt_mask :: XCHandle -> Word32 -> IO CInt
xc_domctl :: XCHandle -> Ptr XenDomCtl -> IO CInt
xc_sysctl :: XCHandle -> Ptr XenSysCtl -> IO CInt
xc_version :: XCHandle -> CInt -> Ptr () -> IO CInt
xc_acm_op :: XCHandle -> CInt -> Ptr () -> CULong -> IO CInt
newtype GTHandle = GTHandle CInt
xc_gnttab_open :: IO CInt
xc_gnttab_close :: GTHandle -> IO CInt
xc_gnttab_map_grant_ref :: GTHandle -> DomId -> Word32 -> CInt -> IO (Ptr a)
xc_gnttab_map_grant_refs :: GTHandle -> Word32 -> Ptr Word32 -> Ptr Word32 -> CInt -> IO (Ptr a)
xc_gnttab_munmap :: GTHandle -> Ptr a -> Word32 -> IO CInt
type DomId_t = Word16
xc_hvm_set_pci_intx_level :: XCHandle -> DomId_t -> Word8 -> Word8 -> Word8 -> Word8 -> CUInt -> IO CInt
xc_hvm_set_isa_irq_level :: XCHandle -> DomId_t -> Word8 -> CUInt -> IO CInt
xc_hvm_set_pci_link_route :: XCHandle -> DomId_t -> Word8 -> Word8 -> IO CInt
data XCErrorCode
= XCErrorNone
| XCInternalError
| XCInvalidKernel
| XCInvalidParam
| XCOutOfMemory
xcMaxErrorMsgLen :: Integer
data XCError = XCError {
xceCode :: XCErrorCode
xceMsg :: ByteString
}
xc_get_last_error :: IO (Ptr XCError)
xc_clear_last_error :: IO ()
type XCErrorHandler = FunPtr (XCError -> IO ())
xc_default_error_handler :: Ptr XCErrorHandler -> IO ()
xc_error_code_to_desc :: XCErrorCode -> IO CString
xc_set_error_handler :: XCErrorHandler -> IO XCErrorHandler
xc_set_hvm_param :: XCHandle -> DomId_t -> CInt -> CULong -> IO CInt
xc_get_hvm_param :: XCHandle -> DomId_t -> CInt -> Ptr CULong -> IO CInt
xc_CORE_MAGIC :: CInt
xc_CORE_MAGIC_HVM :: CInt
newtype DomId = DomId Word32
newtype XCHandle = XCHdl CInt
data XCShutdown
= SHUTDOWN_poweroff
| SHUTDOWN_reboot
| SHUTDOWN_suspend
| SHUTDOWN_crash
data XCDomInfo
type EventChanPortOrError = CInt
type Dumpcore_rtn_t = Ptr Word8 -> CString -> CUInt -> IO CInt
newtype XCEHandle = XCEHandle CInt
newtype EventChannelPort = ECPort Word32
data XCPhysInfo = XCPhysInfo {
piThreadsPerCore :: Word32
piCoresPerSocket :: Word32
piNrCPUs :: Word32
piNrNodes :: Word32
piCPUkhz :: Word32
piTotalPages :: Word64
piFreePages :: Word64
piScrubPages :: Word64
piHWCap :: [Word32]
}
data XCCPUInfo = XCCPUInfo {
ciIdleTime :: Word64
}
data XCperfcDesc = XCperfcDesc ByteString Word32
type XCperfcVal = Word32
type XenPFN = CULong
type PerfcOp = Word32
perfcOpReset :: Integer
perfcOpQuery :: Integer
type MemoryProtectionFlags = CInt
data MMUExtOp = MMUExtOp {
opCmd :: CUInt
opArg1 :: Either XenPFN CULong
opArg2 :: Either CUInt (Ptr ())
}
type XenDomainHandleT = Ptr Word8
Documentation
xc_interface_open :: IO CIntSource
xc_interface_close :: XCHandle -> IO CIntSource
xc_find_device_number :: CString -> IO CIntSource
xc_domain_create :: XCHandle -> Word32 -> XenDomainHandleT -> Word32 -> Ptr Word32 -> IO CIntSource
xc_domain_dumpcore :: XCHandle -> DomId -> CString -> IO CIntSource
xc_domain_dumpcore_via_callback :: XCHandle -> DomId -> Ptr Word8 -> FunPtr Dumpcore_rtn_t -> IO CIntSource
xc_domain_max_vcpus :: XCHandle -> DomId -> CUInt -> IO CIntSource
xc_domain_pause :: XCHandle -> DomId -> IO CIntSource
xc_domain_unpause :: XCHandle -> DomId -> IO CIntSource
xc_domain_destroy :: XCHandle -> DomId -> IO CIntSource
xc_domain_resume :: XCHandle -> DomId -> CInt -> IO CIntSource
xc_domain_shutdown :: XCHandle -> DomId -> CInt -> IO CIntSource
xc_vcpu_setaffinity :: XCHandle -> DomId -> CInt -> Word64 -> IO CIntSource
xc_vcpu_getaffinity :: XCHandle -> DomId -> CInt -> Ptr Word64 -> IO CIntSource
xc_domain_getinfo :: XCHandle -> DomId -> CUInt -> Ptr XCDomInfo -> IO CIntSource
xc_domain_getinfolist :: XCHandle -> DomId -> CUInt -> Ptr XCDomInfo -> CIntSource
xc_domain_hvm_getcontext :: XCHandle -> DomId -> Ptr Word8 -> Word32 -> IO CIntSource
xc_domain_hvm_setcontext :: XCHandle -> DomId -> Ptr Word8 -> Word32 -> IO CIntSource
xc_domain_setcpuweight :: XCHandle -> DomId -> CFloat -> IO CIntSource
xc_domain_get_cpu_usage :: XCHandle -> DomId -> CInt -> IO CLLongSource
xc_domain_sethandle :: XCHandle -> DomId -> XenDomainHandleT -> IO CIntSource
xc_sedf_domain_set :: XCHandle -> DomId -> Word64 -> Word64 -> Word64 -> Word16 -> Word16 -> IO CIntSource
xc_sedf_domain_get :: XCHandle -> DomId -> Ptr Word64 -> Ptr Word64 -> Ptr Word64 -> Ptr Word16 -> Ptr Word16 -> IO CIntSource
xc_domain_send_trigger :: XCHandle -> DomId -> Word32 -> Word32 -> IO CIntSource
xc_vcpu_getinfo :: XCHandle -> DomId -> Word32 -> Ptr VCPUInfo -> IO CIntSource
data VCPUInfo Source
Constructors
VCPUInfo
viVCPU :: Word32
viOnline :: Word8
viBlocked :: Word8
viRunning :: Word8
viCPUTime :: Word64
viCPU :: Word32
show/hide Instances
xc_evtchn_alloc_unbound :: XCHandle -> DomId -> DomId -> IO EventChanPortOrErrorSource
xc_evtchn_reset :: XCHandle -> DomId -> IO CIntSource
xc_evtchn_open :: IO CIntSource
xc_evtchn_close :: XCEHandle -> IO CIntSource
xc_evtchn_fd :: CInt -> IO CIntSource
xc_evtchn_notify :: XCEHandle -> EventChannelPort -> IO CIntSource
xc_evtchn_bind_unbound_port :: XCEHandle -> DomId -> IO EventChanPortOrErrorSource
xc_evtchn_bind_interdomain :: XCEHandle -> DomId -> EventChannelPort -> IO EventChanPortOrErrorSource
xc_evtchn_bind_virq :: XCEHandle -> CUInt -> IO EventChanPortOrErrorSource
xc_evtchn_unbind :: XCEHandle -> EventChannelPort -> IO CIntSource
xc_evtchn_pending :: XCEHandle -> IO EventChanPortOrErrorSource
xc_evtchn_unmask :: XCEHandle -> EventChannelPort -> IO CIntSource
xc_physdev_pci_access_modify :: XCHandle -> DomId -> Bus -> Dev -> Function -> Enable -> IO CIntSource
xc_readconsolering :: XCHandle -> Ptr CString -> Ptr CUInt -> CInt -> IO CIntSource
xc_send_debug_keys :: XCHandle -> CString -> IO CIntSource
xc_physinfo :: XCHandle -> Ptr XCPhysInfo -> IO CIntSource
xc_sched_id :: XCHandle -> Ptr CInt -> IO CIntSource
xc_getcpuinfo :: XCHandle -> CInt -> Ptr XCCPUInfo -> Ptr CInt -> IO CIntSource
xc_domain_setmaxmem :: XCHandle -> DomId -> CUInt -> IO CIntSource
xc_domain_set_memmap_limit :: XCHandle -> DomId -> CULong -> IO CIntSource
xc_domain_set_time_offset :: XCHandle -> DomId -> Int32 -> IO CIntSource
xc_domain_memory_increase_reservation :: XCHandle -> DomId -> CULong -> CUInt -> CUInt -> Ptr XenPFN -> IO CIntSource
xc_domain_memory_decrease_reservation :: XCHandle -> DomId -> CULong -> CUInt -> Ptr XenPFN -> IO CIntSource
xc_domain_memory_populate_physmap :: XCHandle -> DomId -> CULong -> CUInt -> CUInt -> Ptr XenPFN -> IO CIntSource
xc_domain_ioport_permission :: XCHandle -> DomId -> Word32 -> Word32 -> Word32 -> IO CIntSource
xc_domain_irq_permission :: XCHandle -> DomId -> Word8 -> Word8 -> IO CIntSource
xc_make_page_below_4G :: XCHandle -> DomId -> CULong -> IO CULongSource
xc_perfc_control :: XCHandle -> PerfcOp -> Ptr XCperfcDesc -> Ptr XCperfcVal -> Ptr CInt -> Ptr CInt -> IO CIntSource
Must mlock() the XCperfc data structures after poking and before calling this function.
xc_map_foreign_range :: XCHandle -> DomId -> CInt -> MemoryProtectionFlags -> CULong -> IO ()Source
xc_map_foreign_batch :: XCHandle -> DomId -> MemoryProtectionFlags -> Ptr XenPFN -> CInt -> IO ()Source
xc_translate_foreign_address :: XCHandle -> DomId -> CInt -> CULLong -> IO CULongSource
xc_get_pfn_list :: XCHandle -> DomId -> Ptr Word64 -> CULong -> IO CIntSource
xc_copy_to_domain_page :: XCHandle -> DomId -> CULong -> CString -> IO CIntSource
xc_clear_domain_page :: XCHandle -> DomId -> CULong -> IO CIntSource
xc_mmuext_op :: XCHandle -> Ptr MMUExtOp -> CUInt -> DomId -> IO CIntSource
xc_memory_op :: XCHandle -> CInt -> Ptr () -> IO CIntSource
xc_get_pfn_type_batch :: XCHandle -> DomId -> CInt -> Ptr Word32 -> IO CIntSource
xc_get_tot_pages :: XCHandle -> DomId -> IO CLongSource
xc_tbuf_enable :: XCHandle -> CULong -> Ptr CULong -> Ptr CULong -> IO CIntSource
xc_tbuf_disable :: XCHandle -> IO CIntSource
xc_tbuf_get_size :: XCHandle -> Ptr CULong -> IO CIntSource
xc_tbuf_set_cpu_mask :: XCHandle -> Word32 -> IO CIntSource
xc_tbuf_set_evt_mask :: XCHandle -> Word32 -> IO CIntSource
xc_domctl :: XCHandle -> Ptr XenDomCtl -> IO CIntSource
xc_sysctl :: XCHandle -> Ptr XenSysCtl -> IO CIntSource
xc_version :: XCHandle -> CInt -> Ptr () -> IO CIntSource
xc_acm_op :: XCHandle -> CInt -> Ptr () -> CULong -> IO CIntSource
newtype GTHandle Source
Constructors
GTHandle CInt
show/hide Instances
xc_gnttab_open :: IO CIntSource
xc_gnttab_close :: GTHandle -> IO CIntSource
xc_gnttab_map_grant_ref :: GTHandle -> DomId -> Word32 -> CInt -> IO (Ptr a)Source
xc_gnttab_map_grant_refs :: GTHandle -> Word32 -> Ptr Word32 -> Ptr Word32 -> CInt -> IO (Ptr a)Source
xc_gnttab_munmap :: GTHandle -> Ptr a -> Word32 -> IO CIntSource
type DomId_t = Word16Source
xc_hvm_set_pci_intx_level :: XCHandle -> DomId_t -> Word8 -> Word8 -> Word8 -> Word8 -> CUInt -> IO CIntSource
xc_hvm_set_isa_irq_level :: XCHandle -> DomId_t -> Word8 -> CUInt -> IO CIntSource
xc_hvm_set_pci_link_route :: XCHandle -> DomId_t -> Word8 -> Word8 -> IO CIntSource
data XCErrorCode Source
Constructors
XCErrorNone
XCInternalError
XCInvalidKernel
XCInvalidParam
XCOutOfMemory
show/hide Instances
xcMaxErrorMsgLen :: IntegerSource
data XCError Source
Constructors
XCError
xceCode :: XCErrorCode
xceMsg :: ByteString
show/hide Instances
xc_get_last_error :: IO (Ptr XCError)Source
xc_clear_last_error :: IO ()Source
type XCErrorHandler = FunPtr (XCError -> IO ())Source
xc_default_error_handler :: Ptr XCErrorHandler -> IO ()Source
xc_error_code_to_desc :: XCErrorCode -> IO CStringSource
xc_set_error_handler :: XCErrorHandler -> IO XCErrorHandlerSource
xc_set_hvm_param :: XCHandle -> DomId_t -> CInt -> CULong -> IO CIntSource
xc_get_hvm_param :: XCHandle -> DomId_t -> CInt -> Ptr CULong -> IO CIntSource
xc_CORE_MAGIC :: CIntSource
xc_CORE_MAGIC_HVM :: CIntSource
newtype DomId Source
DomId identifies the Xen VM
Constructors
DomId Word32
show/hide Instances
newtype XCHandle Source
Xen Control Handle identifies the IO channel through which must functions will pass their messages.
Constructors
XCHdl CInt
show/hide Instances
data XCShutdown Source
SHUTDOWN constants matching those found in xen/sched.h
Constructors
SHUTDOWN_poweroff
SHUTDOWN_reboot
SHUTDOWN_suspend
SHUTDOWN_crash
show/hide Instances
data XCDomInfo Source
show/hide Instances
type EventChanPortOrError = CIntSource
type Dumpcore_rtn_t = Ptr Word8 -> CString -> CUInt -> IO CIntSource
newtype XCEHandle Source
Constructors
XCEHandle CInt
show/hide Instances
newtype EventChannelPort Source
Constructors
ECPort Word32
show/hide Instances
data XCPhysInfo Source
Constructors
XCPhysInfo
piThreadsPerCore :: Word32
piCoresPerSocket :: Word32
piNrCPUs :: Word32
piNrNodes :: Word32
piCPUkhz :: Word32
piTotalPages :: Word64
piFreePages :: Word64
piScrubPages :: Word64
piHWCap :: [Word32]
show/hide Instances
data XCCPUInfo Source
Constructors
XCCPUInfo
ciIdleTime :: Word64
show/hide Instances
data XCperfcDesc Source
Constructors
XCperfcDesc ByteString Word32
show/hide Instances
type XCperfcVal = Word32Source
type XenPFN = CULongSource
type PerfcOp = Word32Source
perfcOpReset :: IntegerSource
perfcOpQuery :: IntegerSource
type MemoryProtectionFlags = CIntSource
data MMUExtOp Source
The user of MMUExtOp must perform their own marshaling operations, note the lack of a Storable instance.
Constructors
MMUExtOp
opCmd :: CUInt
opArg1 :: Either XenPFN CULong
opArg2 :: Either CUInt (Ptr ())
show/hide Instances
type XenDomainHandleT = Ptr Word8Source
Produced by Haddock version 2.6.0