mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 12:35:26 +00:00
e1f8d9187d
Add arch-agnostic traits Vm and Vcpu. Add arch-specific traits HypervisorXXX, VmXXX, VcpuXXX, with impls for KVM. BUG=chromium:1077058 TEST=added test for functions and structs interacting with the traits Change-Id: I809f42f32a558c7835831c90e24fca82ce7744ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2176562 Reviewed-by: Udam Saini <udam@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Steven Richman <srichman@google.com>
21 lines
614 B
Rust
21 lines
614 B
Rust
// Copyright 2020 The Chromium OS Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#[path = "types.rs"]
|
|
mod types;
|
|
|
|
#[allow(unused_imports)]
|
|
use hypervisor::*;
|
|
pub use types::{HyperVm, RunnableLinuxVm};
|
|
|
|
// Inline cfg won't be needed in real code, but integration tests don't have conditional includes.
|
|
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
|
|
pub fn configure_vm<T, U, V>(_hypervm: &HyperVm<T, U, V>) -> RunnableLinuxVm
|
|
where
|
|
T: Hypervisor,
|
|
U: VmAArch64,
|
|
V: VcpuAArch64,
|
|
{
|
|
RunnableLinuxVm {}
|
|
}
|