Re: [PATCH v8 05/15] guest_memfd: Use folio_has_hwpoisoned_page()
[email protected] Mon, 3 Aug 2026 23:42:58 -0700
| Newsgroups | gmane.linux.file-systems,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
On 7/31/2026 1:07 PM, Matthew Wilcox (Oracle) wrote: > folio_test_hwpoison() only works on hugetlb folios today and will give=20 > the wrong answer for other large folios. folio_has_hwpoisoned_page()=20 > works on both. Signed-off-by: Matthew Wilcox (Oracle) <willy@=E2=80=8A=20 > infradead.=E2=80=8Aorg> Acked-by: Sean Christopherson >=20 >=20 > folio_test_hwpoison() only works on hugetlb folios today and will give > the wrong answer for other large folios. folio_has_hwpoisoned_page() > works on both. >=20 > Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> > Acked-by: Sean Christopherson <[email protected]> > Reviewed-by: Ackerley Tng <[email protected]> > Reviewed-by: Gregory Price <[email protected]> > --- > virt/kvm/guest_memfd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c > index db57c5766ab6..94eedcc7f1a9 100644 > --- a/virt/kvm/guest_memfd.c > +++ b/virt/kvm/guest_memfd.c > @@ -774,7 +774,7 @@ static struct folio *__kvm_gmem_get_pfn(struct file *= file, > if (IS_ERR(folio)) > return folio; > =20 > - if (folio_test_hwpoison(folio)) { > + if (folio_has_hwpoisoned_page(folio)) { > folio_unlock(folio); > folio_put(folio); > return ERR_PTR(-EHWPOISON); > --=20 > 2.47.3 >=20 Reviewed-by: Jane Chu <[email protected]> thanks, -jane