diff options
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 2eb0b7500a2a..c7a57b4feb39 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -999,7 +999,7 @@ pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr) | |||
999 | } | 999 | } |
1000 | EXPORT_SYMBOL_GPL(hva_to_pfn_atomic); | 1000 | EXPORT_SYMBOL_GPL(hva_to_pfn_atomic); |
1001 | 1001 | ||
1002 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn) | 1002 | static pfn_t __gfn_to_pfn(struct kvm *kvm, gfn_t gfn, bool atomic) |
1003 | { | 1003 | { |
1004 | unsigned long addr; | 1004 | unsigned long addr; |
1005 | 1005 | ||
@@ -1009,7 +1009,18 @@ pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn) | |||
1009 | return page_to_pfn(bad_page); | 1009 | return page_to_pfn(bad_page); |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | return hva_to_pfn(kvm, addr, false); | 1012 | return hva_to_pfn(kvm, addr, atomic); |
1013 | } | ||
1014 | |||
1015 | pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn) | ||
1016 | { | ||
1017 | return __gfn_to_pfn(kvm, gfn, true); | ||
1018 | } | ||
1019 | EXPORT_SYMBOL_GPL(gfn_to_pfn_atomic); | ||
1020 | |||
1021 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn) | ||
1022 | { | ||
1023 | return __gfn_to_pfn(kvm, gfn, false); | ||
1013 | } | 1024 | } |
1014 | EXPORT_SYMBOL_GPL(gfn_to_pfn); | 1025 | EXPORT_SYMBOL_GPL(gfn_to_pfn); |
1015 | 1026 | ||