aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index d5ef9ebcaff7..56f3c704fd74 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -101,8 +101,8 @@ static bool largepages_enabled = true;
101static struct page *hwpoison_page; 101static struct page *hwpoison_page;
102static pfn_t hwpoison_pfn; 102static pfn_t hwpoison_pfn;
103 103
104static struct page *fault_page; 104struct page *fault_page;
105static pfn_t fault_pfn; 105pfn_t fault_pfn;
106 106
107inline int kvm_is_mmio_pfn(pfn_t pfn) 107inline int kvm_is_mmio_pfn(pfn_t pfn)
108{ 108{
@@ -931,6 +931,18 @@ int is_fault_pfn(pfn_t pfn)
931} 931}
932EXPORT_SYMBOL_GPL(is_fault_pfn); 932EXPORT_SYMBOL_GPL(is_fault_pfn);
933 933
934int is_noslot_pfn(pfn_t pfn)
935{
936 return pfn == bad_pfn;
937}
938EXPORT_SYMBOL_GPL(is_noslot_pfn);
939
940int is_invalid_pfn(pfn_t pfn)
941{
942 return pfn == hwpoison_pfn || pfn == fault_pfn;
943}
944EXPORT_SYMBOL_GPL(is_invalid_pfn);
945
934static inline unsigned long bad_hva(void) 946static inline unsigned long bad_hva(void)
935{ 947{
936 return PAGE_OFFSET; 948 return PAGE_OFFSET;