Re: [PATCH v5 4/9] KVM: MMU: introduce gfn_to_pfn_atomic() function

From: Xiao Guangrong
Date: Tue Jul 06 2010 - 07:32:53 EST




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 linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/