Function

hv_vm_map(_:_:_:_:)

Maps a region in the virtual address space of the current task into the guest physical address space of the VM.

Declaration

func hv_vm_map(_ uva: hv_uvaddr_t!, _ gpa: hv_gpaddr_t, _ size: Int, _ flags: hv_memory_flags_t) -> hv_return_t

Parameters

uva

The page-aligned virtual address in the current task.

gpa

The page-aligned address in the guest physical address space.

size

The size of the region to be mapped, in bytes.

flags

The permissions for the mapped region. For a list of valid options, see hv_memory_flags_t.

Return Value

HV_SUCCESS if the operation was successful, otherwise an error code specified in hv_return_t.

See Also

Managing Memory Regions

func hv_vm_unmap(hv_gpaddr_t, Int) -> hv_return_t

Unmaps a region in the guest physical address space of the VM.

func hv_vm_protect(hv_gpaddr_t, Int, hv_memory_flags_t) -> hv_return_t

Modifies the permissions of a region in the guest physical address space of the VM.