diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-08-03 03:38:36 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-06 09:04:52 -0400 |
commit | e6c1502b3f933ace20c711ce34ab696f5a67086d (patch) | |
tree | 932090452960a599281c3cde96c59917d258f891 /virt | |
parent | 6c8ee57be9350c5c2cafdd6a99d0462d528676e2 (diff) |
KVM: introduce KVM_PFN_ERR_HWPOISON
Then, get_hwpoison_pfn and is_hwpoison_pfn can be removed
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ef0491645a10..7fce2d5787ae 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -939,17 +939,6 @@ static pfn_t get_bad_pfn(void) | |||
939 | return -ENOENT; | 939 | return -ENOENT; |
940 | } | 940 | } |
941 | 941 | ||
942 | static pfn_t get_hwpoison_pfn(void) | ||
943 | { | ||
944 | return -EHWPOISON; | ||
945 | } | ||
946 | |||
947 | int is_hwpoison_pfn(pfn_t pfn) | ||
948 | { | ||
949 | return pfn == -EHWPOISON; | ||
950 | } | ||
951 | EXPORT_SYMBOL_GPL(is_hwpoison_pfn); | ||
952 | |||
953 | int is_noslot_pfn(pfn_t pfn) | 942 | int is_noslot_pfn(pfn_t pfn) |
954 | { | 943 | { |
955 | return pfn == -ENOENT; | 944 | return pfn == -ENOENT; |
@@ -1115,7 +1104,7 @@ static pfn_t hva_to_pfn(unsigned long addr, bool atomic, bool *async, | |||
1115 | if (npages == -EHWPOISON || | 1104 | if (npages == -EHWPOISON || |
1116 | (!async && check_user_page_hwpoison(addr))) { | 1105 | (!async && check_user_page_hwpoison(addr))) { |
1117 | up_read(¤t->mm->mmap_sem); | 1106 | up_read(¤t->mm->mmap_sem); |
1118 | return get_hwpoison_pfn(); | 1107 | return KVM_PFN_ERR_HWPOISON; |
1119 | } | 1108 | } |
1120 | 1109 | ||
1121 | vma = find_vma_intersection(current->mm, addr, addr+1); | 1110 | vma = find_vma_intersection(current->mm, addr, addr+1); |