[PATCH v3 11/22] KVM: x86: Annotate -EFAULTs from setup_vmgexit_scratch()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Implement KVM_CAP_MEMORY_FAULT_INFO for efaults generated by
setup_vmgexit_scratch().

Signed-off-by: Anish Moorthy <amoorthy@xxxxxxxxxx>
---
 arch/x86/kvm/svm/sev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index c25aeb550cd97..9ef121f71dc26 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -2683,6 +2683,7 @@ 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);
+			kvm_populate_efault_info(&svm->vcpu, scratch_gpa_beg, len);
 			return -EFAULT;
 		}
 
-- 
2.40.0.577.gac1e443424-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux