Skip to content

base: Support CrosVM auto-detection of MTE support - #3017

Open
ptosi wants to merge 4 commits into
google:mainfrom
ptosi:main
Open

base: Support CrosVM auto-detection of MTE support#3017
ptosi wants to merge 4 commits into
google:mainfrom
ptosi:main

Conversation

@ptosi

@ptosi ptosi commented Aug 13, 2026

Copy link
Copy Markdown

Make the currently boolean --mte CVD flag accept the value auto to only enable guest MTE when supported.

Map it to CrosVM's new --cpus mte=[auto] flag (https://crrev.com/c/8137608) but keep supporting --mte when true.

@dimorinny dimorinny added the kokoro:run Run e2e tests. label Aug 14, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Aug 14, 2026
Comment thread base/cvd/cuttlefish/host/libs/config/cuttlefish_config.h Outdated
Comment thread base/cvd/cuttlefish/host/commands/assemble_cvd/flags.cc Outdated
Comment thread base/cvd/cuttlefish/host/libs/vm_manager/crosvm_builder.h
Comment thread base/cvd/cuttlefish/host/commands/assemble_cvd/assemble_cvd_flags.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/config/cuttlefish_config_instance.cpp
@rmuthiah rmuthiah added the kokoro:run Run e2e tests. label Aug 17, 2026
@rmuthiah
rmuthiah enabled auto-merge August 17, 2026 18:43
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Aug 17, 2026
ptosi added 4 commits August 18, 2026 12:46
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 dimorinny added the kokoro:run Run e2e tests. label Aug 18, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Aug 18, 2026
@dimorinny
dimorinny enabled auto-merge August 18, 2026 13:41
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));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In this case the caller could just as easily call absl::StrJoin, I'm not sure the usage merits an extra method in Command.

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.

5 participants