From: <ankita@nvidia.com>
To: <ankita@nvidia.com>, <jgg@nvidia.com>,
<alex.williamson@redhat.com>, <naoya.horiguchi@nec.com>,
<akpm@linux-foundation.org>, <tony.luck@intel.com>,
<bp@alien8.de>, <linmiaohe@huawei.com>, <rafael@kernel.org>,
<lenb@kernel.org>, <james.morse@arm.com>, <shiju.jose@huawei.com>,
<bhelgaas@google.com>, <pabeni@redhat.com>, <yishaih@nvidia.com>,
<shameerali.kolothum.thodi@huawei.com>, <kevin.tian@intel.com>
Cc: <aniketa@nvidia.com>, <cjia@nvidia.com>, <kwankhede@nvidia.com>,
<targupta@nvidia.com>, <vsethi@nvidia.com>, <acurrid@nvidia.com>,
<apopple@nvidia.com>, <anuaggarwal@nvidia.com>,
<jhubbard@nvidia.com>, <danw@nvidia.com>, <mochs@nvidia.com>,
<kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <linux-mm@kvack.org>,
<linux-edac@vger.kernel.org>, <linux-acpi@vger.kernel.org>
Subject: [PATCH v2 3/4] mm: Change ghes code to allow poison of non-struct pfn
Date: Thu, 23 Nov 2023 06:05:11 +0530 [thread overview]
Message-ID: <20231123003513.24292-4-ankita@nvidia.com> (raw)
In-Reply-To: <20231123003513.24292-1-ankita@nvidia.com>
From: Ankit Agrawal <ankita@nvidia.com>
The GHES code allows calling of memory_failure() on the PFNs that pass the
pfn_valid() check. This contract is broken for the remapped PFNs which
fails the check and ghes_do_memory_failure() returns without triggering
memory_failure().
Update code to allow memory_failure() call on PFNs failing pfn_valid().
Signed-off-by: Ankit Agrawal <ankita@nvidia.com>
---
drivers/acpi/apei/ghes.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 63ad0541db38..0ca6ab9fccbe 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -471,20 +471,10 @@ static void ghes_kick_task_work(struct callback_head *head)
static bool ghes_do_memory_failure(u64 physical_addr, int flags)
{
- unsigned long pfn;
-
if (!IS_ENABLED(CONFIG_ACPI_APEI_MEMORY_FAILURE))
return false;
- pfn = PHYS_PFN(physical_addr);
- 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);
- return false;
- }
-
- memory_failure_queue(pfn, flags);
+ memory_failure_queue(PHYS_PFN(physical_addr), flags);
return true;
}
--
2.17.1
next prev parent reply other threads:[~2023-11-23 0:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 0:35 [PATCH v2 0/4] mm: Implement ECC handling for pfn with no struct page ankita
2023-11-23 0:35 ` [PATCH v2 1/4] mm: handle poisoning of pfn without struct pages ankita
2023-11-23 0:35 ` [PATCH v2 2/4] mm: Add poison error check in fixup_user_fault() for mapped pfn ankita
2023-12-01 17:04 ` Sean Christopherson
2023-11-23 0:35 ` ankita [this message]
2023-12-02 23:23 ` [PATCH v2 3/4] mm: Change ghes code to allow poison of non-struct pfn Borislav Petkov
2023-12-04 14:36 ` Jason Gunthorpe
2023-12-04 15:36 ` Borislav Petkov
2023-12-04 15:54 ` Ankit Agrawal
2023-12-04 15:55 ` Jason Gunthorpe
2023-11-23 0:35 ` [PATCH v2 4/4] vfio/nvgpu: register device memory for poison handling ankita
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=20231123003513.24292-4-ankita@nvidia.com \
--to=ankita@nvidia.com \
--cc=acurrid@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=alex.williamson@redhat.com \
--cc=aniketa@nvidia.com \
--cc=anuaggarwal@nvidia.com \
--cc=apopple@nvidia.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=cjia@nvidia.com \
--cc=danw@nvidia.com \
--cc=james.morse@arm.com \
--cc=jgg@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=lenb@kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mochs@nvidia.com \
--cc=naoya.horiguchi@nec.com \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shiju.jose@huawei.com \
--cc=targupta@nvidia.com \
--cc=tony.luck@intel.com \
--cc=vsethi@nvidia.com \
--cc=yishaih@nvidia.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