From: Chen Gong <gong.chen@linux.intel.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: tony.luck@intel.com, ying.huang@intel.com, lenb@kernel.org,
linux-acpi@vger.kernel.org
Subject: Re: [v2 PATCH 1/2] ACPI, APEI, EINJ, new parameter to control trigger action
Date: Mon, 20 Feb 2012 10:02:17 +0800 [thread overview]
Message-ID: <4F41A9A9.5060100@linux.intel.com> (raw)
In-Reply-To: <4F41217A.7040909@gmail.com>
于 2012/2/20 0:21, Jiang Liu 写道:
> On 02/17/2012 03:11 PM, Chen Gong wrote:
>> Some APEI firmware implementation will access injected address
>> specified in param1 to trigger the error when injecting memory
>> error, which means if one SRAR error is injected, the crash
>> always happens because it is executed in kernel context. This
>> new parameter can disable trigger action and control is taken
>> over by the user. In this way, an SRAR error can happen in user
>> context instead of crashing the system. This function is highly
>> depended on BIOS implementation so please ensure you know the
>> BIOS trigger procedure before you enable this switch.
>>
>> v2:
>> notrigger should be created together with param1/param2
>>
>> Tested-by: Tony Luck<tony.luck@lintel.com>
>> Signed-off-by: Chen Gong<gong.chen@linux.intel.com>
>> ---
>> drivers/acpi/apei/einj.c | 15 ++++++++++++---
>> 1 files changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
>> index 4ca087d..afc380c 100644
>> --- a/drivers/acpi/apei/einj.c
>> +++ b/drivers/acpi/apei/einj.c
>> @@ -74,6 +74,8 @@ struct vendor_error_type_extension {
>> u8 reserved[3];
>> };
>>
>> +static u32 notrigger;
>> +
>> static u32 vendor_flags;
>> static struct debugfs_blob_wrapper vendor_blob;
>> static char vendor_dev[64];
>> @@ -496,9 +498,11 @@ static int __einj_error_inject(u32 type, u64 param1, u64 param2)
>> if (rc)
>> return rc;
>> trigger_paddr = apei_exec_ctx_get_output(&ctx);
>> - rc = __einj_error_trigger(trigger_paddr, type, param1, param2);
>> - if (rc)
>> - return rc;
>> + if (notrigger == 0) {
>> + rc = __einj_error_trigger(trigger_paddr, type, param1, param2);
>> + if (rc)
>> + return rc;
>> + }
>> rc = apei_exec_run_optional(&ctx, ACPI_EINJ_END_OPERATION);
> Suggest to reset the notrigger flag to default value (zero) after the injection
> operation, so the test script doesn't need to explicitly set the notrigger flag
> for each injection operation and it's backward compatible with existing scripts.
> It would be better to reset the param2 too for the same reason.
>
I ever thought about this question, but it looks current implementation is
established by usage so I don't think it needs to be fixed, otherwise it has
strong requirement. As for the scripts, I assume you point to mce-test, I will
update them after this patch is merged into the kernel.
Thx for your comments.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-02-20 2:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 7:11 [v2 PATCH 1/2] ACPI, APEI, EINJ, new parameter to control trigger action Chen Gong
2012-02-17 7:11 ` [PATCH 2/2] Update documentation for parameter *notrigger* in einj.txt Chen Gong
2012-02-17 18:27 ` Luck, Tony
2012-02-19 16:21 ` [v2 PATCH 1/2] ACPI, APEI, EINJ, new parameter to control trigger action Jiang Liu
2012-02-20 2:02 ` Chen Gong [this message]
2012-02-21 17:56 ` Luck, Tony
-- strict thread matches above, loose matches on Subject: below --
2012-03-15 8:53 resend these two patches about *notrigger* parameter Chen Gong
2012-03-15 8:53 ` [v2 PATCH 1/2] ACPI, APEI, EINJ, new parameter to control trigger action Chen Gong
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=4F41A9A9.5060100@linux.intel.com \
--to=gong.chen@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=tony.luck@intel.com \
--cc=ying.huang@intel.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;
as well as URLs for NNTP newsgroup(s).