Message ID | 20230315021738.1151386-8-amoorthy@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Avoiding slow get-user-pages via memory fault exit | expand |
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index c25aeb550cd97..c042d385350de 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -2683,7 +2683,9 @@ static int setup_vmgexit_scratch(struct vcpu_svm *svm, bool sync, u64 len) pr_err("vmgexit: kvm_read_guest for scratch area failed\n"); kvfree(scratch_va); - return -EFAULT; + return kvm_memfault_exit_or_efault( + &svm->vcpu, scratch_gpa_beg, len, + KVM_MEMFAULT_REASON_UNKNOWN); } /*