mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
allocator: Add a basic resource allocation crate
This is based on the crosvm resource allocator from commit 107edb3e. We only have PIO and MMIO address space to handle, and don't have a GPU specific path and space. Also, we support allocating a range at a specified address. This is mostly useful for PIO, but might be also necessary for MMIO. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
18
vm-allocator/src/lib.rs
Normal file
18
vm-allocator/src/lib.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright 2018 The Chromium OS Authors. All rights reserved.
|
||||
// Copyright © 2019 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Portions Copyright 2017 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 THIRD-PARTY file.
|
||||
|
||||
//! Manages system resources that can be allocated to VMs and their devices.
|
||||
|
||||
extern crate libc;
|
||||
extern crate vm_memory;
|
||||
|
||||
mod address;
|
||||
mod system;
|
||||
|
||||
pub use crate::address::AddressAllocator;
|
||||
pub use crate::system::SystemAllocator;
|
||||
Reference in New Issue
Block a user