On Tue, Jun 15, 2010 at 7:22 PM, Avi Kivity<avi@xxxxxxxxxx> wrote:
btw, is_hwpoison_address() is racy. While it looks up the address, someYes. is_hwpoison_address() is racy. But I think it is not absolutely
other task can unmap the page tables under us.
Andi/Huang?
One way of fixing it is get_user_pages_ptes_fast(), which also returns the
pte, also atomically. I want it for other reasons as well (respond to a
read fault by gupping the page for read, but allowing write access if the
pte indicates it is writeable).
necessary to call is_hwpoison_address() in hva_to_pfn_atomic(), is it?
For is_hwpoison_address() in hva_to_pfn(), we can protect it with mmap_sem.