Merge branch 'kvm-late-6.1-fixes' into HEAD
[platform/kernel/linux-starfive.git] / arch / x86 / kvm / x86.c
index 312aea1..da4bbd0 100644 (file)
@@ -13132,6 +13132,9 @@ int kvm_handle_memory_failure(struct kvm_vcpu *vcpu, int r,
                              struct x86_exception *e)
 {
        if (r == X86EMUL_PROPAGATE_FAULT) {
+               if (KVM_BUG_ON(!e, vcpu->kvm))
+                       return -EIO;
+
                kvm_inject_emulated_page_fault(vcpu, e);
                return 1;
        }