Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1390674lqa; Mon, 29 Apr 2024 07:19:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4tQemqUhEsorQFmQP4bMq8OQGXv4xDMRiuyxZ9hRRkogBiDDr0BnXuTmCg7KLjBLBcaF5Xhomy281ub/KEfuRzt2pruLnAxNJ6d04CA== X-Google-Smtp-Source: AGHT+IGFRll4MsCdYbEXk2P3oXxAevtokKy6XB9XTKyC41c5vLnpdfg+P9DoGNBMTzghjrhGOGPE X-Received: by 2002:a17:90b:888:b0:2aa:d88d:d706 with SMTP id bj8-20020a17090b088800b002aad88dd706mr9762032pjb.4.1714400360241; Mon, 29 Apr 2024 07:19:20 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bt4-20020a17090af00400b002ae08a15100si13134793pjb.149.2024.04.29.07.19.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:19:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=AQfCQC0y; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-162433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162433-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CF4BD28137D for ; Mon, 29 Apr 2024 14:19:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 703AD7BB01; Mon, 29 Apr 2024 14:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="AQfCQC0y" Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2075.outbound.protection.outlook.com [40.107.243.75]) (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 C9D0F7867D; Mon, 29 Apr 2024 14:19:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.75 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714400351; cv=fail; b=V7hvQzCKEpK3j7sHI5SaGYeXwCR9OjWRxEN2qMQ8JUBXh1X6YE56umoUBy6eogPEdJ7w7gm3bS09cPbHIq8Kl2r94oFi3ct5D1kzRN90TrdjConEKbuFlxP/557XzM7pt5ydVzYxQRbH/d15bHh2HB8lJ/nksYyvC6Q8dwi1xpQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714400351; c=relaxed/simple; bh=/2Euq0N0v3PVxYzVkLO6El2S6rbZtV8eKA+2qdjaoL8=; h=Message-ID:Date:Cc:Subject:To:References:From:In-Reply-To: Content-Type:MIME-Version; b=ZZix5quCl3YxQo0jKK0vzAeG7jk7rI0VqBY8EtKYugeyxH8xpNsA2CUegFJhilXTVMS9m0sA2sDUthcpAh1rBCqNm2+gFRNAKxLBPlAf0gKvhLBTZpoWu8ZtfFKds4uZ/E2HzfXo7m3BehwKt5g4KecEoiKmYHPNXbRyMV5tmec= 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=AQfCQC0y; arc=fail smtp.client-ip=40.107.243.75 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=S/7CQMoLExYzwqQYtJFQ8c0SX68fWefYIQBXP996S2sQB3y4cT7jRnOZC/L0TntBEZEsbe9zCR4yiDPSMvOp3vD7+5d90B/oFH4O1ro0PGNWAEvbl2IBOi/3VbSLizFxVk20GGZFVI7WdQrBhOj9zDXTZ9rYW6uHLY60jbnKRzKljVwH3BbC/LxuH+7gF9HclGxGY/EfBUWPRfmyNZHn99pLTj30Nmy3EIsEkJ6anZuy8rtd2VF4TU6VbUinvbSbhmnt7ToDnF06uI2RKfriLm+3Iv8j3ZGiz15Pzka98NOdDSpXEz68PmwCOj8c2TEBpX5UOZimXwhN865R0G4/Aw== 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=S3hg2BMvRucF0LStk7g/dEy/qW0ow5k+332vnJB6mQA=; b=nsi/jDKCipcbVC8uf9OhPQnUiSxTuuVS6FLZ/y5xJs57cIU/BnMjf/RdFKPHUfpGxaFJ4pGsVStkva9wnwbK0PCaz+7ytc+5PPkGsgxpU7cKwzeeiOXWxm5U1kQ6Yft41ztjURhQvaYPVnmdF7ri7ZU+591p76cJdeCX0LL260OX2t3pEXF5WsY6YEtUDSXIE9XFF7oOfVCj0lt3KUh7RFuIu0lRu/LhKmdph8KPTYjQrNxlfXANHZ4x2V9RRBANsPiBdJVlIoENhLTvKs7M7Na7baVppSUkVeAUeVciErQpB4D8WZvvsurgonHlpyHCMb5uw4pD7t8BCvNM6HFQpA== 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=S3hg2BMvRucF0LStk7g/dEy/qW0ow5k+332vnJB6mQA=; b=AQfCQC0yZhWYGuhkJ8z2YLA2ZMXTaZYP1B/ro4HbLzwQWRg5RursYdxqz2JAHP7IMJm75creb+3hwm+h3+UFNVQnfdVkJQxY7HICDtJaDDLxj0ysw5JDMzOfiiY7gs8EEO68431cRzDJR/M2aobjBLw14fXCCIK/srUJsNXpaho= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3108.namprd12.prod.outlook.com (2603:10b6:408:40::20) by CH3PR12MB9281.namprd12.prod.outlook.com (2603:10b6:610:1c8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Mon, 29 Apr 2024 14:19:07 +0000 Received: from BN8PR12MB3108.namprd12.prod.outlook.com ([fe80::43a5:ed10:64c2:aba3]) by BN8PR12MB3108.namprd12.prod.outlook.com ([fe80::43a5:ed10:64c2:aba3%7]) with mapi id 15.20.7519.035; Mon, 29 Apr 2024 14:19:01 +0000 Message-ID: Date: Mon, 29 Apr 2024 10:18:59 -0400 User-Agent: Mozilla Thunderbird Cc: yazen.ghannam@amd.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, tony.luck@intel.com, x86@kernel.org, Avadhut.Naik@amd.com, John.Allen@amd.com Subject: Re: [PATCH v2 08/16] x86/mce/amd: Clean up enable_deferred_error_interrupt() Content-Language: en-US To: Borislav Petkov References: <20240404151359.47970-1-yazen.ghannam@amd.com> <20240404151359.47970-9-yazen.ghannam@amd.com> <20240429131240.GOZi-cyLh2OhRrNTWM@fat_crate.local> From: Yazen Ghannam In-Reply-To: <20240429131240.GOZi-cyLh2OhRrNTWM@fat_crate.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MN2PR20CA0042.namprd20.prod.outlook.com (2603:10b6:208:235::11) To BN8PR12MB3108.namprd12.prod.outlook.com (2603:10b6:408:40::20) 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: BN8PR12MB3108:EE_|CH3PR12MB9281:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fbcfac5-9d42-4569-8104-08dc685750eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?T3MzY1ZraTdWanY4SUtDTmlVWHhOLzd3SDhjZld0aW5zVE5sT01JL3I0ZGRs?= =?utf-8?B?SkJrYzlHZGRQb2oxVXVUSU5OWFkvcXBoZWRyOWRSZW55TWJwZ083TFgzUGNx?= =?utf-8?B?dTJPb0Z5aWJBZlFjTjM2YjRLbkhJMUp5ajNqcmtwekJsUG1ZQm13MnNGQ3Vh?= =?utf-8?B?c1pQNG4xUHl6UVB4SFJhaWVWRmpzNkl0NjI5T1RCS1l1VGxXUE8vcGlzZ1Nx?= =?utf-8?B?TlV4QW9NNkZBbi9GTUFENmd1d2VRV2JyQmJsWU1NSGVueXFLeFVqTi9pOUJK?= =?utf-8?B?MDdXQ2J5MVkybkFubk0yd0tZYkRRTEZYK3BZeGdwbVowcTZSeXozVGxHT2o1?= =?utf-8?B?WThhcjVmTDBXSTNkYnQ3c1lHQm5zT3pTNmZBS29HNUU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0RDbytMZXdXWEs4K1NmZ2FvbU5v?= =?utf-8?B?M0JJOWRJMldzTmJrbUJQbjhaemtLM1hiV1dlTzdtTWxnYnViUmZsUTkvN1ZU?= =?utf-8?B?eCs2OFMvUnpBWG9uaGdZSTIyOHZ3NGRJT29vaytQR2tCYllGUlVhdHlCbTBl?= =?utf-8?B?VE12bkxTOU5QTittNjM0V0wvTVVka1J0ajBkcjlzQk1RSWtwTExtY3d0aHJt?= =?utf-8?B?WHZXTlQ0MnpFZFc0UFhkejMyR2NVVWxiUXFENDlYY0ZsRTNuOGZqQndmZk5v?= =?utf-8?B?dU1IL0JoeTQvM3ZuWVBhWmVwZS8yZ3RIc0pRbmd6NVhFelBCdVFXZi9IbEdo?= =?utf-8?B?SmRqemQ0WEdCMnMyemwyeEFmUVgrellLemE4U2hrMytDQnlrNFZZdkdrWFVn?= =?utf-8?B?bElmSUNhWUR0R2tIc3doY2ZEcXdkenJjLy9VZkpxcTNIbGRkWXI5UFhnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3108.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d25rWFY5RTFJNHlUWStkQ2RDbmdiVWE1b3ZkdVVRL0dFTERQYXB1OXVwMk5L?= =?utf-8?B?bVFPbVFyRkVKWWUvbS84ZTg3NGRIeThDSkxrRWJhS3lYMFNsZlF3UGE4d2dk?= =?utf-8?B?eDdsMm0ybUN0R3ZqUEJIc1Z0RzRKNWpRdlZQRldNd1NlMWMxRklPcDVxdVpJ?= =?utf-8?B?Umdtc3FZbWxheGZpU0dRTzJNSHdhdEJ5OGl5d3dIQ2taam50VVM3VURCVGxS?= =?utf-8?B?SnpEVXNnTXRvenZDMXBZTWtQek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2p5?= =?utf-8?B?dnh5N3J0Sm9Jd1Bic01seTJKdURYVEFqTVNkUU1YVy9wNXJ5RDgzWkVaZ0hh?= =?utf-8?Q?GpJr1fvHynz8zk98u0NxXvyAJ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fbcfac5-9d42-4569-8104-08dc685750eb X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3108.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 14:19:00.9558 (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: rg/72g9onWfkc7bpKDhCJIcRsl01sJ1wEHr9kGGSHqdMyRosCDyTZnbvuxkIR2MjMabQVeNoZgK1uRj8/y2Riw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9281 On 4/29/2024 9:12 AM, Borislav Petkov wrote: > On Thu, Apr 04, 2024 at 10:13:51AM -0500, Yazen Ghannam wrote: >> -/* Deferred error settings */ >> +/* MCA Interrupt Configuration register, one per CPU */ > > SMCA? > >> #define MSR_CU_DEF_ERR 0xC0000410 >> -#define MASK_DEF_LVTOFF 0x000000F0 >> -#define MASK_DEF_INT_TYPE 0x00000006 >> -#define DEF_INT_TYPE_APIC 0x2 >> +#define MSR_MCA_INTR_CFG 0xC0000410 > > You do see those other MSRs' prefixes, right? > > MSR_AMD64_SMCA_... > > Is this one not part of the SMCA arch? > No, it is part of SUCCOR. The old define is above: MSR_CU_DEF_ERR. This is how it is listed in the PPR: MSRC000_0410 [MCA Interrupt Configuration] (Core::X86::Msr::McaIntrCfg) >> +#define INTR_CFG_DFR_LVT_OFFSET GENMASK_ULL(7, 4) >> +#define INTR_CFG_LEGACY_DFR_INTR_TYPE GENMASK_ULL(2, 1) >> #define INTR_TYPE_APIC 0x1 > > Ditto for its bit(s) names. > Okay. >> +static u64 get_mca_intr_cfg(void) >> +{ >> + u64 mca_intr_cfg; >> + >> + if (!mce_flags.succor) >> + return 0; >> + >> + if (rdmsrl_safe(MSR_MCA_INTR_CFG, &mca_intr_cfg)) >> + return 0; >> + >> + return mca_intr_cfg; >> +} > > This is an overkill. If we add a function for every MSR we're reading... > > Do this differently: prepare the value you're writing back into the > INTR_CFG MSR once, save it into mca_intr_cfg and then write it on each > core at the end of enable_deferred_error_interrupt(). > > And make u64 mca_intr_cfg static global to amd.c so that you can refer > to it from outside of the functions and then you don't have to pass it > around as a function param. > > Thx. > Good idea. In fact, we can treat this register as read-only, since we will only handle (SUCCOR && SMCA) systems. The only need to write this register would be on !SMCA systems. We need to assume that the register value will be identical for all CPUs. This is the expectation, but I'll add a comment to highlight this. Also, we don't need the entire register. We just need the LVT offset fields which are 4 bits each. Thanks, Yazen