From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Subject: Re: [PATCH] Print a user-friendly message on failed vmentry Date: Wed, 19 May 2010 20:28:52 -0500 Message-ID: <20100520012852.GK14379@us.ibm.com> References: <1274303782-21497-1-git-send-email-m.gamal005@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, mtosatti@redhat.com, anthony@codemonkey.ws, kvm@vger.kernel.org To: Mohammed Gamal Return-path: Received: from e35.co.us.ibm.com ([32.97.110.153]:43742 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752698Ab0ETB26 (ORCPT ); Wed, 19 May 2010 21:28:58 -0400 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e35.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o4K1MdFv001746 for ; Wed, 19 May 2010 19:22:39 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4K1Svir132744 for ; Wed, 19 May 2010 19:28:57 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o4K1SuNX032001 for ; Wed, 19 May 2010 19:28:57 -0600 Content-Disposition: inline In-Reply-To: <1274303782-21497-1-git-send-email-m.gamal005@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: * Mohammed Gamal [2010-05-19 16:17]: > This patch address bug report in https://bugs.launchpad.net/qemu/+bug/530077. > > Failed vmentries were handled with handle_unhandled() which prints a rather > unfriendly message to the user. This patch separates handling vmentry failures > from unknown exit reasons and prints a friendly message to the user. > > Signed-off-by: Mohammed Gamal > --- > qemu-kvm.c | 16 +++++++++++++++- > 1 files changed, 15 insertions(+), 1 deletions(-) > > diff --git a/qemu-kvm.c b/qemu-kvm.c > index 35a4c8a..deb4df8 100644 > --- a/qemu-kvm.c > +++ b/qemu-kvm.c > @@ -106,6 +106,20 @@ static int handle_unhandled(uint64_t reason) > return -EINVAL; > } > > +static int handle_failed_vmentry(uint64_t reason) > +{ > + fprintf(stderr, "kvm: vm entry failed with error 0x%" PRIx64 "\n\n", reason); > + fprintf(stderr, "If you're runnning a guest on an Intel machine, it can be\n"); > + fprintf(stderr, "most-likely due to the guest going into an invalid state\n"); > + fprintf(stderr, "for Intel VT. For example, the guest maybe running in big\n"); > + fprintf(stderr, "real mode which is not supported by Intel VT.\n\n"); We might want to qualify this with certain cpu versions. IIRC, the VMX unrestricted mode should handle big real mode correctly, no? Maybe, + fprintf(stderr, "on some Intel processors. For example, the guest maybe running in big\n"); + fprintf(stderr, "real mode which is not supported on most Intel processors.\n\n"); -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com