public inbox for platform-driver-x86@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Fontenot <nafonten@amd.com>
To: Carlos Bilbao <carlos.bilbao@amd.com>,
	Naveen Krishna Chatradhi <nchatrad@amd.com>,
	platform-driver-x86@vger.kernel.org
Cc: hdegoede@redhat.com, Siva.Sathappan@amd.com,
	Nathan.Fontenot@amd.com, Suma Hegde <suma.hegde@amd.com>
Subject: Re: [PATCH v2 1/2] platforms/x86: Add AMD system management interface
Date: Thu, 3 Feb 2022 10:17:50 -0600	[thread overview]
Message-ID: <a1b0ab95-4c7f-e157-a614-e09a526bde34@amd.com> (raw)
In-Reply-To: <fbe95c46-1623-28b1-7770-3ed3a2bf1130@amd.com>

On 2/3/22 10:03, Carlos Bilbao wrote:
> Hello,
> 
> On 2/3/2022 9:48 AM, Nathan Fontenot wrote:
>> On 2/3/22 06:04, Naveen Krishna Chatradhi wrote:
>>> From: Suma Hegde <suma.hegde@amd.com>
>>>
>>> (...)
>>> +static bool check_model_support(void)
>>> +{
>>> +	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD ||
>>> +	    boot_cpu_data.x86 != 0x19)
>>
>> Check for boot_cpu_data.x86 < 0x19, lets avoid having to do driver updates any
>> time future families support HSMP.
>>
>>> +		return false;
>>> +
>>> +	switch (boot_cpu_data.x86_model) {
>>> +	case 0x00 ... 0x1f:
>>> +	case 0x30 ... 0x3f:
>>> +		return true;
>>> +	default:
>>> +		return false;
>>> +	}
>>
>> I don't think the model check here is necessary. Adding a model check will only
>> add driver updates for any new models.
>>
>> HSMP is only supported on f19h so we do want to keep that. For the different
>> models that may not support HSMP, the call to hsmp_test() in the init routine
>> will fail if HSMP isn't supported.
> 
> So, for this I think Naveen was trying to avoid people with Fam19th client processors 
> complaining about errors in HSMP and filing bugs. You are equally right pointing out 
> that updating this in the future would be inconvenient. Personally, if I put myself in 
> the shoes of an owner of one of those systems, I would be a bit disappointed to run HSMP
> and just fail. So, maybe a solution in the middle would be to remove the model-checking code 
> but also include a warning/clarification in the documentation. 

I agree that some kind of updated message would be good.

The family check is already made and an appropriate message that HSMP is not supported
is made.

Removing the model check and using hsmp_test() needs to account for hsmp_test failing
in two ways. The call can fail because we are on a model that does not support
HSMP, or it can fail because HSMP has been disabled in the BIOS.

The hsmp_test() call should output a message along the lines of "HSMP is not supported
on this family/model or has been disabled in BIOS."

-Nathan

> 
> Thanks,
> Carlos.

  reply	other threads:[~2022-02-03 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 12:04 [PATCH v2 1/2] platforms/x86: Add AMD system management interface Naveen Krishna Chatradhi
2022-02-03 12:04 ` [PATCH v2 2/2] Documentation: Add x86/amd_hsmp driver Naveen Krishna Chatradhi
2022-02-03 15:52   ` Nathan Fontenot
2022-02-03 15:48 ` [PATCH v2 1/2] platforms/x86: Add AMD system management interface Nathan Fontenot
2022-02-03 16:03   ` Carlos Bilbao
2022-02-03 16:17     ` Nathan Fontenot [this message]
     [not found] <<20220203120450.199598-1-nchatrad@amd.com>
2022-02-03 17:52 ` Song Liu
2022-02-03 17:58   ` Chatradhi, Naveen Krishna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1b0ab95-4c7f-e157-a614-e09a526bde34@amd.com \
    --to=nafonten@amd.com \
    --cc=Nathan.Fontenot@amd.com \
    --cc=Siva.Sathappan@amd.com \
    --cc=carlos.bilbao@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=nchatrad@amd.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=suma.hegde@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox