aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index be70035fd42a..2fb73191801f 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1208,7 +1208,7 @@ __gfn_to_pfn_memslot(struct kvm_memory_slot *slot, gfn_t gfn, bool atomic,
1208 return KVM_PFN_ERR_RO_FAULT; 1208 return KVM_PFN_ERR_RO_FAULT;
1209 1209
1210 if (kvm_is_error_hva(addr)) 1210 if (kvm_is_error_hva(addr))
1211 return KVM_PFN_ERR_BAD; 1211 return KVM_PFN_NOSLOT;
1212 1212
1213 /* Do not map writable pfn in the readonly memslot. */ 1213 /* Do not map writable pfn in the readonly memslot. */
1214 if (writable && memslot_is_readonly(slot)) { 1214 if (writable && memslot_is_readonly(slot)) {
@@ -1290,7 +1290,7 @@ EXPORT_SYMBOL_GPL(gfn_to_page_many_atomic);
1290 1290
1291static struct page *kvm_pfn_to_page(pfn_t pfn) 1291static struct page *kvm_pfn_to_page(pfn_t pfn)
1292{ 1292{
1293 if (is_error_pfn(pfn)) 1293 if (is_error_noslot_pfn(pfn))
1294 return KVM_ERR_PTR_BAD_PAGE; 1294 return KVM_ERR_PTR_BAD_PAGE;
1295 1295
1296 if (kvm_is_mmio_pfn(pfn)) { 1296 if (kvm_is_mmio_pfn(pfn)) {
@@ -1322,7 +1322,7 @@ EXPORT_SYMBOL_GPL(kvm_release_page_clean);
1322 1322
1323void kvm_release_pfn_clean(pfn_t pfn) 1323void kvm_release_pfn_clean(pfn_t pfn)
1324{ 1324{
1325 if (!is_error_pfn(pfn) && !kvm_is_mmio_pfn(pfn)) 1325 if (!is_error_noslot_pfn(pfn) && !kvm_is_mmio_pfn(pfn))
1326 put_page(pfn_to_page(pfn)); 1326 put_page(pfn_to_page(pfn));
1327} 1327}
1328EXPORT_SYMBOL_GPL(kvm_release_pfn_clean); 1328EXPORT_SYMBOL_GPL(kvm_release_pfn_clean);