2019-03-07 13:56:43 +00:00
|
|
|
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
// 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
|
2019-05-08 10:22:53 +00:00
|
|
|
// found in the LICENSE-BSD-3-Clause file.
|
2019-03-07 13:56:43 +00:00
|
|
|
|
|
|
|
//! Emulates virtual and hardware devices.
|
2019-12-12 01:36:13 +00:00
|
|
|
extern crate anyhow;
|
2020-01-14 10:17:23 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate bitflags;
|
2019-03-07 13:56:43 +00:00
|
|
|
extern crate byteorder;
|
|
|
|
extern crate epoll;
|
|
|
|
extern crate libc;
|
2019-06-12 08:12:45 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
2020-02-25 07:20:59 +00:00
|
|
|
#[cfg(feature = "acpi")]
|
|
|
|
extern crate acpi_tables;
|
2019-12-12 01:36:13 +00:00
|
|
|
extern crate serde;
|
2020-01-20 14:28:58 +00:00
|
|
|
extern crate vm_device;
|
2019-03-07 13:56:43 +00:00
|
|
|
extern crate vm_memory;
|
2019-12-12 01:36:13 +00:00
|
|
|
extern crate vm_migration;
|
2019-03-07 13:56:43 +00:00
|
|
|
extern crate vmm_sys_util;
|
2019-12-12 01:36:13 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate serde_derive;
|
|
|
|
extern crate serde_json;
|
2019-03-07 13:56:43 +00:00
|
|
|
|
2019-09-03 13:54:06 +00:00
|
|
|
#[cfg(feature = "acpi")]
|
2019-08-29 13:58:25 +00:00
|
|
|
mod acpi;
|
2020-05-25 08:59:09 +00:00
|
|
|
#[cfg(target_arch = "aarch64")]
|
|
|
|
pub mod gic;
|
2020-05-25 08:27:08 +00:00
|
|
|
pub mod interrupt_controller;
|
2020-05-25 08:59:09 +00:00
|
|
|
#[cfg(target_arch = "x86_64")]
|
2019-06-12 08:12:45 +00:00
|
|
|
pub mod ioapic;
|
2019-03-07 13:56:43 +00:00
|
|
|
pub mod legacy;
|
|
|
|
|
2019-09-03 13:54:06 +00:00
|
|
|
#[cfg(feature = "acpi")]
|
2020-07-23 09:17:07 +00:00
|
|
|
pub use self::acpi::{AcpiGEDDevice, AcpiPMTimerDevice, AcpiShutdownDevice};
|
2019-06-11 17:49:19 +00:00
|
|
|
|
2020-01-14 10:17:23 +00:00
|
|
|
bitflags! {
|
2021-01-12 15:10:05 +00:00
|
|
|
pub struct AcpiNotificationFlags: u8 {
|
2020-01-14 10:17:23 +00:00
|
|
|
const NO_DEVICES_CHANGED = 0;
|
|
|
|
const CPU_DEVICES_CHANGED = 0b1;
|
|
|
|
const MEMORY_DEVICES_CHANGED = 0b10;
|
2020-02-27 13:50:52 +00:00
|
|
|
const PCI_DEVICES_CHANGED = 0b100;
|
2020-01-14 10:17:23 +00:00
|
|
|
}
|
2019-11-27 15:27:09 +00:00
|
|
|
}
|