Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp694764pxb; Fri, 28 Jan 2022 08:07:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGHfbM2GGrYVII6uyBe1JyUnZUwCjEwfo3Oh2YO2QGUeN4SBsZqT1ypZZtHUSNyq3j/bCp X-Received: by 2002:a05:6402:5203:: with SMTP id s3mr8734765edd.389.1643386051853; Fri, 28 Jan 2022 08:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643386051; cv=none; d=google.com; s=arc-20160816; b=yGZXuwrYrHB391WxKK6LtOHPSrjCTqFerlMupYF8DI1x9asq2qhH8sLpKm33wrXNxw uluVIsGvTwi14uUXp+fA82SaT52ODK4RTPVaVbqa6rxtbfCI1F67UZoA38PVeIKHoECn vFvsU9yG7sRrF8Diy7Hbujd75nHxYzmgIukSo97UrOXpTDSKEckJss82FP4KS9Ty2LxW BtLl1S2gYaAcAy4BYw0xOX/DcfzMouGiKAkGBK8rAuOtQslqE89zv5l5MG6+pYrvZpbe kq1iGsFiiodyhKBtImT6Vb53ZwvhZm8fiWoveDy1zcAWwnIn8Zel7U/1KFWnmULWz3om 0+aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=lzeYxbcKOl8Xi+1l3fpozbRbTSfylg73jjNfORqtcQg=; b=dlbxT6a9zNvCjjrXTjJ6DhLbxMxgwGxCNZtbPGklco6hJYXxhQljMlTtm80pYCVObG ddFcmYvs7+SbTZ15M/3SbqakNpFSmR7kJpeYAhKrEg8huYsFZAqyACJps/wogd9wRyEE hRW/N2ATjxPBvGWBEEHqGXVlJFhwKNh826M9YEPSejhil6M7OPS+kx2Fyw5sd7RGDJDA JpN9PMmh8kiX06MeNNx9H0u7FXOYKj6aYeRiIS/8AbhE2pI72OgWsomvE1CEnit4/PJX 4rr42Up9boHa8MWpHB/m8glBLZdlJYlU5NKDFoYxe+COv5bmYNDBT/6Y5Svtgn4FZLGx 8tDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CEQdM5q3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si3884077edx.610.2022.01.28.08.07.06; Fri, 28 Jan 2022 08:07:31 -0800 (PST) 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; dkim=pass header.i=@intel.com header.s=Intel header.b=CEQdM5q3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245560AbiA0TdI (ORCPT + 99 others); Thu, 27 Jan 2022 14:33:08 -0500 Received: from mga04.intel.com ([192.55.52.120]:47245 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231221AbiA0TdG (ORCPT ); Thu, 27 Jan 2022 14:33:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643311986; x=1674847986; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=d6aKRtAzjDjmJM2+973h3G8biktTSCUUKJusK0j5rXI=; b=CEQdM5q3cLq+z7jwiMXOvBPyGHTKGzI07nMK7u2zBHNAIC/q51WaWCGo huwx765yC6W5CCLP4XG7D09m5IHlzFJXPpxxwt6uVnSX/ERfXcm8XPMYV 2U3eB1aTMvj4X9Xg5v2+Vl0Dqx+VBGV5LVr6nnlPyk+QrUxQhlIny6Bmn wyE+4xlwFDja3E4+0vWJEsIBiO33mU30RQcbGkSyHlrhfak2v5dYYWpie CYpE7ILdHQmtXZqBeNaKj8isWQ8rKkjxUhmVfowmAP1d8wCXFKpcvpMuN xpRz+qKBwfQwjFFdkLJVY0x88p0hGwLMq5yq+xo7olDjMoGCu7WnSq1yJ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="245788383" X-IronPort-AV: E=Sophos;i="5.88,321,1635231600"; d="scan'208";a="245788383" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2022 11:33:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,321,1635231600"; d="scan'208";a="495844896" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga002.jf.intel.com with ESMTP; 27 Jan 2022 11:33:02 -0800 From: Ricardo Neri To: "Rafael J. Wysocki" , Daniel Lezcano , linux-pm@vger.kernel.org Cc: x86@kernel.org, linux-doc@vger.kernel.org, Len Brown , Srinivas Pandruvada , Aubrey Li , Amit Kucheria , Andi Kleen , Tim Chen , Lukasz Luba , "Ravi V. Shankar" , Ricardo Neri , linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH v5 2/7] x86/cpu: Add definitions for the Intel Hardware Feedback Interface Date: Thu, 27 Jan 2022 11:34:49 -0800 Message-Id: <20220127193454.12814-3-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220127193454.12814-1-ricardo.neri-calderon@linux.intel.com> References: <20220127193454.12814-1-ricardo.neri-calderon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the CPUID feature bit and the model-specific registers needed to identify and configure the Intel Hardware Feedback Interface. Cc: Andi Kleen Cc: Aubrey Li Cc: Len Brown Cc: Srinivas Pandruvada Cc: Tim Chen Cc: "Ravi V. Shankar" Acked-by: Borislav Petkov Signed-off-by: Ricardo Neri --- Changes since v4: * None Changes since v3: * None Changes since v2: * Replaced subject prefix to be "x86/cpu:". (Boris) Changes since v1: * Renamed X86_FEATURE_INTEL_HFI as X86_FEATURE_HFI. (Boris) --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 6db4e2932b3d..b39f510128f3 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -330,6 +330,7 @@ #define X86_FEATURE_HWP_ACT_WINDOW (14*32+ 9) /* HWP Activity Window */ #define X86_FEATURE_HWP_EPP (14*32+10) /* HWP Energy Perf. Preference */ #define X86_FEATURE_HWP_PKG_REQ (14*32+11) /* HWP Package Level Request */ +#define X86_FEATURE_HFI (14*32+19) /* Hardware Feedback Interface */ /* AMD SVM Feature Identification, CPUID level 0x8000000a (EDX), word 15 */ #define X86_FEATURE_NPT (15*32+ 0) /* Nested Page Table support */ diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 3faf0f97edb1..89e0a1d5ee36 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -704,12 +704,14 @@ #define PACKAGE_THERM_STATUS_PROCHOT (1 << 0) #define PACKAGE_THERM_STATUS_POWER_LIMIT (1 << 10) +#define PACKAGE_THERM_STATUS_HFI_UPDATED (1 << 26) #define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001b2 #define PACKAGE_THERM_INT_HIGH_ENABLE (1 << 0) #define PACKAGE_THERM_INT_LOW_ENABLE (1 << 1) #define PACKAGE_THERM_INT_PLN_ENABLE (1 << 24) +#define PACKAGE_THERM_INT_HFI_ENABLE (1 << 25) /* Thermal Thresholds Support */ #define THERM_INT_THRESHOLD0_ENABLE (1 << 15) @@ -958,4 +960,8 @@ #define MSR_VM_IGNNE 0xc0010115 #define MSR_VM_HSAVE_PA 0xc0010117 +/* Hardware Feedback Interface */ +#define MSR_IA32_HW_FEEDBACK_PTR 0x17d0 +#define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1 + #endif /* _ASM_X86_MSR_INDEX_H */ -- 2.17.1