* [PATCH] platform/x86: ISST: Avoid model check for recent servers
@ 2026-07-29 18:05 Srinivas Pandruvada
2026-08-18 13:03 ` Ilpo Järvinen
0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Pandruvada @ 2026-07-29 18:05 UTC (permalink / raw)
To: hansg, ilpo.jarvinen
Cc: platform-driver-x86, linux-kernel, Srinivas Pandruvada
To enable SST functions, a CPU model entry is required. This causes
unnecessary delays in deploying new servers on older kernels.
To avoid this, if no CPU model match is found, allow the SST common
driver to load, when all of the following conditions are met:
- Not running as a guest
- The platform is identified as a server via ACPI PM profile
- The CPU belongs to Intel family 0x19
- MSR 0x54 is present to retrieve the PM logical ID
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
.../intel/speed_select_if/isst_if_common.c | 61 ++++++++++++++++++-
1 file changed, 60 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
index 1c48bf6d5457..8b87dec2a4cd 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
@@ -7,6 +7,7 @@
* Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
*/
+#include <linux/acpi.h>
#include <linux/cpufeature.h>
#include <linux/cpuhotplug.h>
#include <linux/fs.h>
@@ -774,6 +775,58 @@ void isst_if_cdev_unregister(int device_type)
}
EXPORT_SYMBOL_GPL(isst_if_cdev_unregister);
+#ifdef CONFIG_ACPI
+
+static bool acpi_pm_profile_server(void)
+{
+ if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
+ acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
+ return true;
+
+ return false;
+}
+
+#else
+
+static bool acpi_pm_profile_server(void)
+{
+ return false;
+}
+
+#endif
+
+static const struct x86_cpu_id sst_allowed_families[] = {
+ X86_MATCH_VENDOR_FAM(INTEL, 19, NULL),
+ {}
+};
+
+static bool isst_features_allowed(void)
+{
+ const struct x86_cpu_id *id;
+ u64 data;
+ int ret;
+
+ /* For hypervisors, explicit model addition is required */
+ if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
+ return false;
+
+ /* SST is server only feature */
+ if (!acpi_pm_profile_server())
+ return false;
+
+ /* Match for family 19 only */
+ id = x86_match_cpu(sst_allowed_families);
+ if (!id)
+ return false;
+
+ /* Check for presence of MSR 0x54 */
+ ret = rdmsrq_safe(MSR_PM_LOGICAL_ID, &data);
+ if (ret)
+ return false;
+
+ return true;
+}
+
#define SST_HPM_SUPPORTED 0x01
#define SST_MBOX_SUPPORTED 0x02
@@ -798,8 +851,13 @@ static int __init isst_if_common_init(void)
const struct x86_cpu_id *id;
id = x86_match_cpu(isst_cpu_ids);
- if (!id)
+ if (!id) {
+ if (isst_features_allowed()) {
+ isst_hpm_support = true;
+ goto misc_reg;
+ }
return -ENODEV;
+ }
if (id->driver_data == SST_HPM_SUPPORTED) {
isst_hpm_support = true;
@@ -812,6 +870,7 @@ static int __init isst_if_common_init(void)
return -ENODEV;
}
+misc_reg:
return isst_misc_reg();
}
module_init(isst_if_common_init)
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: ISST: Avoid model check for recent servers
2026-07-29 18:05 [PATCH] platform/x86: ISST: Avoid model check for recent servers Srinivas Pandruvada
@ 2026-08-18 13:03 ` Ilpo Järvinen
2026-08-18 13:19 ` srinivas pandruvada
0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2026-08-18 13:03 UTC (permalink / raw)
To: Srinivas Pandruvada; +Cc: Hans de Goede, platform-driver-x86, LKML
On Wed, 29 Jul 2026, Srinivas Pandruvada wrote:
> To enable SST functions, a CPU model entry is required. This causes
> unnecessary delays in deploying new servers on older kernels.
>
> To avoid this, if no CPU model match is found, allow the SST common
> driver to load, when all of the following conditions are met:
>
> - Not running as a guest
> - The platform is identified as a server via ACPI PM profile
> - The CPU belongs to Intel family 0x19
Hi,
Sashiko notes this shouldn't be hex (and is contradicting with the code
that uses decimal)?
--
i.
> - MSR 0x54 is present to retrieve the PM logical ID
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> .../intel/speed_select_if/isst_if_common.c | 61 ++++++++++++++++++-
> 1 file changed, 60 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
> index 1c48bf6d5457..8b87dec2a4cd 100644
> --- a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
> +++ b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
> @@ -7,6 +7,7 @@
> * Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> */
>
> +#include <linux/acpi.h>
> #include <linux/cpufeature.h>
> #include <linux/cpuhotplug.h>
> #include <linux/fs.h>
> @@ -774,6 +775,58 @@ void isst_if_cdev_unregister(int device_type)
> }
> EXPORT_SYMBOL_GPL(isst_if_cdev_unregister);
>
> +#ifdef CONFIG_ACPI
> +
> +static bool acpi_pm_profile_server(void)
> +{
> + if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
> + acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
> + return true;
> +
> + return false;
> +}
> +
> +#else
> +
> +static bool acpi_pm_profile_server(void)
> +{
> + return false;
> +}
> +
> +#endif
> +
> +static const struct x86_cpu_id sst_allowed_families[] = {
> + X86_MATCH_VENDOR_FAM(INTEL, 19, NULL),
> + {}
> +};
> +
> +static bool isst_features_allowed(void)
> +{
> + const struct x86_cpu_id *id;
> + u64 data;
> + int ret;
> +
> + /* For hypervisors, explicit model addition is required */
> + if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
> + return false;
> +
> + /* SST is server only feature */
> + if (!acpi_pm_profile_server())
> + return false;
> +
> + /* Match for family 19 only */
> + id = x86_match_cpu(sst_allowed_families);
> + if (!id)
> + return false;
> +
> + /* Check for presence of MSR 0x54 */
> + ret = rdmsrq_safe(MSR_PM_LOGICAL_ID, &data);
> + if (ret)
> + return false;
> +
> + return true;
> +}
> +
> #define SST_HPM_SUPPORTED 0x01
> #define SST_MBOX_SUPPORTED 0x02
>
> @@ -798,8 +851,13 @@ static int __init isst_if_common_init(void)
> const struct x86_cpu_id *id;
>
> id = x86_match_cpu(isst_cpu_ids);
> - if (!id)
> + if (!id) {
> + if (isst_features_allowed()) {
> + isst_hpm_support = true;
> + goto misc_reg;
> + }
> return -ENODEV;
> + }
>
> if (id->driver_data == SST_HPM_SUPPORTED) {
> isst_hpm_support = true;
> @@ -812,6 +870,7 @@ static int __init isst_if_common_init(void)
> return -ENODEV;
> }
>
> +misc_reg:
> return isst_misc_reg();
> }
> module_init(isst_if_common_init)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: ISST: Avoid model check for recent servers
2026-08-18 13:03 ` Ilpo Järvinen
@ 2026-08-18 13:19 ` srinivas pandruvada
0 siblings, 0 replies; 3+ messages in thread
From: srinivas pandruvada @ 2026-08-18 13:19 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: Hans de Goede, platform-driver-x86, LKML
On Tue, 2026-08-18 at 16:03 +0300, Ilpo Järvinen wrote:
> On Wed, 29 Jul 2026, Srinivas Pandruvada wrote:
>
> > To enable SST functions, a CPU model entry is required. This causes
> > unnecessary delays in deploying new servers on older kernels.
> >
> > To avoid this, if no CPU model match is found, allow the SST common
> > driver to load, when all of the following conditions are met:
> >
> > - Not running as a guest
> > - The platform is identified as a server via ACPI PM profile
> > - The CPU belongs to Intel family 0x19
>
> Hi,
>
> Sashiko notes this shouldn't be hex (and is contradicting with the
> code
> that uses decimal)?
Hi,
Yes, this should be 19 not 0x19. Code is correct. I will send an
update.
Thanks,
Srinivas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-18 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 18:05 [PATCH] platform/x86: ISST: Avoid model check for recent servers Srinivas Pandruvada
2026-08-18 13:03 ` Ilpo Järvinen
2026-08-18 13:19 ` srinivas pandruvada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.