Support TDX SMP

This commit is contained in:
Hsy-Intel
2025-03-12 21:54:17 +00:00
committed by Tate, Hongliang Tian
parent af4cf19eb4
commit 148695194f
5 changed files with 140 additions and 38 deletions

View File

@ -7,6 +7,8 @@ use core::sync::atomic::{AtomicBool, Ordering};
use spin::Once;
#[cfg(feature = "cvm_guest")]
use crate::mm::frame::allocator;
use crate::{
arch::boot::smp::{bringup_all_aps, get_num_processors},
cpu,
@ -98,9 +100,12 @@ pub fn boot_all_aps() {
log::info!("Booting all application processors...");
bringup_all_aps();
bringup_all_aps(num_cpus);
wait_for_all_aps_started();
#[cfg(feature = "cvm_guest")]
allocator::reclaim_tdx_ap_boot_memory();
log::info!("All application processors started. The BSP continues to run.");
}