| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library zx; |
| |
| [Transport = "Syscall"] |
| protocol guest { |
| /// Create a guest. |
| /// Rights: resource must have resource kind ZX_RSRC_KIND_HYPERVISOR. |
| guest_create(handle:RESOURCE resource, uint32 options) |
| -> (status status, handle:GUEST guest_handle, handle:VMAR vmar_handle); |
| |
| /// Sets a trap within a guest. |
| /// Rights: handle must be of type ZX_OBJ_TYPE_GUEST and have ZX_RIGHT_WRITE. |
| /// Rights: port_handle must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE. |
| guest_set_trap(handle:GUEST handle, |
| uint32 kind, |
| vaddr addr, |
| usize size, |
| handle:PORT port_handle, |
| uint64 key) |
| -> (status status); |
| }; |