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: simplify the GHCI implementation #191

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gaojiaqi7
Copy link
Contributor

@gaojiaqi7 gaojiaqi7 commented Mar 14, 2024

  • Remove the state machine of MigrationSession and exposing several
    individual APIs of GHCI.
  • Abstract the service vmcall operations into VmcallService to reduce
    the duplicate code.
  • Move the exchange_msk function to bin

The old implementation of migtd GHCI uses a state machine to switch
between waiting, migration and status reporting which is an overdesign.

The patch simplifies the implementation by:

 - Removing the state machine of MigrationSession and exposing several
   individual APIs of GHCI.
 - Abstract the service vmcall operations into VmcallService to reduce
   the duplicate code.

The changes will make the implementation simpler and easier to read. More
unit test can be added for individual APIs.

Signed-off-by: Jiaqi Gao <[email protected]>
It can only be built for baremetal target and run in baremetal TDX
environment. Move this to bin to avoid lots of conditional compilation
in `migration` module under lib.

Signed-off-by: Jiaqi Gao <[email protected]>
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.

1 participant