diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/kvm_host.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 4fd33e03d5dc..b9bba60c298b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -82,6 +82,13 @@ static inline bool is_invalid_pfn(pfn_t pfn) | |||
| 82 | return !is_noslot_pfn(pfn) && is_error_pfn(pfn); | 82 | return !is_noslot_pfn(pfn) && is_error_pfn(pfn); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | #define KVM_HVA_ERR_BAD (PAGE_OFFSET) | ||
| 86 | |||
| 87 | static inline bool kvm_is_error_hva(unsigned long addr) | ||
| 88 | { | ||
| 89 | return addr == PAGE_OFFSET; | ||
| 90 | } | ||
| 91 | |||
| 85 | #define KVM_ERR_PTR_BAD_PAGE (ERR_PTR(-ENOENT)) | 92 | #define KVM_ERR_PTR_BAD_PAGE (ERR_PTR(-ENOENT)) |
| 86 | 93 | ||
| 87 | static inline bool is_error_page(struct page *page) | 94 | static inline bool is_error_page(struct page *page) |
| @@ -430,7 +437,6 @@ id_to_memslot(struct kvm_memslots *slots, int id) | |||
| 430 | return slot; | 437 | return slot; |
| 431 | } | 438 | } |
| 432 | 439 | ||
| 433 | int kvm_is_error_hva(unsigned long addr); | ||
| 434 | int kvm_set_memory_region(struct kvm *kvm, | 440 | int kvm_set_memory_region(struct kvm *kvm, |
| 435 | struct kvm_userspace_memory_region *mem, | 441 | struct kvm_userspace_memory_region *mem, |
| 436 | int user_alloc); | 442 | int user_alloc); |
