Skip to content

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

Merged
jyao1 merged 1 commit into
confidential-containers:mainfrom
gaojiaqi7:0802/extend_init_shared_memory
Sep 4, 2024
Merged

td-payload: add new shared memory init function with private shadow#730
jyao1 merged 1 commit into
confidential-containers:mainfrom
gaojiaqi7:0802/extend_init_shared_memory

Conversation

@gaojiaqi7

Copy link
Copy Markdown
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
Copy Markdown
Contributor

LGTM

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

td-payload: make private shadow optional

3 participants