Temporary fix for TDX MMIO assert issue

This commit is contained in:
Hsy-Intel 2024-03-19 05:19:01 +08:00 committed by Tate, Hongliang Tian
parent b605bed576
commit c2a49bca7c

View File

@ -14,7 +14,14 @@ pub static MMIO_BUS: SpinLock<MmioBus> = SpinLock::new(MmioBus::new());
pub(crate) fn init() { pub(crate) fn init() {
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
x86_probe(); crate::arch::if_tdx_enabled!({
// TODO: support virtio-mmio devices on TDX.
//
// Currently, virtio-mmio devices need to acquire sub-page MMIO regions,
// which are not supported by `IoMem::acquire` in the TDX environment.
} else {
x86_probe();
});
} }
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]