tdx: Add "tdx" feature with an empty module inside arch to implement

Add the skeleton of the "tdx" feature with a module ready inside the
arch crate to store implementation details.

TEST=cargo build --features="tdx"

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-02-03 10:02:18 +00:00
parent fd9bd1c86c
commit e61ee6bcac
5 changed files with 9 additions and 0 deletions

View File

@ -56,6 +56,7 @@ fwdebug = ["vmm/fwdebug"]
kvm = ["vmm/kvm"] kvm = ["vmm/kvm"]
mshv = ["vmm/mshv"] mshv = ["vmm/mshv"]
io_uring = ["vmm/io_uring"] io_uring = ["vmm/io_uring"]
tdx = ["vmm/tdx"]
# Integration tests require a special environment to run in # Integration tests require a special environment to run in
integration_tests = [] integration_tests = []

View File

@ -6,6 +6,7 @@ authors = ["The Chromium OS Authors"]
[features] [features]
default = [] default = []
acpi = ["acpi_tables"] acpi = ["acpi_tables"]
tdx = []
[dependencies] [dependencies]
acpi_tables = { path = "../acpi_tables", optional = true } acpi_tables = { path = "../acpi_tables", optional = true }

View File

@ -25,6 +25,8 @@ use vm_memory::{
}; };
mod smbios; mod smbios;
use std::arch::x86_64; use std::arch::x86_64;
#[cfg(feature = "tdx")]
pub mod tdx;
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub enum BootProtocol { pub enum BootProtocol {

View File

@ -0,0 +1,4 @@
// Copyright © 2021 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0

View File

@ -12,6 +12,7 @@ fwdebug = ["devices/fwdebug"]
kvm = ["hypervisor/kvm"] kvm = ["hypervisor/kvm"]
mshv = ["hypervisor/mshv"] mshv = ["hypervisor/mshv"]
io_uring = ["virtio-devices/io_uring"] io_uring = ["virtio-devices/io_uring"]
tdx = ["arch/tdx"]
[dependencies] [dependencies]
acpi_tables = { path = "../acpi_tables", optional = true } acpi_tables = { path = "../acpi_tables", optional = true }