]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Replace is_hwpoison_address with __get_user_pages
authorHuang Ying <ying.huang@intel.com>
Sun, 30 Jan 2011 03:15:49 +0000 (11:15 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 17 Mar 2011 16:08:27 +0000 (13:08 -0300)
commit5ca94fb8fef79bff73c64c4381fc39e5e9671054
tree3934fab022773bc03c8af20021be79d112f584fa
parent6b72e462676dd6bffe6838a91e81ff091223c684
KVM: Replace is_hwpoison_address with __get_user_pages

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: Huang Ying <ying.huang@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c