KVM: VMX: Fix reporting of unhandled EPT violations
authorAvi Kivity <avi@redhat.com>
Wed, 3 Jun 2009 11:12:10 +0000 (14:12 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:32:46 +0000 (08:32 +0300)
Instead of returning -ENOTSUPP, exit normally but indicate the hardware
exit reason.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c

index d726dec69529818b939d95400f4a54f9c5f3a9d6..959cb59cfaeb29fc8c95d209737560a090ba1870 100644 (file)
@@ -3153,8 +3153,8 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
                printk(KERN_ERR "EPT: Exit qualification is 0x%lx\n",
                        (long unsigned int)exit_qualification);
                kvm_run->exit_reason = KVM_EXIT_UNKNOWN;
-               kvm_run->hw.hardware_exit_reason = 0;
-               return -ENOTSUPP;
+               kvm_run->hw.hardware_exit_reason = EXIT_REASON_EPT_VIOLATION;
+               return 0;
        }
 
        gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);