Enable MBA/MBM tests if UMC (Unified Memory Controller) support is
available on the system. Tests will be skipped otherwise.
Update noncont_cat_run_test to check for vendor. AMD supports
non contiguous CBM masks but does not report it via CPUID.
Signed-off-by: Babu Moger <babu.moger@amd.com>
---
tools/testing/selftests/resctrl/cat_test.c | 2 +-
tools/testing/selftests/resctrl/mba_test.c | 1 -
tools/testing/selftests/resctrl/mbm_test.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
index 4cb991be8e31..b682eaf65bfd 100644
--- a/tools/testing/selftests/resctrl/cat_test.c
+++ b/tools/testing/selftests/resctrl/cat_test.c
@@ -314,7 +314,7 @@ static int noncont_cat_run_test(const struct resctrl_test *test,
else
return -EINVAL;
- if (sparse_masks != ((ecx >> 3) & 1)) {
+ if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) {
ksft_print_msg("CPUID output doesn't match 'sparse_masks' file content!\n");
return 1;
}
diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
index 7946e32e85c8..353054724fa7 100644
--- a/tools/testing/selftests/resctrl/mba_test.c
+++ b/tools/testing/selftests/resctrl/mba_test.c
@@ -177,7 +177,6 @@ static bool mba_feature_check(const struct resctrl_test *test)
struct resctrl_test mba_test = {
.name = "MBA",
.resource = "MB",
- .vendor_specific = ARCH_INTEL,
.feature_check = mba_feature_check,
.run_test = mba_run_test,
};
diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
index d67ffa3ec63a..f2223315b5b8 100644
--- a/tools/testing/selftests/resctrl/mbm_test.c
+++ b/tools/testing/selftests/resctrl/mbm_test.c
@@ -147,7 +147,6 @@ static bool mbm_feature_check(const struct resctrl_test *test)
struct resctrl_test mbm_test = {
.name = "MBM",
.resource = "MB",
- .vendor_specific = ARCH_INTEL,
.feature_check = mbm_feature_check,
.run_test = mbm_run_test,
};
--
2.34.1
On Thu, 25 Apr 2024, Babu Moger wrote:
> Enable MBA/MBM tests if UMC (Unified Memory Controller) support is
> available on the system. Tests will be skipped otherwise.
>
> Update noncont_cat_run_test to check for vendor. AMD supports
> non contiguous CBM masks but does not report it via CPUID.
>
> Signed-off-by: Babu Moger <babu.moger@amd.com>
> ---
> tools/testing/selftests/resctrl/cat_test.c | 2 +-
> tools/testing/selftests/resctrl/mba_test.c | 1 -
> tools/testing/selftests/resctrl/mbm_test.c | 1 -
> 3 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
> index 4cb991be8e31..b682eaf65bfd 100644
> --- a/tools/testing/selftests/resctrl/cat_test.c
> +++ b/tools/testing/selftests/resctrl/cat_test.c
> @@ -314,7 +314,7 @@ static int noncont_cat_run_test(const struct resctrl_test *test,
> else
> return -EINVAL;
>
> - if (sparse_masks != ((ecx >> 3) & 1)) {
> + if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) {
This looks independent change to me which should be put into own patch.
--
i.
> ksft_print_msg("CPUID output doesn't match 'sparse_masks' file content!\n");
> return 1;
> }
> diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
> index 7946e32e85c8..353054724fa7 100644
> --- a/tools/testing/selftests/resctrl/mba_test.c
> +++ b/tools/testing/selftests/resctrl/mba_test.c
> @@ -177,7 +177,6 @@ static bool mba_feature_check(const struct resctrl_test *test)
> struct resctrl_test mba_test = {
> .name = "MBA",
> .resource = "MB",
> - .vendor_specific = ARCH_INTEL,
> .feature_check = mba_feature_check,
> .run_test = mba_run_test,
> };
> diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
> index d67ffa3ec63a..f2223315b5b8 100644
> --- a/tools/testing/selftests/resctrl/mbm_test.c
> +++ b/tools/testing/selftests/resctrl/mbm_test.c
> @@ -147,7 +147,6 @@ static bool mbm_feature_check(const struct resctrl_test *test)
> struct resctrl_test mbm_test = {
> .name = "MBM",
> .resource = "MB",
> - .vendor_specific = ARCH_INTEL,
> .feature_check = mbm_feature_check,
> .run_test = mbm_run_test,
> };
>
On 4/26/2024 12:06 AM, Ilpo Järvinen wrote:
> On Thu, 25 Apr 2024, Babu Moger wrote:
>
>> Enable MBA/MBM tests if UMC (Unified Memory Controller) support is
>> available on the system. Tests will be skipped otherwise.
>>
>> Update noncont_cat_run_test to check for vendor. AMD supports
>> non contiguous CBM masks but does not report it via CPUID.
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> ---
>> tools/testing/selftests/resctrl/cat_test.c | 2 +-
>> tools/testing/selftests/resctrl/mba_test.c | 1 -
>> tools/testing/selftests/resctrl/mbm_test.c | 1 -
>> 3 files changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
>> index 4cb991be8e31..b682eaf65bfd 100644
>> --- a/tools/testing/selftests/resctrl/cat_test.c
>> +++ b/tools/testing/selftests/resctrl/cat_test.c
>> @@ -314,7 +314,7 @@ static int noncont_cat_run_test(const struct resctrl_test *test,
>> else
>> return -EINVAL;
>>
>> - if (sparse_masks != ((ecx >> 3) & 1)) {
>> + if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) {
>
> This looks independent change to me which should be put into own patch.
>
Own patch that is separate from this series. This should go in
as a fix with
Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test")
Reinette
Hi Reinette,
On 5/9/24 16:11, Reinette Chatre wrote:
>
>
> On 4/26/2024 12:06 AM, Ilpo Järvinen wrote:
>> On Thu, 25 Apr 2024, Babu Moger wrote:
>>
>>> Enable MBA/MBM tests if UMC (Unified Memory Controller) support is
>>> available on the system. Tests will be skipped otherwise.
>>>
>>> Update noncont_cat_run_test to check for vendor. AMD supports
>>> non contiguous CBM masks but does not report it via CPUID.
>>>
>>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>>> ---
>>> tools/testing/selftests/resctrl/cat_test.c | 2 +-
>>> tools/testing/selftests/resctrl/mba_test.c | 1 -
>>> tools/testing/selftests/resctrl/mbm_test.c | 1 -
>>> 3 files changed, 1 insertion(+), 3 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
>>> index 4cb991be8e31..b682eaf65bfd 100644
>>> --- a/tools/testing/selftests/resctrl/cat_test.c
>>> +++ b/tools/testing/selftests/resctrl/cat_test.c
>>> @@ -314,7 +314,7 @@ static int noncont_cat_run_test(const struct resctrl_test *test,
>>> else
>>> return -EINVAL;
>>>
>>> - if (sparse_masks != ((ecx >> 3) & 1)) {
>>> + if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) {
>>
>> This looks independent change to me which should be put into own patch.
>>
>
> Own patch that is separate from this series. This should go in
> as a fix with
> Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test")
>
Sure. Will do.
--
Thanks
Babu Moger
Hi Ilpo,
On 4/26/2024 2:06 AM, Ilpo Järvinen wrote:
> On Thu, 25 Apr 2024, Babu Moger wrote:
>
>> Enable MBA/MBM tests if UMC (Unified Memory Controller) support is
>> available on the system. Tests will be skipped otherwise.
>>
>> Update noncont_cat_run_test to check for vendor. AMD supports
>> non contiguous CBM masks but does not report it via CPUID.
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> ---
>> tools/testing/selftests/resctrl/cat_test.c | 2 +-
>> tools/testing/selftests/resctrl/mba_test.c | 1 -
>> tools/testing/selftests/resctrl/mbm_test.c | 1 -
>> 3 files changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
>> index 4cb991be8e31..b682eaf65bfd 100644
>> --- a/tools/testing/selftests/resctrl/cat_test.c
>> +++ b/tools/testing/selftests/resctrl/cat_test.c
>> @@ -314,7 +314,7 @@ static int noncont_cat_run_test(const struct resctrl_test *test,
>> else
>> return -EINVAL;
>>
>> - if (sparse_masks != ((ecx >> 3) & 1)) {
>> + if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) {
> This looks independent change to me which should be put into own patch.
Sure. Will do.
Thanks
Babu
© 2016 - 2026 Red Hat, Inc.