From: Huang Ying Date: Sun, 30 Jan 2011 03:15:48 +0000 (+0800) Subject: mm: make __get_user_pages return -EHWPOISON for HWPOISON page optionally X-Git-Tag: v2.6.39-rc1~436^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69ebb83e13e514222b0ae4f8bd813a17679ed876;p=pandora-kernel.git mm: make __get_user_pages return -EHWPOISON for HWPOISON page optionally Make __get_user_pages return -EHWPOISON for HWPOISON page only if FOLL_HWPOISON is specified. With this patch, the interested callers can distinguish HWPOISON pages from general FAULT pages, while other callers will still get -EFAULT for all these pages, so the user space interface need not to be changed. This feature is needed by KVM, where UCR MCE should be relayed to guest for HWPOISON page, while instruction emulation and MMIO will be tried for general FAULT page. The idea comes from Andrew Morton. Signed-off-by: Huang Ying Cc: Andrew Morton Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- Reading git-diff-tree failed