On 6/6/2024 6:58 PM, Reinette Chatre wrote:
On 6/6/24 4:09 PM, Moger, Babu wrote:
@@ -301,15 +320,8 @@ static int noncont_cat_run_test(const struct resctrl_test *test,
if (ret)
return ret;
- if (!strcmp(test->resource, "L3"))
- __cpuid_count(0x10, 1, eax, ebx, ecx, edx);
- else if (!strcmp(test->resource, "L2"))
- __cpuid_count(0x10, 2, eax, ebx, ecx, edx);
- else
- return -EINVAL;
-
- if (sparse_masks != ((ecx >> 3) & 1)) {
- ksft_print_msg("CPUID output doesn't match 'sparse_masks' file content!\n");
+ if (!(arch_supports_noncont_cat(test) && sparse_masks)) {
+ ksft_print_msg("Hardware does not support non-contiguous CBM!\n");
Please fix the test as well as the message. It is not an error if hardware does
not support non-contiguous CBM. It is an error if the hardware and kernel disagrees whether
non-contiguous CBM is supported.
Not sure about this comment.
Did you mean?
if (!arch_supports_noncont_cat(test)) {
ksft_print_msg("Hardware does not support non-contiguous CBM!\n");
return 0;
} else if (arch_supports_noncont_cat(test) && !sparse_masks)) {
ksft_print_msg("Hardware and kernel support for non-contiguous CBM does not match!\n");
return 1;