1// Copyright 2018 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include <lib/zx/vcpu.h>
6
7#include <zircon/syscalls.h>
8
9namespace zx {
10
11zx_status_t vcpu::create(const guest& guest, uint32_t options,
12                         zx_gpaddr_t entry, vcpu* vcpu) {
13    // Assume |guest| and |vcpu| must refer to different containers, due to
14    // strict aliasing.
15    return zx_vcpu_create(guest.get(), options, entry,
16                          vcpu->reset_and_get_address());
17}
18
19} // namespace zx
20