Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend TdInfo struct to add vcpu_index field #713

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tdx-tdcall/src/tdx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub struct TdInfo {
pub attributes: u64,
pub max_vcpus: u32,
pub num_vcpus: u32,
pub rsvd: [u64; 3],
pub vcpu_index: u32,
pub rsvd: [u32; 5],
}

/// Virtualization exception information returned from TDG.VP.VEINFO.GET leaf
Expand Down Expand Up @@ -504,6 +505,7 @@ pub fn tdcall_get_td_info() -> Result<TdInfo, TdCallError> {
attributes: args.rdx,
max_vcpus: (args.r8 >> 32) as u32,
num_vcpus: args.r8 as u32,
vcpu_index: args.r9 as u32,
..Default::default()
};

Expand Down
Loading