Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4261216iob; Sun, 8 May 2022 07:37:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwrNF0CHnc8yyvyqTcjtKM2Fl7t9767SasNrodLMgx+hWQkD5qoF6tWINgUXgqyvhfjCee X-Received: by 2002:a17:90a:f184:b0:1dd:a45:d089 with SMTP id bv4-20020a17090af18400b001dd0a45d089mr3809432pjb.115.1652020631635; Sun, 08 May 2022 07:37:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1652020631; cv=pass; d=google.com; s=arc-20160816; b=0FGCnP0PbGzbfADKvovRaeMvPb+SokbrGX0DiXotXAce6olMIDzCuA3gR4lewmV4gz KcxHHkxU9/SrQkFQ5jbRLqH4ISavGkQYmRHk+qMrECQ7xhFL/qhZoE2gKkY9yuKkSb9o anN/cgCLKkExnLCnHfPVuOVOVjfZLkPjdgMXnZbDppaTO/KXXnj+hoDAwQTh+7kSE/5k IcRXDqa2KrdlVmw5hMIVSh0hcu7H+tU0X/qIvyLN9GNgxs+GD/0hS1fmynNt1lbXuHYY Erx49pDw+daKZNZKj4R6VmWpdU6UjqKmvaROF52ECC1vBkswuH7FvSLL1zzwhNxQWqo/ tlig== 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=2TJiqtcisY8lA0q7Q/q4lYk2ugio9dnvazu6xoDdec0=; b=GBS8XXhnYKA5H8B4a1X1hI0odxewqFeUFqsZ5Ji5EMBnqgPfs5c9xKgg9nQ0K+EH1N meBYok4eK8EeUuAG/p2vlN0qO7k4LIaWxkGQb1xyHp8nnizSmdhrJOb6gkeBguSyd+Z4 y3EEDDa8cdtfgxLtBNfYZo0HEi5qUVWFeSXfnPEYzJlxe3q6ReOCg95WbrciZ0wTxe/z jwB+JOM+Fp8X/1giipR9HCEf6eUnbgqizWBqz9LY42Rmo5N7IwJcBBTH07aMtTPUg0ul yajs4TUBnibX9+SG0GveM/JMVm//N5Zq+3M+pdEFggd49Zxk2AOTt6HQg0UyOQ0TQEWE GRwg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=23dPtIWn; 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 u5-20020a170903124500b0015ebbb0a3desi10039916plh.52.2022.05.08.07.36.58; Sun, 08 May 2022 07:37:11 -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=23dPtIWn; 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 S1391177AbiEFSXF (ORCPT + 99 others); Fri, 6 May 2022 14:23:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235427AbiEFSXE (ORCPT ); Fri, 6 May 2022 14:23:04 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5909120AD for ; Fri, 6 May 2022 11:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kpd5+CTQUCNO/cyOvDBNq9N6DyKExO5xjj7y4xM7Ja9e2PXAPmsK7OHi0zTuox/Y3NZFkxUwcaXqeBHWlxYzXwHE35JX7zzRJ3TphFHKk8A2f9SDelka0O0st1EcZygGcRncO7mopmEQTcs8uPhVUspASEwljg1UhxriYB0MXfcemCcOGgUFZi2COGj1HUr9SqpX4+YUAVfizElNEtPiISRzdsqILQ7S02Re04rXHn18KhU+IKLu2HQZAzJEehY7PZxl5YD36z553Nx28WgyERAh9ybiFqXj/0Asziq0zNIt1bS2Dh1Q60LjuA2qQDo0lpd27mO0oxJC3SWiIFcKBQ== 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=2TJiqtcisY8lA0q7Q/q4lYk2ugio9dnvazu6xoDdec0=; b=BeMiwiGPedIFnILxUMwxtylLkeKi1KDO7RATDhLvD4W1W1yqNL8kU/OKY5TsoKsxfsGgooMGMpeXaE0UwC2GjoGBHevO4G5CBCzA+Q//CxQn/lqw53fbFgI8DH5eIf3ahc/+B3tIbRY5nAKBJttwqQJvzh/hP4pgTWQvM9RRMcnjrCAm9JCNBVHIK93EpXEayvL8WAsVd6YpeNKokI0FtkmhrIQzQX3jKMU8zNQxzz7tK1bnR6rcxPzkymTAvN4LF65lHfjcdJCEA4LvsgxYCwstK0tCAH8TDYsfOWCezs69HOyt++X+hCplnlcuuc9b1sA8HkDwPg+s44PsJo9ZpQ== 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=2TJiqtcisY8lA0q7Q/q4lYk2ugio9dnvazu6xoDdec0=; b=23dPtIWnePd+LnP3PmED3BHrRr+Nqvku/T6VExoXxBMLlWumptGkXLCM91/40kyIDf7ojCYqYX3amrpIRU50jRp5pnA6WAPXjA5PJ17vsRWkXaYQOT7BsXZcJYhLwRF7mVQtXq3HFDwAtKAKmmFfT6M9J+n8S+Fr/hKrzzyRzps= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB3368.namprd12.prod.outlook.com (2603:10b6:a03:dc::20) by CH0PR12MB5139.namprd12.prod.outlook.com (2603:10b6:610:be::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Fri, 6 May 2022 18:19:17 +0000 Received: from BYAPR12MB3368.namprd12.prod.outlook.com ([fe80::1c22:8110:ebf0:f38d]) by BYAPR12MB3368.namprd12.prod.outlook.com ([fe80::1c22:8110:ebf0:f38d%7]) with mapi id 15.20.5186.028; Fri, 6 May 2022 18:19:17 +0000 Message-ID: <4b8b9ae0-07ba-0d54-d1ac-1844062f1c4b@amd.com> Date: Fri, 6 May 2022 23:49:00 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 2/3] x86: Remove vendor checks from prefer_mwait_c1_over_halt Content-Language: en-US To: Dave Hansen , linux-kernel@vger.kernel.org Cc: Lewis.Carroll@amd.com, Mario.Limonciello@amd.com, gautham.shenoy@amd.com, Ananth.Narayan@amd.com, bharata@amd.com, len.brown@intel.com, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, chang.seok.bae@intel.com, keescook@chromium.org, metze@samba.org, zhengqi.arch@bytedance.com, mark.rutland@arm.com, puwen@hygon.cn, rafael.j.wysocki@intel.com, andrew.cooper3@citrix.com, jing2.liu@intel.com, jmattson@google.com, pawan.kumar.gupta@linux.intel.com References: <20220505104856.452311-1-wyes.karny@amd.com> <20220505110140.453184-1-wyes.karny@amd.com> <0b501f18-a6b8-1d9b-e72a-ea6cb33720a2@intel.com> <1a806ced-4bb9-c18f-e614-75e9d9722d08@intel.com> From: Wyes Karny In-Reply-To: <1a806ced-4bb9-c18f-e614-75e9d9722d08@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN0PR01CA0037.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:49::17) To BYAPR12MB3368.namprd12.prod.outlook.com (2603:10b6:a03:dc::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff4d4d7a-591e-473b-f184-08da2f8cee04 X-MS-TrafficTypeDiagnostic: CH0PR12MB5139:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uBewFQ0z0H6ESXw9riK8eI2USh9u7MDgrr2//DWzGRMWWd/KMHn0ymaoIynCe+PPep6rieB9eJMa5JsUfktyyCYDqh7bbH1OktVF9bTTyxDKoVopvqewCIVYcdy+bXxoeKPDsMD71+2eRxvr+EnnRaPL2gnXyJLlTz/Vs1V9juMsZ2qUnNkt+oFD1YLnpDnbZBmYzqidok8ZFye6jjhiF3hrax3urYYX6A3v/bxY/zmrlRcF/Fpyydv0aEqrzNhO0P796XxqzZooBq8JQOondl+nv0igYe/ZznmbNZtz9OowEb1L+f3yGWqSjTWwC1TDr3b/8HoRMC880dtGZ9aI/TntEF2exuAOMrF0HXKjW0Me+3R2hIgOypO9TJfCAfODEeCFjLlQ9Iv4/h0HaSER9ANkIZ8nzW08bhVvNca9gNXm4VAOEsGfTmT26ZxX8zk3b60jPxL/Kem4r/u8mhphu647gWY951VM67pDszDtvHqtP+XgklYNSKhPfYpd3nQ2proBTv9x0G6BnHkihnq+elWFydq2ZE5q9TMLT3m6Iko+9+KmJB9nC48Xum3AZt4OX6AOHGEQ0HXUy3rKAwYPjn0XG4TD4Y7AHvVe/gsOjQPc1Yv91Cyq/5K0pqtjCNFjZUk8CJumtVPF4yxI44u0cpJj8TGTROd2kz2Zr+uYLNqsMpuIY9Xs6krXKT5/hpK1Pjyx2WfnLtYMY78Pbdo/l2qK53Bt6ijOYQeXZqRXHqA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB3368.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(5660300002)(6506007)(508600001)(44832011)(7416002)(53546011)(55236004)(316002)(4744005)(38100700002)(6486002)(86362001)(4326008)(31696002)(8676002)(66946007)(66556008)(66476007)(6666004)(8936002)(186003)(36756003)(2616005)(2906002)(6512007)(26005)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QnF6NnFzY05rOU1sRVVHM3BvRU50SDVhalFVUnJpQ25sVnNRWGluK3hjb2c5?= =?utf-8?B?RWlKa09hc25DM1NkQzZlWUxsMUJEbEU3M3RsZFA3K0U3bi9iQm16bFJTazVq?= =?utf-8?B?SG9PUjlPTFdWMDVqMmYxOVpVQ3R0aHhoRElxRlpFZGJmSWs2T3dQaTd5QXBY?= =?utf-8?B?dEpydlQ2Nk5KS0s3ZTYzaWF4UU4rTDNqUXIyZkhRSDJaOEMvdFBSL0EyM0xm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QUhEeGxRZFVpTENyVjJwcXFVVGxIQ0JV?= =?utf-8?B?VVNVRk13U3h6Ri8xdmVuQWtwb0tqUWV0Q21zYjAwc2xQR0JMZytia2FXOEVL?= =?utf-8?B?azJGWmQyVXdJNmZlR2ZSaEltQUhCQSttaTAyTDFXcEhCSy9PQjNoWG9wRUVK?= =?utf-8?B?c2lJbmdWSXBHSjgrRDJMT0VYUnh2SGI4L0pML0w2ZWpBZFRkcllKRUJ6Szd1?= =?utf-8?B?VndCc0pGR1lKSW5xUy9KNzR1bUlZMzNVV2JxcDkzMTQrOVh2bkJtU2FKbEFR?= =?utf-8?B?YlN6K0tia2Rza0tONVVUR0JIQmdUREJpN3FUaWViUzFBUHJWYWhLUT09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff4d4d7a-591e-473b-f184-08da2f8cee04 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB3368.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2022 18:19:16.7824 (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: 6riIaK6CeIjF6nOq8Pc4UYf27Jdja6R9qvyTTjTbUyQRufIgcg6EukiXxsZdTG38uiYN45BlZ15TFlZKM7YCUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5139 X-Spam-Status: No, score=-5.2 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,T_SCC_BODY_TEXT_LINE 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 On 5/6/2022 9:22 PM, Dave Hansen wrote: > On 5/6/22 02:42, Wyes Karny wrote: >> >> So, if CPUID.05H:ECX[0] = 0, MWAIT extensions are not available (not allowed) and hence >> it is safe to use MWAIT with EAX=0,ECX=0. Otherwise, we have to check CPUID.05H:EDX[bit 7:4] >> to get the number of C1 substates and this should be greater than equal to 1. > > Ahh, I misread the comment. I was confusing the CPUID leaf ECX data > with the use of ECX hints to MWAIT. > > Could you add maybe a sentence or two more in that comment to help > clarify the situation? Sure, will do. Thanks! >