Re: [PATCH] platform/x86: ISST: Avoid model check for recent servers
From: Ilpo Järvinen
Date: Tue Aug 18 2026 - 09:11:08 EST
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@xxxxxxxxxxxxxxx>
> ---
> .../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@xxxxxxxxxxxxxxx>
> */
>
> +#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)
>