diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3cd4d091c2f3..71beb27597fd 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -6138,6 +6138,20 @@ void kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) | |||
6138 | } | 6138 | } |
6139 | EXPORT_SYMBOL_GPL(kvm_set_rflags); | 6139 | EXPORT_SYMBOL_GPL(kvm_set_rflags); |
6140 | 6140 | ||
6141 | void kvm_arch_async_page_ready(struct kvm_vcpu *vcpu, struct kvm_async_pf *work) | ||
6142 | { | ||
6143 | int r; | ||
6144 | |||
6145 | if (!vcpu->arch.mmu.direct_map || is_error_page(work->page)) | ||
6146 | return; | ||
6147 | |||
6148 | r = kvm_mmu_reload(vcpu); | ||
6149 | if (unlikely(r)) | ||
6150 | return; | ||
6151 | |||
6152 | vcpu->arch.mmu.page_fault(vcpu, work->gva, 0, true); | ||
6153 | } | ||
6154 | |||
6141 | static inline u32 kvm_async_pf_hash_fn(gfn_t gfn) | 6155 | static inline u32 kvm_async_pf_hash_fn(gfn_t gfn) |
6142 | { | 6156 | { |
6143 | return hash_32(gfn & 0xffffffff, order_base_2(ASYNC_PF_PER_VCPU)); | 6157 | return hash_32(gfn & 0xffffffff, order_base_2(ASYNC_PF_PER_VCPU)); |