[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gAuqf6RWhgiKvZ5W30p3+cZxnROPP_CzDDNY8ufyFGYw@mail.gmail.com>
Date: Fri, 29 Oct 2021 20:39:43 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Tony Luck <tony.luck@...el.com>
Cc: Borislav Petkov <bp@...en8.de>,
"the arch/x86 maintainers" <x86@...nel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
HORIGUCHI NAOYA(堀口 直也)
<naoya.horiguchi@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Sean Christopherson <seanjc@...gle.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
Dave Hansen <dave.hansen@...el.com>,
Cathy Zhang <cathy.zhang@...el.com>, linux-sgx@...r.kernel.org,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Reinette Chatre <reinette.chatre@...el.com>
Subject: Re: [PATCH v11 7/7] x86/sgx: Add check for SGX pages to ghes_do_memory_failure()
On Wed, Oct 27, 2021 at 12:01 AM Tony Luck <tony.luck@...el.com> wrote:
>
> SGX EPC pages do not have a "struct page" associated with them so the
> pfn_valid() sanity check fails and results in a warning message to
> the console.
>
> Add an additional check to skip the warning if the address of the error
> is in an SGX EPC page.
>
> Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>
> Tested-by: Reinette Chatre <reinette.chatre@...el.com>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> drivers/acpi/apei/ghes.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 0c8330ed1ffd..0c5c9acc6254 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -449,7 +449,7 @@ static bool ghes_do_memory_failure(u64 physical_addr, int flags)
> return false;
>
> pfn = PHYS_PFN(physical_addr);
> - if (!pfn_valid(pfn)) {
> + if (!pfn_valid(pfn) && !arch_is_platform_page(physical_addr)) {
> pr_warn_ratelimited(FW_WARN GHES_PFX
> "Invalid address in generic error data: %#llx\n",
> physical_addr);
> --
> 2.31.1
>
Powered by blists - more mailing lists