Skip to content

Conversation

@jakecorrenti
Copy link
Member

Update the API to be more ergonomic and more idiomatic. The new design is also more in line with what the virtee/sev crate is offering for an interface.

Additionally, update the Error type and handling to be more idiomatic as well.

Resolves: #14

Comment on lines 227 to 230
gpa: u64,
nr_pages: u64,
attributes: u32,
source_addr: u64,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
gpa: u64,
nr_pages: u64,
attributes: u32,
source_addr: u64,
gpa: u64,
nr_pages: u64,
attributes: u32,
source_addr: u64,

These could likely be wrapped in their own struct given to the user. See update_data in the sev library.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

Update the API to use a `Launcher` type instead of a `TdxVm` and
`TdxVcpu`. This is more elegant and is more in line with what virtee/sev
is providing users as an interface.

Signed-off-by: Jake Correnti <[email protected]>
Update the launch test to use the new `Launcher` API.

Signed-off-by: Jake Correnti <[email protected]>
Update Error type to be more idiomatic Rust. Consequently, update error
handling where necessary.

Signed-off-by: Jake Correnti <[email protected]>
Signed-off-by: Jake Correnti <[email protected]>
@tylerfanelli tylerfanelli merged commit 0df0240 into virtee:main Jun 11, 2025
2 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.

[RFC] Change API structure

2 participants