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 > the wrong answer for other large folios. folio_has_hwpoisoned_page() > works on both. Signed-off-by: Matthew Wilcox (Oracle) <willy@ > infradead. org> Acked-by: Sean Christopherson > > > 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. > > 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(-) > > 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; > > - if (folio_test_hwpoison(folio)) { > + if (folio_has_hwpoisoned_page(folio)) { > folio_unlock(folio); > folio_put(folio); > return ERR_PTR(-EHWPOISON); > -- > 2.47.3 > Reviewed-by: Jane Chu <[email protected]> thanks, -jane