base: Support CrosVM auto-detection of MTE support - #3017
Open
ptosi wants to merge 4 commits into
Open
Conversation
dimorinny
requested changes
Aug 14, 2026
dimorinny
approved these changes
Aug 17, 2026
Leverage the fact that the value is a comma-separated string, making the code easier to manage and extend. Note that we now use the syntax '--cpus X' instead of '--cpus=X' to limit string processing. Bug: 534674369 Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Add helper to centralize the policy on when pmem/pstore can actually be enabled (or not), beyond what the config requested. This simplifies future changes altering this policy. Bug: 534674369 Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Prepare for an upcoming support of auto by introducing an enum and supporting the flag as a string, with a dedicate header. Reject --mte on non-Arm64 targets as the feature is arch-specific. This remains fully compatible with the previous user-visible behavior. Bug: 534674369 Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Support CrosVM's '--cpus mte=[auto]' by exposing the --mte=auto option. Bug: 534674369 Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
auto-merge was automatically disabled
August 18, 2026 10:49
Head branch was pushed to by a user without write access
dimorinny
enabled auto-merge
August 18, 2026 13:41
Databean
approved these changes
Aug 20, 2026
Comment on lines
+164
to
+174
| template <typename Container, typename Separator = const char*> | ||
| Command& AddJoinedParameter(const Container& container, | ||
| Separator separator = ",") & { | ||
| command_.push_back(absl::StrJoin(container, separator)); | ||
| return *this; | ||
| } | ||
| template <typename Container, typename Separator = const char*> | ||
| Command AddJoinedParameter(const Container& container, | ||
| Separator separator = ",") && { | ||
| return std::move(AddJoinedParameter(container, separator)); | ||
| } |
Member
There was a problem hiding this comment.
In this case the caller could just as easily call absl::StrJoin, I'm not sure the usage merits an extra method in Command.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make the currently boolean
--mteCVD flag accept the valueautoto only enable guest MTE when supported.Map it to CrosVM's new
--cpus mte=[auto]flag (https://crrev.com/c/8137608) but keep supporting--mtewhentrue.