Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp221720pxj; Thu, 13 May 2021 03:26:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJoydfkvX64BToP7+VRcyA2uFIym2B5rtSPsOXfZdC7NXTaxELo2Wgxw6yv+O4vZFdahE/ X-Received: by 2002:aa7:d58b:: with SMTP id r11mr5789092edq.231.1620901591760; Thu, 13 May 2021 03:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620901591; cv=none; d=google.com; s=arc-20160816; b=VA1H8JJVRtpTEjG9pMGXzyLVVKXlLBgOZrCfvDl9Mp58ELHirBqRx/sQUKm6w6l0Bn /H0PTVAa5YdlMRBcxWF/DvwpSxrqTbAx/XLB71qPcKnoqvBfv7DM2/ZNcEkwcR6e+hvx LowIWPaySIeXQ80+20bqiL76uzrYCagNbHbI6gl7CfMf9AO5Jn1w0XfEb5JKl43k+XQ5 wM/hqPPkCFCb3QQteRN8RZ1D56GIvdvVI2jSj9lvxuO8FZYdEtpdugqxzT7//aOz/0Pt 9Xz2TtNV5ofaBx4cX0Rhr+USyPnJBhlvcVpUApqBTRn4fF4eH0p53gETqwjch5S+Ypof bCRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=2jl85mWlNO4YVaZPEf3jXikE2IJTy8iXBvihAGd8GkQ=; b=t0b2lYZ9XRtQeapngERV7sGaBaSmL3qKojp4Pv/xnlt3h24T7jKtaWV5lTvKVMoE6I ocMj/FyoW/VHhUgOEBikVycTO5D0bWlf6NHXZhzhAL8l2fdEJ3bMOcg93qzrZX9xO++k u9vDwhxAvji3TsMr/h4Zfsmm0l/+i5tUwkA7BwL7B1L93hmdc7kroqDmhbW0UgKwJHuH h+z7E/uvxAG8w5x95q9AfOwLTfVQR5gFOIjzX2y0fzn8/WPVMJjEMwE+wURzwoZact+o FMMlqVLzl2/rKnhHpZuGajxv4iFR8L0i4PCt5zoq1lSiwbfG6J+dZg6cO/XNggb5F46c dN9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r14si2434537edy.200.2021.05.13.03.26.07; Thu, 13 May 2021 03:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbhEMKLR (ORCPT + 99 others); Thu, 13 May 2021 06:11:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:43982 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231267AbhEMKLP (ORCPT ); Thu, 13 May 2021 06:11:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4F941AFF6; Thu, 13 May 2021 10:10:05 +0000 (UTC) Message-ID: Subject: Re: [PATCH] cpufreq: intel_pstate: Force intel_pstate to load when HWP disabled in firmware From: Giovanni Gherdovich To: Srinivas Pandruvada , "Rafael J . Wysocki" , Viresh Kumar Cc: Len Brown , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 13 May 2021 12:10:04 +0200 In-Reply-To: <3fdc70c267d40561bed10fc722a8223a0b161200.camel@linux.intel.com> References: <20210513075930.22657-1-ggherdovich@suse.cz> <3fdc70c267d40561bed10fc722a8223a0b161200.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-05-13 at 02:24 -0700, Srinivas Pandruvada wrote: > On Thu, 2021-05-13 at 09:59 +0200, Giovanni Gherdovich wrote: > > On CPUs succeeding SKX, eg. ICELAKE_X, intel_pstate doesn't load > > unless > > CPUID advertises support for the HWP feature. Some OEMs, however, may > > offer > > users the possibility to disable HWP from the BIOS config utility by > > altering the output of CPUID. > > Is someone providing a utility? What is the case for broken HWP? Yes, I know of at least one server manufacturer that ships a BIOS config utility where the user can disable HWP. On such server machine, which has an ICELAKE_X CPU, if the user unchecks HWP via BIOS then intel_pstate will refuse to load saying: intel_pstate: CPU model not supported because ICELAKE_X is not in the list intel_pstate_cpu_ids (defined in intel_pstate.c) of CPUs that intel_pstate supports when HWP is absent from CPUID; that list ends at SKYLAKE_X. An alternative approach to register intel_pstate in the case I'm describing would be to add ICELAKE_X (and every CPU model after that, forever?) to the list intel_pstate_cpu_ids. > It is possible that some user don't want to use HWP, because there > workloads works better without HWP. But that doesn't mean HWP is > broken. That's true, a user may legitimate want to disable HWP, and we have the intel_pstate=no_hwp option for that. But for that option to work CPUID must still show that the CPU is HWP-capable; when disablement happens in BIOS, it's not the case. The wording "hwp_broken_firmware" deliberately has a negative connotation (the intended meaning is: "firmware is broken, regarding HWP"), carrying the not-so-subtle message "OEM folks, please don't do this". My understanding is that the preferred way to disable HWP is with intel_pstate=no_hwp, the firmware should stay out of it. I hope this clarifies the problem (there is an ICELAKE_X somewhere out there that can't load intel_pstate, which is not nice) and the intention (discouraging disablement of HWP via firmware). Giovanni