Skip to content

Commit 3b524e8

Browse files
committed
tdx-tdcall,td-payload: fix-up cargo fmt errors
Signed-off-by: Stanislaw Grams <[email protected]>
1 parent dfae27c commit 3b524e8

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

td-payload/src/arch/x86_64/shared.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//
33
// SPDX-License-Identifier: BSD-2-Clause-Patent
44

5-
65
#[cfg(feature = "tdcall")]
76
use crate::mm::SIZE_4K;
87
#[cfg(feature = "tdcall")]

tdx-tdcall/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ pub const USE_TDX_EMULATION: bool = false;
3030

3131
pub mod asm;
3232
#[cfg(feature = "tdcall")]
33-
pub mod tdreport;
34-
#[cfg(feature = "tdcall")]
3533
pub mod tdcall;
34+
#[cfg(feature = "tdcall")]
35+
pub mod tdreport;
3636
#[cfg(feature = "tdvmcall")]
3737
pub mod tdvmcall;

tdx-tdcall/src/tdcall.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//! The TDCALL instruction causes a VM exit to the Intel TDX Module. It is used to call
99
//! guest-side Intel TDX functions, either local or a TD exit to the host VMM.
1010
11-
use core::result::Result;
1211
use crate::*;
12+
use core::result::Result;
1313

1414
pub const PAGE_SIZE_4K: u64 = 0x1000;
1515
pub const PAGE_SIZE_2M: u64 = 0x200000;

tdx-tdcall/src/tdreport.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use core::mem::{size_of, zeroed};
77
use core::ptr::{slice_from_raw_parts, slice_from_raw_parts_mut};
88
use scroll::{Pread, Pwrite};
99

10-
use crate::tdcall::{td_call, TdCallError, TdcallArgs, TDCALL_TDREPORT, TDCALL_STATUS_SUCCESS};
10+
use crate::tdcall::{td_call, TdCallError, TdcallArgs, TDCALL_STATUS_SUCCESS, TDCALL_TDREPORT};
1111

1212
pub const TD_REPORT_SIZE: usize = 0x400;
1313
pub const TD_REPORT_ADDITIONAL_DATA_SIZE: usize = 64;

tdx-tdcall/src/tdvmcall.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
//! TDVMCALL (TDG.VP.VMCALL) is a leaf function 0 for TDCALL. It helps invoke services from
88
//! the host VMM.
99
10+
use crate::*;
1011
use core::result::Result;
11-
use x86_64::registers::rflags::{self, RFlags};
1212
use core::sync::atomic::{fence, Ordering};
1313
use lazy_static::lazy_static;
14-
use crate::*;
14+
use x86_64::registers::rflags::{self, RFlags};
1515

1616
lazy_static! {
17-
static ref SHARED_MASK: u64 = tdcall::td_shared_mask().expect("Fail to get the shared mask of TD");
17+
static ref SHARED_MASK: u64 =
18+
tdcall::td_shared_mask().expect("Fail to get the shared mask of TD");
1819
}
1920

2021
// GTDG.VP.VMCALL leaf sub-function numbers

0 commit comments

Comments
 (0)