This repository was archived by the owner on Feb 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Add Salus-TSM stub #129
Open
atulkharerivos
wants to merge
4
commits into
rivosinc:main
Choose a base branch
from
atulkharerivos:topic/salus_tsm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Salus-TSM stub #129
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,18 @@ strip = "debuginfo" | |
| codegen-units = 1 | ||
| panic = "abort" | ||
|
|
||
| [features] | ||
| salustsm = [] | ||
|
|
||
| [[bin]] | ||
| name = "salus-tsm" | ||
| path = "src/salus_tsm.rs" | ||
| required-features = ["salustsm"] | ||
|
|
||
| [[bin]] | ||
| name = "salus" | ||
| path = "src/main.rs" | ||
|
Comment on lines
+18
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of |
||
|
|
||
| [dependencies] | ||
| arrayvec = { version = "0.7.2", default-features = false } | ||
| assertions = { path = "./assertions" } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,12 +98,17 @@ guestvm: | |
| tellus: guestvm | ||
| cargo build $(CARGO_FLAGS) --package test_workloads --bin tellus --release | ||
|
|
||
| .PHONY: salus_tsm | ||
| salus_tsm: | ||
| cargo build $(CARGO_FLAGS) --release --bin salus-tsm --features="salustsm" | ||
|
|
||
| # Runnable targets: | ||
| # | ||
| # run_tellus_gdb: Run Tellus as the host VM with GDB debugging enabled. | ||
| # run_tellus: Run Tellus as the host VM. | ||
| # run_linux: Run a bare Linux kernel as the host VM. | ||
| # run_debian: Run a Linux kernel as the host VM with a Debian rootfs. | ||
| # run_salus_tsm: Runs the Salus-TSM binary (currently a stub). | ||
|
|
||
| run_tellus_gdb: tellus_bin salus_debug | ||
| $(QEMU_BIN) \ | ||
|
|
@@ -141,6 +146,12 @@ run_debian: salus | |
| -device e1000e,netdev=usernet \ | ||
| $(EXTRA_QEMU_ARGS) | ||
|
|
||
| run_salus_tsm: salus_tsm | ||
| $(QEMU_BIN) \ | ||
| $(MACH_ARGS) \ | ||
| -kernel $(RELEASE_BINS)salus-tsm \ | ||
| $(EXTRA_QEMU_ARGS) | ||
|
Comment on lines
+149
to
+153
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably have an internal discussion about how this Makefile target is expected to be used.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure..will add this and the below to the thread. |
||
|
|
||
| .PHONY: lint | ||
| lint: | ||
| cargo clippy -- -D warnings -Wmissing-docs | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are separate binary targets, do we still need a feature flag? If we want a feature flag + separate binary targets, is there a way to automatically set the feature based on which binary we're building?
Also some bikeshedding: I feel like "tsm_only" is a better name than "salustsm", as it's more obvious what the flag is doing (stripping out the non-TSM components).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature flags can be enabled by default, but it does require the flag to be defined AFAIK. The nomenclature was arbitrary, so perhaps, we can just see what feels best in the channel.