Linux Power Management development
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>, <linux-hwmon@vger.kernel.org>,
	Andi Shyti <andi.shyti@kernel.org>, <linux-i2c@vger.kernel.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>, <linux-pm@vger.kernel.org>,
	<lihuisong@huawei.com>
Subject: Re: [PATCH 0/6] ACPI/PCC: Preserve platform-populated PCC signatures
Date: Wed, 1 Jul 2026 15:38:21 +0800	[thread overview]
Message-ID: <6e5e36e0-c470-469e-bb16-a5faaf055463@huawei.com> (raw)
In-Reply-To: <20260630-loyal-gray-polecat-a68c0d@sudeepholla>


On 6/30/2026 6:49 PM, Sudeep Holla wrote:
> On Tue, Jun 30, 2026 at 05:25:20PM +0800, lihuisong (C) wrote:
>> Hi Sudeep,
>>
>> On 6/28/2026 12:37 AM, Sudeep Holla wrote:
>>> ACPI PCC shared memory layouts reserve the first dword for the PCC
>>> signature. ACPI specification defines the signature as 0x50434300 ORed
>>> with the PCC subspace ID, and ACPI 6.6 clarify that the signature is
>>> populated by the platform and verified by OSPM.
>>>
>>> This series centralizes PCC shared memory signature validation in the PCC
>>> mailbox controller and stops PCC users from rewriting the signature before
>>> each command. Clients that previously copied complete local PCC headers
>>> now update only the mutable command/status/flags/length/payload fields.
>> I am concerned that this may affect the functionality of drivers on some
>> existed platforms.
> One other option I was thinking is to not issue error but just log the error
> message and let the client driver add that additional check if required.
The patch 1/6 is not good to our platform.
Yeah, suggest to use gentle approach to do this if we have to clarify 
this signature.
After all, all client drivers work well before.
>> This largely depends on the implementation of the platform firmware.
>>
> Sure. However I always expected it to be taken care by the platform, v6.6
> just adds that clarification explicitly. It was never clear that the sender
> or the OSPM needs to write that signature, so I disagree that it is platform
> firmware dependent entirely. The clarification wouldn't have got added if
> there was any disagreement on that fact.
The reasons I say this largely depends on the firmware are as follows:
1> The previous ACPI spec did not clearly require that the platform 
firmware needs to fill in this signature first.
      The client driver working on these platform doesn't work anymore 
if use the way in patch 1/6.
2> We are not sure if some firmware verify this signature or clear this 
signature field in shared memory.
>
>> I think it's good for the signature to be filled in by the command initiator
>> and then verified by the recipient, as this is how this field can serve its
>> purpose.
>> Otherwise, I really don't see what use it has.
> Please get the spec updated accordingly, we can just change in the kernel
> based on what we think is the best way to use it. It needs to be clearly
> specified, otherwise it may cause issue for non-Linux OSVs.
Agree.

Yeah, I found spec v6.5 just said how to compute it and didn't specify 
how to use it for platform and OSPM.
I saw the update of v6.6 for the signature field in "Generic 
Communications Channel Shared Memory Region" and "Extended PCC Subspace 
Shared Memory Region".
like: "The signature is populated by the platform and is verified by OSPM."
But please note v6.6 didn't say above words in "Reduced PCC Subspace 
Shared Memory Region".

I don't know why v6.6 specify like that.
After all. all PCC application parties (client drivers) in Linux have 
already filled this field.

According to my understanding of normal signature in communication,
it is generally filled by the initiator (sender) and verified by the 
responder (receiver).
In this way, the data is valid, and the signature is meaningful.

If it is only initialized by firmware, and OSPM verifies it, its 
lifecycle ends there.
I don't think this signature has much significance.

The signature field is just in shared memory and may be cleared due to 
some other exception.
Some similar case also need to be considered.
How to make it work better and more resilient may also be something we 
need to consider.
>

  reply	other threads:[~2026-07-01  7:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27 16:37 [PATCH 0/6] ACPI/PCC: Preserve platform-populated PCC signatures Sudeep Holla
2026-06-27 16:37 ` [PATCH 4/6] devfreq: hisi_uncore: Preserve PCC shared memory signature Sudeep Holla
2026-06-30  9:25 ` [PATCH 0/6] ACPI/PCC: Preserve platform-populated PCC signatures lihuisong (C)
2026-06-30 10:49   ` Sudeep Holla
2026-07-01  7:38     ` lihuisong (C) [this message]
2026-07-02 10:21       ` Sudeep Holla
2026-07-06  9:02         ` lihuisong (C)

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=6e5e36e0-c470-469e-bb16-a5faaf055463@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=andi.shyti@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=myungjoo.ham@samsung.com \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@kernel.org \
    /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