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

vmsdk: add api for event log replay #66

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

Ruoyu-y
Copy link
Member

@Ruoyu-y Ruoyu-y commented Jan 23, 2024

  • add event log replay api
  • add event log replay processing logic

* add event log replay api
* add event log replay processing logic

Signed-off-by: Ruoyu Ying <[email protected]>
@Ruoyu-y
Copy link
Member Author

Ruoyu-y commented Jan 23, 2024

Sample usage:

root@tdx-guest:/home/tdx/cc-trusted-api# python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cctrusted_vm import CCTrustedVmSdk
>>> event_logs = CCTrustedVmSdk.inst().get_eventlog()
>>> res = CCTrustedVmSdk.inst().replay_eventlog(event_logs)
>>> print(res)
{0: {12: b'o_\xd0\xdcZ\\\xcc\xfb\xff\xc7u]\x1e\x15K\xc9\x9c\xe3\x9d\x0e;Pt8\xd2\xf2\x02\xb9y\x1a\xf1\x85Y\xd7 \x07\x8bZ|<\xa2\x9f\xfd\xbezUi\x1d'}, 1: {12: b'\xed?Q\xbd\xa1\x85\xc0Ly\xa63H\xddS\x1e(\xf4H8\xb6\x92Yr\xf471WC\x9c\x98\n\x82\xf4\xb8\xc3\xb4\xe7(OS\xc3\xedW\x81H\xff\xf4\xb4'}, 2: {12: b'8\xc3\xb5\x87\xcf3N\xe6l\x18\xdc\xb5\x05\xcaF\x97\x7f\xdf\xae\x8d\xd2\x8d\x01\xcd/\x11\xf4\xe6\xf2h\xcaw\x81\x89\xb2S\xb3An\xa2\xd3\x17n\xea\xfb`6\x83'}}

Copy link
Contributor

@hairongchen hairongchen left a comment

Choose a reason for hiding this comment

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

LGTM

@wenhuizhang wenhuizhang merged commit 6145e8a into cc-api:main Jan 26, 2024
4 checks passed
@Ruoyu-y Ruoyu-y deleted the event_log_replay branch January 31, 2024 01:08
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.

3 participants