blob: f8f60a7bc26058e32c43d780438639b56e747ebd [file] [log] [blame]
// 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 vcpu {
/// Create a VCPU.
/// Rights: guest must be of type ZX_OBJ_TYPE_GUEST and have ZX_RIGHT_MANAGE_PROCESS.
vcpu_create(resource struct {
guest handle:GUEST;
options uint32;
entry vaddr;
}) -> (resource struct {
status status;
out handle:VCPU;
});
// See port.fidl for definition of PortPacket.
/// Enter a VCPU, causing it to resume execution.
/// Rights: handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_EXECUTE.
@blocking
vcpu_enter(resource struct {
handle handle:VCPU;
}) -> (struct {
status status;
packet PortPacket;
});
/// Kick a VCPU, causing it to stop execution.
/// Rights: handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_EXECUTE.
vcpu_kick(resource struct {
handle handle:VCPU;
}) -> (struct {
status status;
});
/// Raise an interrupt on a VCPU.
/// Rights: handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_SIGNAL.
vcpu_interrupt(resource struct {
handle handle:VCPU;
vector uint32;
}) -> (struct {
status status;
});
/// Read the state of a VCPU.
/// Rights: handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_READ.
vcpu_read_state(resource struct {
handle handle:VCPU;
kind uint32;
}) -> (struct {
status status;
buffer vector_void;
});
/// Write the state of a VCPU.
/// Rights: handle must be of type ZX_OBJ_TYPE_VCPU and have ZX_RIGHT_WRITE.
vcpu_write_state(resource struct {
handle handle:VCPU;
kind uint32;
buffer vector_void;
}) -> (struct {
status status;
});
};