From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] KVM: VMX: Avoid to return ENOTSUPP to userland Date: Wed, 22 Jul 2009 23:53:01 +0200 Message-ID: <4A678A3D.1080509@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig75B9CD3585DF33DC989CFF46" Cc: kvm-devel To: Marcelo Tosatti Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:41295 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752817AbZGVVxI (ORCPT ); Wed, 22 Jul 2009 17:53:08 -0400 Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig75B9CD3585DF33DC989CFF46 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 --- arch/x86/kvm/vmx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7a8d464..d75c271 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3132,7 +3132,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; } @@ -3201,7 +3201,7 @@ static int handle_ept_violation(struct kvm_vcpu *vc= pu, struct kvm_run *kvm_run) =20 if (exit_qualification & (1 << 6)) { printk(KERN_ERR "EPT: GPA exceeds GAW!\n"); - return -ENOTSUPP; + return -EINVAL; } =20 gla_validity =3D (exit_qualification >> 7) & 0x3; --------------enig75B9CD3585DF33DC989CFF46 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpnikIACgkQniDOoMHTA+lmrACeMCL9feO8s+wONkyteBobaKfp DcAAn1fOsYUCTi7sUTQuhGiM8B1WqhHQ =x0H8 -----END PGP SIGNATURE----- --------------enig75B9CD3585DF33DC989CFF46--