Allow overriding UVM start timeout. - #2501
Merged
Merged
Conversation
helsaawy
approved these changes
Aug 15, 2025
rawahars
approved these changes
Aug 19, 2025
jterry75
reviewed
Aug 20, 2025
| ExternalCommandToStart = durationFromEnvironment("HCSSHIM_TIMEOUT_EXTERNALCOMMANDSTART", ExternalCommandToStart) | ||
| ExternalCommandToComplete = durationFromEnvironment("HCSSHIM_TIMEOUT_EXTERNALCOMMANDCOMPLETE", ExternalCommandToComplete) | ||
| TestDRetryLoop = durationFromEnvironment("HCSSHIM_TIMEOUT_TESTDRETRYLOOP", TestDRetryLoop) | ||
| GCSConnectionTimeout = durationFromEnvironment("HCSSHIM_TIMEOUT_GCSCONNECTION", GCSConnectionTimeout) |
Contributor
There was a problem hiding this comment.
NIT, from Env doesnt do a parse to include things like 10s vs 10m. So is the env var a raw value here? What is the unit?
Contributor
Author
There was a problem hiding this comment.
Yeah, the value should be a string representing the timeout in seconds. I kept it like this to maintain the same format that other variables have. But I can update the variable name to something like HCSSHIM_GCSCONNECTION_TIMEOUT_SECONDS?
Currently the uvm.Start() method hardcodes 2 minute timeout value in the context that gets used when making hvsocket connections to the UVM (for entropy, output handling & GCS) . This timeout is good enough for general scenario but is very restrictive when debugging uvm boot issues. This change allows overriding the default timeout via environment variables. Another option that was considered, was to use the deadline/timeout passed in the context instead of hardcoding it. However, there is code in the Start method that explicitly assumes that the parent context won't have a timeout(we could probably get around that problem by creating a new context without a deadline). Another problem is that there are lot of existing callers of the Start method who may or may not include a proper timeout/deadline in the context. If we suddenly start using that value, they might start seeing unexpected timeouts (for smaller context deadlines) or they may start noticing uvm start hanging (for longer deadlines). Signed-off-by: Amit Barve <ambarve@microsoft.com>
ambarve
force-pushed
the
gcs_timeout_override
branch
from
August 25, 2025 19:58
577bbda to
8a77d52
Compare
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.
Currently the uvm.Start() method hardcodes 2 minute timeout value in the context that gets used when making hvsocket connections to the UVM (for entropy, output handling & GCS) . This timeout is good enough for general scenario but is very restrictive when debugging uvm boot issues. This change allows overriding the default timeout via environment variables.
Another option that was considered, was to use the deadline/timeout passed in the context instead of hardcoding it. However, there is code in the Start method that explicitly assumes that the parent context won't have a timeout(we could probably get around that problem by creating a new context without a deadline). Another problem is that there are lot of existing callers of the Start method who may or may not include a proper timeout/deadline in the context. If we suddenly start using that value, they might start seeing unexpected timeouts
(for smaller context deadlines) or they may start noticing uvm start hanging (for longer deadlines).