Gleb Natapov wrote: >> + } >> >> if (unlikely(npages != 1)) { >> struct vm_area_struct *vma; >> >> + if (atomic) >> + goto return_bad_page; >> + > You are skipping hwpoison test and sometimes you will return bad_page > for something that returns good pfn now without caller even know. > vma->vm_flags & VM_PFNMAP comes to mind. Is this safe? No matter about it, we not hope the atomic case return good pfn all the time, if the page is swapped or it's hwpoison just return bad_page, then we can skip it in the speculative path. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html