-
Notifications
You must be signed in to change notification settings - Fork 182
Make interrupt counters visible in release for cvms #3191
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -516,7 +516,7 @@ pub struct TdxBacked { | |||||
| #[inspect(skip)] | ||||||
| flush_page: user_driver::memory::MemoryBlock, | ||||||
|
|
||||||
| #[inspect(flatten)] | ||||||
| #[inspect(flatten, safe)] | ||||||
|
||||||
| #[inspect(flatten, safe)] | |
| #[inspect(flatten)] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -234,6 +234,7 @@ struct Unit { | |
| dependencies: Vec<u64>, | ||
| dependents: Vec<u64>, | ||
| state: State, | ||
| inspect_sensitivity: inspect::SensitivityLevel, | ||
| } | ||
|
|
||
| /// An error returned when a state unit name is already in use. | ||
|
|
@@ -313,7 +314,7 @@ impl Inspect for Inner { | |
| fn inspect(&self, req: inspect::Request<'_>) { | ||
| let mut resp = req.respond(); | ||
| for unit in self.units.values() { | ||
| resp.child(unit.name.as_ref(), |req| { | ||
| resp.sensitivity_child(unit.name.as_ref(), unit.inspect_sensitivity, |req| { | ||
| let mut resp = req.respond(); | ||
| if !unit.dependencies.is_empty() { | ||
| resp.field_with("dependencies", || { | ||
|
|
@@ -444,6 +445,7 @@ impl StateUnits { | |
| name: name.into(), | ||
| dependencies: Vec::new(), | ||
| dependents: Vec::new(), | ||
| inspect_sensitivity: inspect::SensitivityLevel::Unspecified, | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -827,6 +829,7 @@ pub struct UnitBuilder<'a> { | |
| name: Arc<str>, | ||
| dependencies: Vec<u64>, | ||
| dependents: Vec<u64>, | ||
| inspect_sensitivity: inspect::SensitivityLevel, | ||
| } | ||
|
|
||
| impl UnitBuilder<'_> { | ||
|
|
@@ -848,6 +851,12 @@ impl UnitBuilder<'_> { | |
| self | ||
| } | ||
|
|
||
| /// Sets the sensitivity level for this unit's inspect data. Defaults to Unspecified. | ||
| pub fn inspect_sensitivity(mut self, sensitivity: inspect::SensitivityLevel) -> Self { | ||
| self.inspect_sensitivity = sensitivity; | ||
| self | ||
| } | ||
|
Comment on lines
+854
to
+858
|
||
|
|
||
| fn handle_id(&self, handle: &UnitHandle) -> u64 { | ||
| // Ensure this handle is associated with this set of state units. | ||
| assert_eq!( | ||
|
|
@@ -891,6 +900,7 @@ impl UnitBuilder<'_> { | |
| dependencies: self.dependencies, | ||
| dependents: self.dependents, | ||
| state: State::Stopped, | ||
| inspect_sensitivity: self.inspect_sensitivity, | ||
| }, | ||
| ); | ||
| let unit_id = UnitId { | ||
|
|
||
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.
#[inspect(flatten, safe)]does not currently applysafesensitivity: theinspectderive ignores sensitivity attributes onflattenfields and only emitsresp.merge(...). If the intent is to make this subtree visible forSensitivityLevel::Saferequests, you’ll need to mark the specific inner fields as#[inspect(safe)](as done for LAPIC stats) or restructure to use a sensitivity-aware child/field instead offlatten. Otherwise, consider droppingsafehere to avoid confusion.