mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 10:53:25 +00:00
Use cfg_if to group tdx cfg block
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
9bad068215
commit
ca41687a99
@ -10,20 +10,24 @@ use core::{
|
||||
};
|
||||
|
||||
use bitflags::bitflags;
|
||||
use cfg_if::cfg_if;
|
||||
use log::debug;
|
||||
#[cfg(feature = "intel_tdx")]
|
||||
use tdx_guest::tdcall;
|
||||
pub use trapframe::GeneralRegs as RawGeneralRegs;
|
||||
use trapframe::UserContext as RawUserContext;
|
||||
use x86_64::registers::rflags::RFlags;
|
||||
|
||||
#[cfg(feature = "intel_tdx")]
|
||||
use crate::arch::tdx_guest::{handle_virtual_exception, TdxTrapFrame};
|
||||
use crate::{
|
||||
trap::call_irq_callback_functions,
|
||||
user::{ReturnReason, UserContextApi, UserContextApiInternal},
|
||||
};
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "intel_tdx")] {
|
||||
use tdx_guest::tdcall;
|
||||
use crate::arch::tdx_guest::{handle_virtual_exception, TdxTrapFrame};
|
||||
}
|
||||
}
|
||||
|
||||
/// Cpu context, including both general-purpose registers and floating-point registers.
|
||||
#[derive(Clone, Default, Copy, Debug)]
|
||||
#[repr(C)]
|
||||
|
Reference in New Issue
Block a user