diff --git a/Cargo.lock b/Cargo.lock index 507285071..bc7a0594c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -316,6 +316,7 @@ dependencies = [ "log", "ostd", "spin", + "tdx-guest", "typeflags-util", ] diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index cca82e4af..bd80da56b 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -72,7 +72,7 @@ riscv = { version = "0.11.1", features = ["s-mode"] } [features] all = ["cvm_guest"] -cvm_guest = ["dep:tdx-guest", "ostd/cvm_guest"] +cvm_guest = ["dep:tdx-guest", "ostd/cvm_guest", "aster-virtio/cvm_guest"] [lints] workspace = true diff --git a/kernel/comps/virtio/Cargo.toml b/kernel/comps/virtio/Cargo.toml index a610949fb..21f76c7a5 100644 --- a/kernel/comps/virtio/Cargo.toml +++ b/kernel/comps/virtio/Cargo.toml @@ -24,9 +24,12 @@ component = { path = "../../libs/comp-sys/component" } log = "0.4" int-to-c-enum = { path = "../../libs/int-to-c-enum" } +[target.x86_64-unknown-none.dependencies] +tdx-guest = { version = "0.2.1", optional = true } + [features] all = ["cvm_guest"] -cvm_guest = ["ostd/cvm_guest"] +cvm_guest = ["dep:tdx-guest", "ostd/cvm_guest"] [lints] workspace = true