• Huang Ying's avatar
    KVM: Replace is_hwpoison_address with __get_user_pages · fafc3dba
    Huang Ying authored
    is_hwpoison_address only checks whether the page table entry is
    hwpoisoned, regardless the memory page mapped.  While __get_user_pages
    will check both.
    
    QEMU will clear the poisoned page table entry (via unmap/map) to make
    it possible to allocate a new memory page for the virtual address
    across guest rebooting.  But it is also possible that the underlying
    memory page is kept poisoned even after the corresponding page table
    entry is cleared, that is, a new memory page can not be allocated.
    __get_user_pages can catch these situations.
    Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    fafc3dba
kvm_main.c 56.6 KB