Re: [PATCH] Print a user-friendly message on failed vmentry

Mohammed Gamal
2010-05-20T02:06:23Z

On Thu, May 20, 2010 at 4:28 AM, Ryan Harper <ryanh@us.ibm.com> wrote:
>
> * Mohammed Gamal <m.gamal005@gmail.com> [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 <m.gamal005@gmail.com>
> > ---
> >  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");
>
Good point. Will correct and resend.

> --
> Ryan Harper
> Software Engineer; Linux Technology Center
> IBM Corp., Austin, Tx
> ryanh@us.ibm.com