summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorXiao Guangrong2012-08-21 05:01:50 +0200
committerAvi Kivity2012-08-22 14:08:59 +0200
commitca3a490c7de8472b514e2d635c052b1e0f8e1c9d (patch)
tree7deb6eabd240ba306b0e4a21f27195c4d906960d /include/linux/kvm_host.h
parentKVM: introduce KVM_PFN_ERR_RO_FAULT (diff)
downloadkernel-qcow2-linux-ca3a490c7de8472b514e2d635c052b1e0f8e1c9d.tar.gz
kernel-qcow2-linux-ca3a490c7de8472b514e2d635c052b1e0f8e1c9d.tar.xz
kernel-qcow2-linux-ca3a490c7de8472b514e2d635c052b1e0f8e1c9d.zip
KVM: introduce KVM_HVA_ERR_BAD
Then, remove bad_hva and inline kvm_is_error_hva Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h8
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)
return !is_noslot_pfn(pfn) && is_error_pfn(pfn);
}
+#define KVM_HVA_ERR_BAD (PAGE_OFFSET)
+
+static inline bool kvm_is_error_hva(unsigned long addr)
+{
+ return addr == PAGE_OFFSET;
+}
+
#define KVM_ERR_PTR_BAD_PAGE (ERR_PTR(-ENOENT))
static inline bool is_error_page(struct page *page)
@@ -430,7 +437,6 @@ id_to_memslot(struct kvm_memslots *slots, int id)
return slot;
}
-int kvm_is_error_hva(unsigned long addr);
int kvm_set_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
int user_alloc);