summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-06-03 14:12:10 +0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:32:46 +0300
commit596ae895653fe336b9b5815ad2c175d22bb26f21 (patch)
treebcd6c6fcb6eb7ef4bc24036dc0349c3654b2bed8
parent6de4f3ada40b336522250a7832a0cc4de8856589 (diff)
downloadop-kernel-dev-596ae895653fe336b9b5815ad2c175d22bb26f21.zip
op-kernel-dev-596ae895653fe336b9b5815ad2c175d22bb26f21.tar.gz
KVM: VMX: Fix reporting of unhandled EPT violations
Instead of returning -ENOTSUPP, exit normally but indicate the hardware exit reason. Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d726dec..959cb59 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -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);
OpenPOWER on IntegriCloud