KVM: VMX: Avoid to return ENOTSUPP to userland
authorJan Kiszka <jan.kiszka@web.de>
Wed, 22 Jul 2009 21:53:01 +0000 (23:53 +0200)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:33:17 +0000 (08:33 +0300)
Choose some allowed error values for the cases VMX returned ENOTSUPP so
far as these values could be returned by the KVM_RUN IOCTL.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c

index 686e1abb68163f56b956471198dd67932cc3f26f..c5aaa1b5fdbed9b53fe8bfe327e39ed0c534e361 100644 (file)
@@ -3133,7 +3133,7 @@ static int handle_apic_access(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
                printk(KERN_ERR
                       "Fail to handle apic access vmexit! Offset is 0x%lx\n",
                       offset);
-               return -ENOTSUPP;
+               return -ENOEXEC;
        }
        return 1;
 }
@@ -3202,7 +3202,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
 
        if (exit_qualification & (1 << 6)) {
                printk(KERN_ERR "EPT: GPA exceeds GAW!\n");
-               return -ENOTSUPP;
+               return -EINVAL;
        }
 
        gla_validity = (exit_qualification >> 7) & 0x3;