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

td-payload: add new shared memory init function with private shadow #730

Merged

Conversation

gaojiaqi7
Copy link
Member

To keep the original API behavior unchanged. The extended API init the shared memory allocator with a private shadow start address. If the private shadow is not available, the method copy_to_private_shadow will return None.

As the shadow_start may be lower or higher than start of shared memory, the way of allocating private shadow is changed to use the offset of the allocated shared address to the start of shared allocator.

Closes #720

@gaojiaqi7 gaojiaqi7 force-pushed the 0802/extend_init_shared_memory branch from f01e020 to b67b30e Compare August 9, 2024 07:39
@gaojiaqi7 gaojiaqi7 marked this pull request as draft August 14, 2024 06:17
@gaojiaqi7 gaojiaqi7 force-pushed the 0802/extend_init_shared_memory branch from b67b30e to 333d951 Compare August 14, 2024 14:41
To keep the original API behavior unchanged. The extended API init the
shared memory allocator with a private shadow start address. If the
private shadow is not available, the method `copy_to_private_shadow` will
return None.

As the `shadow_start` may be lower or higher than start of shared memory,
the way of allocating private shadow is changed to use the offset of the
allocated shared address to the start of shared allocator.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
@gaojiaqi7 gaojiaqi7 force-pushed the 0802/extend_init_shared_memory branch from 333d951 to 8c7a953 Compare August 14, 2024 14:49
@gaojiaqi7 gaojiaqi7 marked this pull request as ready for review August 15, 2024 01:29
@xiaoyuxlu
Copy link
Contributor

LGTM

@jyao1 jyao1 merged commit 66f0aaf into confidential-containers:main Sep 4, 2024
21 checks passed
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.

td-payload: make private shadow optional
3 participants