From b2d1065a55bb87b5b2218cd200c161e7490a781f Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 8 Jul 2026 11:37:45 -0700 Subject: [PATCH] build: disallow building `tdx` feature It is broken. There is no use in producing something that doesn't work. Signed-off-by: Wei Liu --- .github/workflows/ci.yaml | 10 ---------- cloud-hypervisor/src/main.rs | 2 ++ scripts/run_unit_tests.sh | 2 -- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cbbbe9157..6c1214612 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -448,14 +448,6 @@ jobs: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} args: --locked --all --all-targets --no-default-features --tests --examples --features "mshv,igvm" -- -D warnings - - name: Clippy (kvm + tdx) - if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} - uses: houseabsolute/actions-rust-cross@v1 - with: - command: clippy - toolchain: ${{ matrix.rust }} - target: ${{ matrix.target }} - args: --locked --all --all-targets --no-default-features --tests --examples --features "tdx,kvm" -- -D warnings - name: Clippy (kvm + igvm + sev_snp + fw_cfg) if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} uses: houseabsolute/actions-rust-cross@v1 @@ -508,8 +500,6 @@ jobs: run: cargo build --locked --bin cloud-hypervisor - name: Build (kvm) run: cargo build --locked --bin cloud-hypervisor --no-default-features --features "kvm" - - name: Build (default features + tdx) - run: cargo build --locked --bin cloud-hypervisor --features "tdx" - name: Build (default features + dbus_api) run: cargo build --locked --bin cloud-hypervisor --features "dbus_api" - name: Build (default features + guest_debug) diff --git a/cloud-hypervisor/src/main.rs b/cloud-hypervisor/src/main.rs index 6b0a84ba5..c773a3c01 100644 --- a/cloud-hypervisor/src/main.rs +++ b/cloud-hypervisor/src/main.rs @@ -894,6 +894,8 @@ fn expand_fdtable() -> Result<(), FdTableError> { } fn main() { + #[cfg(feature = "tdx")] + compile_error!("Feature 'tdx' is broken."); #[cfg(all(feature = "tdx", feature = "sev_snp"))] compile_error!("Feature 'tdx' and 'sev_snp' are mutually exclusive."); #[cfg(all(feature = "sev_snp", not(target_arch = "x86_64")))] diff --git a/scripts/run_unit_tests.sh b/scripts/run_unit_tests.sh index 3e300c44c..f06091814 100755 --- a/scripts/run_unit_tests.sh +++ b/scripts/run_unit_tests.sh @@ -12,8 +12,6 @@ cargo_args=("") # shellcheck disable=SC2154 if [[ $hypervisor = "mshv" ]]; then cargo_args+=("--features $hypervisor") -elif [[ $(uname -m) = "x86_64" ]]; then - cargo_args+=("--features tdx") fi export RUST_BACKTRACE=1