Repository navigation
8385359: [CRaC] aarch64: c7g.medium <-> c8g.medium FAIL: vector length #331
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
Changes from 1 commit
b14c031
8c52894
d985dad
e08bde7
fa57bb5
a46f297
b46ded6
d5f84fa
15449dd
0f62afa
b86c5ff
768aae4
588ee21
52d526c
cb71018
8db9bc7
cbb0746
be48727
09f983f
5e060d9
5ea5d93
9e5927d
205080e
c3d3644
7c8c827
000138b
7eb8b88
fc737cc
4c4a201
0340e76
32cf9c8
416e168
c1253a6
297ce42
d417007
8b6f0af
6473fb2
667defa
a78f4a3
28104d1
77a7638
e4a1397
4483852
56026c8
30ca564
cf9925e
37f8508
e341257
6952eec
12905e7
6075049
c030824
79a0d61
7603eaf
6835607
e333e78
2d311da
7248e09
0f6f2f5
2e84219
d484593
821f3d9
9a36bc1
35a5335
a6a3c4d
f295afc
8053085
f84dd4e
06f2f34
787a7e8
9b58647
27a6033
9adf3ab
c224ffb
2eedf43
0fc8d9d
277235c
372753c
d2e59b1
a17ee6d
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 |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
| */ | ||
|
|
||
| #include "memory/resourceArea.hpp" | ||
| #include "runtime/globals_extension.hpp" | ||
| #include "runtime/java.hpp" | ||
| #include "runtime/os.hpp" | ||
| #include "runtime/os.inline.hpp" | ||
|
|
@@ -120,9 +121,12 @@ int VM_Version::get_current_sve_vector_length() { | |
| return prctl(PR_SVE_GET_VL); | ||
| } | ||
|
|
||
| // Limit what set_and_get_current_sve_vector_length is willing to set. | ||
| static int maximum_sve_vector_length = INT_MAX; | ||
|
|
||
| int VM_Version::set_and_get_current_sve_vector_length(int length) { | ||
| assert(VM_Version::supports_sve(), "should not call this"); | ||
| int new_length = prctl(PR_SVE_SET_VL, length); | ||
| int new_length = prctl(PR_SVE_SET_VL, MIN2(length, maximum_sve_vector_length)); | ||
| return new_length; | ||
| } | ||
|
|
||
|
|
@@ -163,6 +167,10 @@ void VM_Version::get_os_cpu_info() { | |
| update_feature(auxv2, CPU_WFXT, HWCAP2_WFXT ); | ||
| update_feature(~auxv, CPU_NOTPACA, HWCAP_PACA ); | ||
|
|
||
| if (supports_sve() && get_current_sve_vector_length() == 32) { | ||
| set_feature(CPU_SVE256); | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The rest of the code seems to assume that
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI also complains about smaller sizes, resending verbatim:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed by: +VM_Version::checkpoint_check() to verify >256 vector bits CPUs |
||
|
|
||
| uint64_t ctr_el0; | ||
| uint64_t dczid_el0; | ||
| __asm__ ( | ||
|
|
@@ -226,6 +234,26 @@ void VM_Version::check_os_cpu_info() { | |
| // GLIBC_TUNABLES=glibc.cpu.hwcaps is unsupported on aarch64 | ||
| vm_exit_during_initialization(err_msg("LSE (%s) cannot be disabled via -XX:CPUFeatures on aarch64.", lse.print_numbers())); | ||
| } | ||
| if (FLAG_IS_DEFAULT(CPUFeatures)) { | ||
| assert(_cpu_features.supports_feature(CPU_SVE256) == _features.supports_feature(CPU_SVE256), "CPU_SVE256 is not changed"); | ||
| } else if (!_cpu_features.supports_feature(CPU_SVE256) && _features.supports_feature(CPU_SVE256)) { | ||
| stringStream ss; | ||
| VM_Features sve256; | ||
| sve256.set_feature(VM_Feature_Flag::CPU_SVE256); | ||
| ss.print("Specified -XX:CPUFeatures=%s have CPU_SVE256=%s set but this CPU does not support it", _features.print_numbers(), sve256.print_numbers()); | ||
|
jankratochvil marked this conversation as resolved.
Outdated
|
||
| vm_exit_during_initialization(ss.base()); | ||
| } else if (_cpu_features.supports_feature(CPU_SVE256) && !_features.supports_feature(CPU_SVE256)) { | ||
| maximum_sve_vector_length = 16; | ||
| int got = set_and_get_current_sve_vector_length(maximum_sve_vector_length); | ||
| if (got != maximum_sve_vector_length) { | ||
| stringStream ss; | ||
| VM_Features sve256; | ||
| sve256.set_feature(VM_Feature_Flag::CPU_SVE256); | ||
| ss.print("Specified -XX:CPUFeatures=%s have unset CPU_SVE256=%s, this CPU has CPUFeatures=%s but it cannot be disabled as PR_SVE_SET_VL reports %d: %m", | ||
| _features.print_numbers(), sve256.print_numbers(), _cpu_features.print_numbers(), got); | ||
|
rvansa marked this conversation as resolved.
|
||
| vm_exit_during_initialization(ss.base()); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| static bool read_fully(const char *fname, char *buf, size_t buflen) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.