Maps a region in the virtual address space of the current task into the guest physical address space of the VM.
SDK
- macOS 10.10+
Framework
- Hypervisor
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
if the operation was successful, otherwise an error code specified in hv
.