Implement KVM_CAP_MEMORY_FAULT_INFO for efaults generated by kvm_vcpu_map(). Signed-off-by: Anish Moorthy <amoorthy@xxxxxxxxxx> --- virt/kvm/kvm_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 572adba9ad8ed..f3be5aa49829a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2843,8 +2843,10 @@ int kvm_vcpu_map(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map) #endif } - if (!hva) + if (!hva) { + kvm_populate_efault_info(vcpu, gfn * PAGE_SIZE, PAGE_SIZE); return -EFAULT; + } map->page = page; map->hva = hva; -- 2.40.0.577.gac1e443424-goog