1# zx_vcpu_resume 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7vcpu_resume - resume execution of a VCPU 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15#include <zircon/syscalls/port.h> 16 17zx_status_t zx_vcpu_resume(zx_handle_t handle, zx_port_packet_t* packet); 18``` 19 20## DESCRIPTION 21 22`zx_vcpu_resume()` begins or resumes execution of *handle*, and blocks until it has 23paused execution. On pause of execution, *packet* is populated with reason for 24the pause. After handling the reason, execution may be resumed by calling 25`zx_vcpu_resume()` again. 26 27N.B. Execution of a *handle* must be resumed on the same thread it was created on. 28 29## RIGHTS 30 31<!-- Updated by update-docs-from-abigen, do not edit. --> 32 33*handle* must be of type **ZX_OBJ_TYPE_VCPU** and have **ZX_RIGHT_EXECUTE**. 34 35## RETURN VALUE 36 37`zx_vcpu_resume()` returns **ZX_OK** on success. On failure, an error value is 38returned. 39 40## ERRORS 41 42**ZX_ERR_ACCESS_DENIED** *handle* does not have the **ZX_RIGHT_EXECUTE** right. 43 44**ZX_ERR_BAD_HANDLE** *handle* is an invalid handle. 45 46**ZX_ERR_BAD_STATE** *handle* is in a bad state, and can not be executed. 47 48**ZX_ERR_CANCELED** *handle* execution was canceled while waiting on an event. 49 50**ZX_ERR_INTERNAL** There was an error executing *handle*. 51 52**ZX_ERR_INVALID_ARGS** *packet* is an invalid pointer. 53 54**ZX_ERR_NOT_SUPPORTED** An unsupported operation was encountered while 55executing *handle*. 56 57**ZX_ERR_WRONG_TYPE** *handle* is not a handle to a VCPU. 58 59## SEE ALSO 60 61 - [`zx_guest_create()`] 62 - [`zx_guest_set_trap()`] 63 - [`zx_vcpu_create()`] 64 - [`zx_vcpu_interrupt()`] 65 - [`zx_vcpu_read_state()`] 66 - [`zx_vcpu_write_state()`] 67 68<!-- References updated by update-docs-from-abigen, do not edit. --> 69 70[`zx_guest_create()`]: guest_create.md 71[`zx_guest_set_trap()`]: guest_set_trap.md 72[`zx_vcpu_create()`]: vcpu_create.md 73[`zx_vcpu_interrupt()`]: vcpu_interrupt.md 74[`zx_vcpu_read_state()`]: vcpu_read_state.md 75[`zx_vcpu_write_state()`]: vcpu_write_state.md 76