-
Notifications
You must be signed in to change notification settings - Fork 249
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
cpu: ignore unknown cpuid flags on non-x86 #914
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marquiz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-nfd ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Not verified |
|
I think the defensive fix proposed by @marquiz 'future' proofs the code against changes. I do like the referenced PR from Yaakov. It's a great catch/help. Chandan and I can try this out on a p10. |
9dea817
to
7e5d4f7
Compare
/retitle cpu: ignore unknown cpuid flags on non-x86 |
Ach, good point @yselkowitz. I updated the PR to handle other non-x86 architectures. |
Thank you @marquiz , i don't have time to test it on s390x right now and i will be away next week. However the changes look good to me. Since they are the same for all arches, i'm fine with it if they work on the other arches. One question unrelated to this PR: When i reviewed the loop, where does the capacity from the string array come from?
I mean we have 23 Flags defined for s390x and we check 64 bits. Is there a reason the array only has a cap of 20? |
Thanks @jschintag, I'll then be happy with an ack from the arm and ppc guys 😊
Good question, I'm not the original author of this code. I think it's just a (harmless) leftover from some eariler development stage. The slice capacity will get increased if more than 20 flags are present. This could be fixed in a separate PR though, I think (e.g. set cap to |
val, ok := flagNames_arm64[key] | ||
if hwcap&key != 0 && ok { |
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.
FYI this hunk overlaps #919 so whichever is merged first, the second will need to rebase and adapt.
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.
ack
Any arm64 confirmation? @zvonkok @ArangoGutierrez ? |
Avoid trying to create empty "cpu-cpuid." labels for cpuid flags that we don't have a description for.
7e5d4f7
to
98fd07b
Compare
Rebased after #919 was merged |
Verified that images build and unit tests pass on arm64 and s390x |
/lgtm |
@yselkowitz: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
ping @fmuyassarov @zvonkok |
/lgtm |
/lgtm |
Avoid trying to create empty "cpu-cpuid." labels for cpuid flags that we don't have a description for.