Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1218407rwb; Fri, 23 Sep 2022 09:35:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xeVyzxsb3Uh/t/zXGb3JNu0cfuRBbcmnt0Hv8hAGqWEplFAZIq21bg0jIpHVI0Exa/Jcs X-Received: by 2002:a05:6402:5489:b0:43b:b935:db37 with SMTP id fg9-20020a056402548900b0043bb935db37mr9548336edb.347.1663950909549; Fri, 23 Sep 2022 09:35:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663950909; cv=pass; d=google.com; s=arc-20160816; b=UVyPSXSqabEt7RMxNN4IKQ/cioAdiR1Q0D3BWJVfXDNOEbeVBWm2u5I07hdSSKCRIo tZgp41az+KH0gX4YYFXf3OWYXPK6z/7dxrgJ7nxwA6/bGmnLI6r/kZP3/zcNeI7mT//e Fmvq/TrLCFCQVcYOdSoC2Pa7jLvbZgYC4nrYoYhkckt3dzQ/6OOd3AZxaIeaMYYTdsDi GE4Nea/k5vtUzUhndPjekeRgF1t9YHgcasijS+ay94ha777/1jle2ABlc4ePobtFXXL9 C7GoCz1TqjZbuWrwKJOFnRfCeGMqog/agd0rsSpfkS+67fJY+9Qo0IaX8nkcGuJDfk0d AkkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=V9ACFRlDEGvF9E4S4pItGVHCEcC1swWoZZ6ih+5rmCk=; b=V7vHpVpzA4r0Ufhk/SmWVx0htTzTxJADBVrg/lTBVqow5mXZFe9h1sCtkXBfNUCU6m ten4sIIqG52UAJQxSgeMArS04Kwxk5OYXooTemsau0qB9Ac0QwIlJoPKdoQRWUm4niwt i5hxm+nK4P358VgQdbkuXkrowsocMMnroJkcxLptQPiKlG3rQaYLlvjy5jp79IfifLRY Lik1iITtFUH2dumr4f61bEz2kX3paJVHNF2qoQFF9UDJFeUVT98QuHRAoFnnVDkdXe0y a9MjJbxIKt/YD2pX0FQ0YACwUNhMMKaDqO4AQrLr8EKIY8SyXesBJQOE+VOG8BF4+MLH RFmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="Kjb/5piq"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a0564020e9300b00456c71e5a49si1537027eda.571.2022.09.23.09.34.40; Fri, 23 Sep 2022 09:35:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="Kjb/5piq"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232029AbiIWQZ0 (ORCPT + 99 others); Fri, 23 Sep 2022 12:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiIWQZY (ORCPT ); Fri, 23 Sep 2022 12:25:24 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2065.outbound.protection.outlook.com [40.107.244.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 976FFA831A; Fri, 23 Sep 2022 09:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L7yqOGXGbEuwN0M/bZV0ws+jPImaQOAwft6la/8cNUgVaajxLEjFeVcWwATDSvfkpFpKs8J6+I7o/WliqUyKacpey7b/c8cUrWPWM8tADHsjMpknYCpSpYVp48bnX6WWJ4bEWtfFv4CplFOJWuCKiWDnJg5MXAXokB3M4VgDw7+2HsHb50ZAPPfd2DpfV+1zRtDv0AHe6JrJhdo02EcMOzlZPISofzBUbvupGjY1OtZSxj5Lbt3V7vqeShAhgKUvnD1AT1eZiPHxh7i5UO2k3PiapjpUoAPnOGsUjitc3kmm7ZEsgtlVHTB6viYVz9froFfkGnfWb9ybhVIjn7LTJw== 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=V9ACFRlDEGvF9E4S4pItGVHCEcC1swWoZZ6ih+5rmCk=; b=CPYfSfxfkTWmPAC4SDjbOMLIS38XfWZ3Uh+O9pP1RBGbBuLxVjV09CB/ktqRsCBt1WLc916sd+GbqBFEq93h/uEI/wCOG/f4Go0n63xP1+u4fk60/6u0vCINMZC9/8hVv/e1jcHzhB8ulKJJMktAphnytcsGCUtsSFd9HMNdZiMGbd1TMlCI5TAbwED/MBE1AOOHsxRm6BPiTkG3lWN3LQiUN5qZxYmPAXxIloatoIHimHHS74SXoh35ArcqkG4x7nzX1Jt1iAa3X8zlDFs5uvrZ/sZ5VuP+SBHczu5dKSzngq00XM5ZOuGZGaV0YuXyvTFV9vb60Q4OTmBRDe0fqA== 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=V9ACFRlDEGvF9E4S4pItGVHCEcC1swWoZZ6ih+5rmCk=; b=Kjb/5piqb1Rd1IKTGxZwMMYYROmHSakiyhSRRgl4isoaBhMBIXnh4Hytd5oNQxlYE+6Ev3F5rCcdNob41y1sonZJHClmpFy8DEPKnL41/n7bhuKeg+KVJwsZL5hks79OZKY7T0oJjrn9mhcX50KM1+ORWyYe3Wxf4lHZCtoqbjI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SN1PR12MB2381.namprd12.prod.outlook.com (2603:10b6:802:2f::13) by CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.20; Fri, 23 Sep 2022 16:25:21 +0000 Received: from SN1PR12MB2381.namprd12.prod.outlook.com ([fe80::c534:ae1c:f7a1:1f33]) by SN1PR12MB2381.namprd12.prod.outlook.com ([fe80::c534:ae1c:f7a1:1f33%4]) with mapi id 15.20.5632.021; Fri, 23 Sep 2022 16:25:21 +0000 Message-ID: Date: Fri, 23 Sep 2022 21:55:02 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2] x86,acpi: Limit "Dummy wait" workaround to older AMD and Intel processors Content-Language: en-US To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, dave.hansen@linux.intel.com, tglx@linutronix.de, andi@lisas.de, puwen@hygon.cn, mario.limonciello@amd.com, peterz@infradead.org, rui.zhang@intel.com, gpiccoli@igalia.com, daniel.lezcano@linaro.org, ananth.narayan@amd.com, gautham.shenoy@amd.com, Calvin Ong , "Rafael J . Wysocki" , stable@vger.kernel.org References: <20220923153801.9167-1-kprateek.nayak@amd.com> From: K Prateek Nayak In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0068.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:99::9) To SN1PR12MB2381.namprd12.prod.outlook.com (2603:10b6:802:2f::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PR12MB2381:EE_|CH2PR12MB4294:EE_ X-MS-Office365-Filtering-Correlation-Id: 17ad43c0-a1a2-4bca-22a9-08da9d8035d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lOXk0majXb8ivMz3Na/D9/B/vC748TSSpoN+xyaCYx+ZmalMwGcVD9o9LWD+kmf8Yi6qn42XH/FSyU55M4tcnqzQaNJHs3ISh/HpF8OxU3j7ZChzNp0b4ZQ3GjFIrSUfUTSzDPGHUIe/yoBvjIVMYlKXUz0IyFvSCBNqSSo5uMlSf2e7SB/UsCvUyjsw+HNt9fs+OOhPNnKKsaFgdatcUgr+4dAfvvPO2adroAfSF3QnGXJp44cLm7TGeRk/sHM/1aZ32Lj59+mseAIQtpHqRWbQQsdv+JMsr0Z53pNGYZ5ohfvB4ROVRqoPDk4ATzywDLYPruO3tcgUp3u+RRhb0DuD3htrGA9kfYbFQa9yHbGHuLOxB1Jkn3HoCBypD/9aewOqYSOs5KYIv/b2aJ7L8KMuYQzKKdDYlcd8+UInc/Tu5hvGyNQQOl2p36JAn6NLKDokZMDgWpxz6ZxC3oZeOAdWhN2ydv+pAqIl6fe6e+sdgRyLx6OD/UT9fhEZJZoZK2gjfQjmEue9HVftJGituzCGnQ8HbxWbAKH4IzxZmLQ1su38jee5Sfd30ot6BaafogMID7pvmRY+M7WflhJ8FIYc1k7YwpqLoHjhkfkexK4rNjiDSdcFp9OxdIuBKuoGX9uQiyZhoS1UV1P740gz1Na4rZvxnUF+rxAWRA6MDgN1GANLjPPe0Lidedo7NgVXL3plLKyqtV/IVOS19OoF6w23l0hwYSbFJp3OtUYKYS1XDKhSnpnK1bNDvkGzw+q97cra6SCS+eV3Q4EqljQFhGA6ISJe3dgCi3x/dlkaSPjVOEjeCfUBB9KpH7jW3DuelJglaAzrkAQoP2e75nGUTaYqSBxYbENiUke7gawHJn5JWXbR3paM4vdu/r0Kiwlc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN1PR12MB2381.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(376002)(136003)(366004)(346002)(451199015)(4326008)(66556008)(66476007)(66946007)(478600001)(6506007)(53546011)(6666004)(41300700001)(966005)(316002)(6916009)(54906003)(8676002)(6486002)(86362001)(38100700002)(2616005)(186003)(26005)(6512007)(31686004)(31696002)(36756003)(5660300002)(7416002)(8936002)(2906002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SS8zcEttQVIremJHM09ja3RLNncwdHZEaThLY0E1a1hMRUlSMXM3RkVQYVlX?= =?utf-8?B?cDdGTWc4aFZCd1UxaEtrTVg0L2R1TGo5cmhVdVhIaGF6TlFJYXA5eXJSaTVx?= =?utf-8?B?MGxSR1VrYW9qVDlNUi9PdndyM1Q1KzFKV3MxREtWL2dqWkpuNkptMVZZR3hG?= =?utf-8?B?S3dBRDhKOWQrTUU0azhTWU5TcDRwc2hiOTViNmFiK05zck56L3dCMThibWpY?= =?utf-8?B?djhvTGxaR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JqK3lMYmlKcDhrZ0Yzc0x0YmFSZnph?= =?utf-8?B?QXZ1dzhVQXNiMEdHS1ltYWxKK1lDaVNNQUNzMGdRblRrRmpwQ28vZC9uSjly?= =?utf-8?Q?bNvec0WPCkrWyv1F28apQ3+9P?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17ad43c0-a1a2-4bca-22a9-08da9d8035d8 X-MS-Exchange-CrossTenant-AuthSource: SN1PR12MB2381.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 16:25:21.5921 (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: QfDus/v0tTf97BSkomYlurvXGKyrQcDSxqaqNDKP7fB3X8rwtIY/HdnSDye0AUM2BRXBPUSTTcwsgMQM3t4xpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4294 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Boris, On 9/23/2022 9:16 PM, Borislav Petkov wrote: > On Fri, Sep 23, 2022 at 09:08:01PM +0530, K Prateek Nayak wrote: >> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h >> index ef4775c6db01..fcd3617ed315 100644 >> --- a/arch/x86/include/asm/cpufeatures.h >> +++ b/arch/x86/include/asm/cpufeatures.h >> @@ -460,5 +460,6 @@ >> #define X86_BUG_MMIO_UNKNOWN X86_BUG(26) /* CPU is too old and its MMIO Stale Data status is unknown */ >> #define X86_BUG_RETBLEED X86_BUG(27) /* CPU is affected by RETBleed */ >> #define X86_BUG_EIBRS_PBRSB X86_BUG(28) /* EIBRS is vulnerable to Post Barrier RSB Predictions */ >> +#define X86_BUG_STPCLK X86_BUG(29) /* STPCLK# signal does not get asserted in time during IOPORT based C-state entry */ > > What for? > > Did you not see this thread? > > https://lore.kernel.org/r/78d13a19-2806-c8af-573e-7f2625edfab8@intel.com > Yes, I did see the patch, but Andreas replied to Dave's patch attached in v1 saying that he had seen this issue with AMD Athlon on a VIA chipset back in 2006. (https://lore.kernel.org/lkml/Yyy6l94G0O2B7Yh1@rhlx01.hs-esslingen.de/) Therefore, Dave's patch is not sufficient. Dave suggested the use of AMD vendor and family check, but Peter then pointed out that we would also need the Hygon vendor check. Hence I worked on the v2 which addressed these with the help of X86_BUG_STPCLK so that we can avoid vendor specific checks inside the common acpi code. -- Thanks and Regards, Prateek