Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp6179lqm; Mon, 10 Jun 2024 10:51:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/XqfNGvPZ5xenfzh2O/U84A3/lMKCBP/bz8ae1nU1QsUtTOI+EgeszI+h6bd8GJZky7Zi3Olk3EWt/axphlxNCoolsjsuM/wq7yTNZA== X-Google-Smtp-Source: AGHT+IFauO9nkM20jyGM3wbcbbW8rHnaNhOHogHXO1m5T+NDT0obfiTwJBUJyObYfrAHfc/+WhRP X-Received: by 2002:a2e:b04e:0:b0:2eb:d584:a1e0 with SMTP id 38308e7fff4ca-2ebd584a7c2mr38941201fa.50.1718041912182; Mon, 10 Jun 2024 10:51:52 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c809a89ebsi1442757a12.613.2024.06.10.10.51.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 10:51:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208679-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=klFUu+L0; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-208679-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208679-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AAD541F2362C for ; Mon, 10 Jun 2024 17:51:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FFDF14C584; Mon, 10 Jun 2024 17:51:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="klFUu+L0" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2081.outbound.protection.outlook.com [40.107.93.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A39314B978; Mon, 10 Jun 2024 17:51:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.81 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718041893; cv=fail; b=dub6Qr9XsJVI4nTfO7HxscyLBnKplcC07RZyLL89I6gf5j2es8uLx0vI8taVKeqNE/D/pPyQBMS9Y8Ad45UwXC6Rzb6NNp9iKpjVlGJyHhbgTTt7Th2B9o0lnQmM/EdB2EmxexQFIoPCxuJIb4TU7S+sFtdEHvZD8ShOAN7ViV0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718041893; c=relaxed/simple; bh=a+xp4L6pcnIGb3g0XrS7uZFmvaYunwvuvC2WcKsLRTU=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=NFdUj1h/LMJCXx1dElh2djCvcaCAI80BCAVeYrgZ8T6wDONakLMKgHmHSTNEzNHxJbDS2nKngWps8c1CE84ZzuM3X+Hu3Yj4tCQ/j40QbJcsVhnxi0BNZoKGZJ7CwSR04dJwbYZPA23hxJF5orprXwwFn2BN0oQyFYhEgsb44ts= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=klFUu+L0; arc=fail smtp.client-ip=40.107.93.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PmRn0PXHbWtIYW1ykKjjdgtFq2rvpaNMUFR5p5nwWmRl6+44IR29Kyi6JQRVRQP0fk2tWOXUD2K2+g0P85crBcAz7gb2bNmMCbFFY8Cf5LBmuj8JYZPw3VZkiyO091JF9pAqCxJnvKrCmLeMhVcDk6JnEcnDoj90z8eVf7+ohKtwW7112EA6UJsqGAVwrF4+GhAvhG0UJV+C12myiU21xPfofTQNBcS919Y76Zs1ucCfE8xH8kT8SiwxoUY4uVIhrNku3XEFyOa5YoSPmy+i89Q2MrjZj3vkBbhLW/Eb5GFDN8lhbFwoobGDwQJgO8Sf8TLmbbmVTf5vToDHQlU+hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1mW1dJwcFjejXwtjh93jH+bFn6/XJWi72t9a85vliN8=; b=AGdK6/Az4CaOX4y6Gs0DB3SNTRM08znrLyNTXIWLm//NGpTJhw9hF37VPTQZZkvTPo9yxTJYVvQXED5o3XxSwgc3wU811g1q84GhpXo4wTV6pRg9sx4mtPJceqXl/paDc57wIH6dgoHDAU0DVLGEMTWVwImb+cdXhLB/ib9nBoQj2CadbEnWj5YxQy2XjMTE7ScDPCx/uXkECwy91kJcFxP1j7+c/GjaJZCayjqPsSYq8WED1W/4CK1CYP8QdXum0bNY88hbpoOeSXQCYU9EENVj/ovRDq9N0chTs0w1a36zVr51kQ8iHyTlX77CkewhFHMxU9b+OXMyEwm4SBvJXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1mW1dJwcFjejXwtjh93jH+bFn6/XJWi72t9a85vliN8=; b=klFUu+L0GqnNSpnkPd+TVPZmyMSGds8tRGKjzN1e3kmi5DF8Jyt/XYm+VhgLwteBFKF64R7TzS7zN9NxPIyP5ppbWevB7IXiHwtcYYChp8ZEqWWEreA3eSo3pQn3iJohri6otEDjhoME0gw9864LBZtsBaiY0rmgnTtyXok0Z4Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) by MN0PR12MB5953.namprd12.prod.outlook.com (2603:10b6:208:37c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 10 Jun 2024 17:51:28 +0000 Received: from MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87]) by MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87%4]) with mapi id 15.20.7633.036; Mon, 10 Jun 2024 17:51:28 +0000 Message-ID: <0e153d27-fa1d-4c47-8d4e-a2004c991ffc@amd.com> Date: Mon, 10 Jun 2024 12:51:25 -0500 User-Agent: Mozilla Thunderbird Reply-To: babu.moger@amd.com Subject: Re: [PATCH v2] selftests/resctrl: Fix noncont_cat_run_test for AMD To: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: fenghua.yu@intel.com, Reinette Chatre , shuah@kernel.org, LKML , linux-kselftest@vger.kernel.org, =?UTF-8?Q?Maciej_Wiecz=C3=B3r-Retman?= , peternewman@google.com, eranian@google.com References: <3a6c9dd9dc6bda6e2582db049bfe853cd836139f.1717622080.git.babu.moger@amd.com> <7679d70a0ea939db13ae9dac20de56644460d6df.1718035091.git.babu.moger@amd.com> <91052cec-071b-7cc7-5f85-4fa29ec2aea4@linux.intel.com> Content-Language: en-US From: "Moger, Babu" In-Reply-To: <91052cec-071b-7cc7-5f85-4fa29ec2aea4@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DM5PR07CA0098.namprd07.prod.outlook.com (2603:10b6:4:ae::27) To MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW3PR12MB4553:EE_|MN0PR12MB5953:EE_ X-MS-Office365-Filtering-Correlation-Id: 60953e25-e388-46c1-d378-08dc8975f41f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?K2hJTnBhOUlob1VHZTVYN05TZ1NUVVdYRFk4cE1xWlRRRTQ3MEpoYTZReWcr?= =?utf-8?B?anBobTZiMnZ3TmlIQmdiMkJPUHB1cFdyN0ZGV2tOTDdVTDBlNGtSSnBzZzIw?= =?utf-8?B?SWtpUXJqamJBNFFDd3BiQ0pYZ1ExdTFITW5LMHkrMzJLbUloU2pZNFRJaXBv?= =?utf-8?B?aGpDbHdmRWxpMXg5UTNtWFhKY09XV2owUE5RSGRtY1loZTltUG1FTC9jdnc0?= =?utf-8?B?eFQ1U3ZoVnBYMG9BLzFRcmQvUjBrZUNsMWtwd0syWWg5WWo3czc2K3Nvbmx2?= =?utf-8?B?amxkaHBWVDluZWZzRlF1elhGR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XA0MkxQMzRLLzV5M1ptb29NaThISnBFcVdScDdI?= =?utf-8?B?S1poNmM3Ly9zWDExY2tVNEtIeXpiT0tzNnoxcGpwYWQ5aHVwRlp3TktvOEt5?= =?utf-8?B?cUx0OHNmYkFUOHdaTTg3dnhybHRraXFlS0o5M3VydC9oWXlCcmF3NHBVQU9K?= =?utf-8?B?Qjg4TmEyZXFDRjYzdDZZNU5KdSs4cUtwWTJWN1JJTDNNdXpYdW1GdkdTeFpu?= =?utf-8?B?UW9ZdENrQ0pvbi9oRW45RWNsOEFjVHJhWFdZa0tsWGFHRXJsK2YwR0FJQWpZ?= =?utf-8?B?NU9KTHdQN3plN2pDRmFYNDM4MXBQNXJBQlJtRWM3bkg4clQrTXNubEJNcHd1?= =?utf-8?B?Y20rLzhMaGdOa0F5NDdvMnJJY0ZzSEhrRVE0RVZ0REE2aHlSMXp6a1RYV2JI?= =?utf-8?B?UWM4cTRlZE9uS1V3QTROTUFxZVhqL1R2WnVwRVFKWjBaZjFtRXNTWHkyeVB1?= =?utf-8?Q?CnFA0q4JrZvb2AoKcKvM?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR12MB4553.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aTJaNXNzaE4zajFzblM1WkFza2RRckszSXdTU254VHJzT1RwUHF2aFNvc0Nr?= =?utf-8?B?bms5TkhKRmgwcXl2MmxsMnl5a2xnbVpveC9KSFlqMU9aN3Jud29CRWFoYm5s?= =?utf-8?B?NTlvd2NKUzZycUlRcG44eWZjRVh4RGpJRThTWko2SGdKSXpTbStacE9zb1Vp?= =?utf-8?B?WlBTOWlSYURjNzVnOUlDa1VlUjJ5QlRZWDhPb2JQc01MN2VUTDYwZVY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nUW0xbkR2OThJOXphTzJnSWlCUUFRUHBYWEgyNzJJK3Rj?= =?utf-8?B?dUdNZTBQNW1HN1p3M0s3bGxMTWlpcFNsK0RWcDhmU2lLY2pRZis2SFg4dDBG?= =?utf-8?Q?AfSo=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60953e25-e388-46c1-d378-08dc8975f41f X-MS-Exchange-CrossTenant-AuthSource: MW3PR12MB4553.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2024 17:51:28.1146 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r/hmDD4qf8WUsxcoxYASX7PFIRLBa8UNQ+5Jezj1YSSP+wwCBv57O2GnRUNp2Jbb X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5953 Hi On 6/10/24 11:20, Ilpo Järvinen wrote: > On Mon, 10 Jun 2024, Babu Moger wrote: > >> The selftest noncont_cat_run_test fails on AMD with the warnings. Reason > > noncont_cat_run_test() I want to mention the test here. not function. How about this? "The selftest non-contiguous CBM test fails on AMD with the warnings." > > (In general, use () when refering to a function, same thing in the > shortlog). > > "the warnings" sounds like I should know about what warning it fails with > but there's no previous context which tells that information. I suggest > you either use "a warning" or quote the warning it fails with into the > commit message. > >> is, AMD supports non contiguous CBM masks but does not report it via CPUID. > > non-contiguous Sure. > >> Update noncont_cat_run_test to check for the vendor when verifying CPUID. > > () Sure. > >> Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test") >> Signed-off-by: Babu Moger >> --- >> v2: Moved the non contiguous verification to a new function >> arch_supports_noncont_cat. >> >> v1: >> This was part of the series >> https://lore.kernel.org/lkml/cover.1708637563.git.babu.moger@amd.com/ >> Sending this as a separate fix per review comments. >> --- >> tools/testing/selftests/resctrl/cat_test.c | 32 +++++++++++++++------- >> 1 file changed, 22 insertions(+), 10 deletions(-) >> >> diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c >> index d4dffc934bc3..742782438ca3 100644 >> --- a/tools/testing/selftests/resctrl/cat_test.c >> +++ b/tools/testing/selftests/resctrl/cat_test.c >> @@ -288,11 +288,30 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_param >> return ret; >> } >> >> +static bool arch_supports_noncont_cat(const struct resctrl_test *test) >> +{ >> + unsigned int eax, ebx, ecx, edx; >> + >> + /* AMD always supports non-contiguous CBM. */ >> + if (get_vendor() == ARCH_AMD) >> + return true; >> + >> + /* Intel support for non-contiguous CBM needs to be discovered. */ >> + 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 false; >> + >> + return ((ecx >> 3) & 1); >> +} >> + >> static int noncont_cat_run_test(const struct resctrl_test *test, >> const struct user_params *uparams) >> { >> unsigned long full_cache_mask, cont_mask, noncont_mask; >> - unsigned int eax, ebx, ecx, edx, sparse_masks; >> + unsigned int sparse_masks; >> int bit_center, ret; >> char schemata[64]; >> >> @@ -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 and kernel differ on non-contiguous CBM support!\n"); >> return 1; > > This looks better than the previous version, thanks. Thanks. Babu Moger