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

feat(cmd/rofl): Add support for building TDX ROFL apps #298

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kostko
Copy link
Member

@kostko kostko commented Oct 3, 2024

No description provided.

@kostko kostko added the rofl ROFL related CLI issues label Oct 3, 2024
@kostko kostko self-assigned this Oct 3, 2024
Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit 362edf3
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-cli/deploys/673dc96433f74f00080ed7fe

@kostko kostko force-pushed the kostko/feature/rofl-tdx branch 8 times, most recently from e6e597e to 8bbcd58 Compare October 21, 2024 12:07
@kostko kostko force-pushed the kostko/feature/rofl-tdx branch 3 times, most recently from 9f90623 to 45d7161 Compare November 13, 2024 14:48
@kostko
Copy link
Member Author

kostko commented Nov 13, 2024

This can now reproduce our measurements for up to 16 vCPUs on QEMU.

@kostko kostko marked this pull request as ready for review November 13, 2024 14:49
@kostko
Copy link
Member Author

kostko commented Nov 13, 2024

It would be great if we could deterministically compile the ACPI tables, but my brief experiments with ASL did not help. So we are using per-CPU templates for now.

@kostko kostko force-pushed the kostko/feature/rofl-tdx branch 7 times, most recently from b091590 to daa5450 Compare November 15, 2024 09:54
return 0, err
}
fsSize /= 1024 // Convert to kilobytes.
fsSize = (fsSize * 150) / 100 // Scale by overhead factor of 1.5.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the typical size of the generated filesystems that you've tried so far?

Also, might be a good idea to add a check to make sure that fn is not an existing block device, so we don't accidentally trash a user's drive :)
(Currently, in the only place this function is called, the filename is hardcoded to rootfs.ext4, so it's not a problem, but it might be a problem in the future if we maybe have configurable filenames 🤷‍♂️)

@kostko kostko force-pushed the kostko/feature/rofl-tdx branch 2 times, most recently from ac69443 to 3e4ca2c Compare November 15, 2024 11:08
Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

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

Following the existing tutorial and running oasis rofl build tdx --mode unsafe compiled the ROFL, but when it tried to pack it, I got

[built] path+file:///home/oa/rofl-oracle#0.1.0
Preparing stage 2 root filesystem...
Unpacking template...
Adding runtime as init...
Creating ext4 filesystem...
Error: failed to create rootfs image: exit status 1

Do I need to install additional dependencies? No other errors seem to be reported.

@kostko
Copy link
Member Author

kostko commented Nov 16, 2024

Yes, let me add some checks whether the required tools exist.

@kostko kostko force-pushed the kostko/feature/rofl-tdx branch 6 times, most recently from 57c070f to 9d1e821 Compare November 18, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rofl ROFL related CLI issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants