mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm, arch, devices: Put ACPI support behind a default feature
Put the ACPI support behind a feature and ensure that the code compiles without that feature by adding an extra build to Travis. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
bb2e7bb942
commit
9e764fc091
@@ -3,13 +3,17 @@ name = "arch"
|
||||
version = "0.1.0"
|
||||
authors = ["The Chromium OS Authors"]
|
||||
|
||||
[features]
|
||||
default = ["acpi"]
|
||||
acpi = ["acpi_tables"]
|
||||
|
||||
[dependencies]
|
||||
byteorder = "1.3.2"
|
||||
kvm-bindings = "0.1.1"
|
||||
kvm-ioctls = { git = "https://github.com/rust-vmm/kvm-ioctls", branch = "master" }
|
||||
libc = "0.2.60"
|
||||
|
||||
acpi_tables = { path ="../acpi_tables" }
|
||||
acpi_tables = { path = "../acpi_tables", optional = true }
|
||||
arch_gen = { path = "../arch_gen" }
|
||||
|
||||
[dependencies.vm-memory]
|
||||
|
||||
@@ -48,7 +48,7 @@ struct PCIRangeEntry {
|
||||
pub segment: u16,
|
||||
pub start: u8,
|
||||
pub end: u8,
|
||||
_reserved: u32
|
||||
_reserved: u32,
|
||||
}
|
||||
|
||||
pub fn create_dsdt_table(serial_enabled: bool) -> SDT {
|
||||
|
||||
@@ -183,8 +183,11 @@ pub fn configure_system(
|
||||
}
|
||||
}
|
||||
|
||||
let rsdp_addr = acpi::create_acpi_tables(guest_mem, num_cpus, serial_enabled);
|
||||
params.0.acpi_rsdp_addr = rsdp_addr.0;
|
||||
#[cfg(feature = "acpi")]
|
||||
{
|
||||
let rsdp_addr = acpi::create_acpi_tables(guest_mem, num_cpus, serial_enabled);
|
||||
params.0.acpi_rsdp_addr = rsdp_addr.0;
|
||||
}
|
||||
|
||||
let zero_page_addr = layout::ZERO_PAGE_START;
|
||||
guest_mem
|
||||
|
||||
Reference in New Issue
Block a user