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

migtd: copy GHCI data to stack memory instead of heap #159

Closed

Conversation

gaojiaqi7
Copy link
Contributor

Closes #87

@gaojiaqi7 gaojiaqi7 force-pushed the 0220/use_stack_instead_of_heap branch from 8162892 to 22a60c2 Compare February 23, 2024 01:27
@@ -89,7 +90,8 @@ impl MigrationSession {
#[cfg(not(feature = "vmcall-interrupt"))]
tdx::tdvmcall_service(cmd_mem.as_bytes(), rsp_mem.as_mut_bytes(), 0, 0)?;

let private_mem = Self::copy_from_shared_memory(rsp_mem.as_bytes());
let mut private_mem = [0u8; GHCI_PAGE_SIZE];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use a global data section instead of stack.

@gaojiaqi7 gaojiaqi7 closed this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

why use vec to hold the GHCI communciation data
2 participants