File tree 2 files changed +16
-21
lines changed
2 files changed +16
-21
lines changed Original file line number Diff line number Diff line change 21
21
#include <linux/slab.h>
22
22
#include <linux/rcupdate.h>
23
23
#include <linux/ratelimit.h>
24
+ #include <linux/err.h>
24
25
#include <asm/signal.h>
25
26
26
27
#include <linux/kvm.h>
52
53
#define KVM_PFN_ERR_HWPOISON (-EHWPOISON)
53
54
#define KVM_PFN_ERR_BAD (-ENOENT)
54
55
56
+ static inline int is_error_pfn (pfn_t pfn )
57
+ {
58
+ return IS_ERR_VALUE (pfn );
59
+ }
60
+
61
+ static inline int is_noslot_pfn (pfn_t pfn )
62
+ {
63
+ return pfn == - ENOENT ;
64
+ }
65
+
66
+ static inline int is_invalid_pfn (pfn_t pfn )
67
+ {
68
+ return !is_noslot_pfn (pfn ) && is_error_pfn (pfn );
69
+ }
70
+
55
71
/*
56
72
* vcpu->requests bit members
57
73
*/
@@ -396,9 +412,6 @@ id_to_memslot(struct kvm_memslots *slots, int id)
396
412
extern struct page * bad_page ;
397
413
398
414
int is_error_page (struct page * page );
399
- int is_error_pfn (pfn_t pfn );
400
- int is_noslot_pfn (pfn_t pfn );
401
- int is_invalid_pfn (pfn_t pfn );
402
415
int kvm_is_error_hva (unsigned long addr );
403
416
int kvm_set_memory_region (struct kvm * kvm ,
404
417
struct kvm_userspace_memory_region * mem ,
Original file line number Diff line number Diff line change @@ -928,24 +928,6 @@ int is_error_page(struct page *page)
928
928
}
929
929
EXPORT_SYMBOL_GPL (is_error_page );
930
930
931
- int is_error_pfn (pfn_t pfn )
932
- {
933
- return IS_ERR_VALUE (pfn );
934
- }
935
- EXPORT_SYMBOL_GPL (is_error_pfn );
936
-
937
- int is_noslot_pfn (pfn_t pfn )
938
- {
939
- return pfn == - ENOENT ;
940
- }
941
- EXPORT_SYMBOL_GPL (is_noslot_pfn );
942
-
943
- int is_invalid_pfn (pfn_t pfn )
944
- {
945
- return !is_noslot_pfn (pfn ) && is_error_pfn (pfn );
946
- }
947
- EXPORT_SYMBOL_GPL (is_invalid_pfn );
948
-
949
931
struct page * get_bad_page (void )
950
932
{
951
933
return ERR_PTR (- ENOENT );
You can’t perform that action at this time.
0 commit comments