kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: mtosatti@redhat.com, anthony@codemonkey.ws, ryanh@us.ibm.com,
	kvm@vger.kernel.org
Subject: Re: [PATCH][RESEND] Print a user-friendly message on failed vmentry
Date: Tue, 01 Jun 2010 15:40:36 +0300	[thread overview]
Message-ID: <4C04FFC4.7070304@redhat.com> (raw)
In-Reply-To: <AANLkTikbLMB8LSBGcVXOGsWePVm3YOteqWB0r_v-IAB_@mail.gmail.com>

On 06/01/2010 01:55 PM, Mohammed Gamal wrote:
> On Tue, Jun 1, 2010 at 11:59 AM, Avi Kivity<avi@redhat.com>  wrote:
>    
>> On 05/31/2010 10:40 PM, Mohammed Gamal wrote:
>>      
>>> 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.
>>>
>>>
>>>
>>> +#define VMX_INVALID_GUEST_STATE 0x80000021
>>> +
>>> +static int handle_failed_vmentry(uint64_t reason)
>>> +{
>>> +    fprintf(stderr, "kvm: vm entry failed with error 0x%" PRIx64 "\n\n",
>>> reason);
>>> +
>>> +    /* Perhaps we will need to check if this machine is intel since exit
>>> reason 0x21
>>> +       has a different interpretation on SVM */
>>> +    if (reason == VMX_INVALID_GUEST_STATE) {
>>> +        fprintf(stderr, "If you're runnning a guest on an Intel machine
>>> without\n");
>>> +        fprintf(stderr, "unrestricted mode support, the failure can be
>>> most likely\n");
>>> +        fprintf(stderr, "due to the guest entering an invalid state for
>>> Intel VT.\n");
>>> +        fprintf(stderr, "For example, the guest maybe running in big real
>>> mode\n");
>>> +        fprintf(stderr, "which is not supported on less recent Intel
>>> processors.\n\n");
>>> +        fprintf(stderr, "You may want to try enabling KVM real mode
>>> emulation. To\n");
>>> +        fprintf(stderr, "enable it, you can run the following commands as
>>> root:\n");
>>> +        fprintf(stderr, "# rmmod kvm_intel\n");
>>> +        fprintf(stderr, "# rmmod kvm\n");
>>> +        fprintf(stderr, "# modprobe kvm_intel
>>> emulate_invalid_guest_state=1\n\n");
>>> +        fprintf(stderr, "WARNING: Real mode emulation is still
>>> work-in-progress\n");
>>> +        fprintf(stderr, "and thus it is not always guaranteed to
>>> work.\n\n");
>>> +    }
>>> +
>>> +    return -EINVAL;
>>> +}
>>>
>>>
>>>        
>> It's almost guaranteed to fail, isn't it?  Is there any guest which fails
>> with emulated_invalid_guest_state=0 but works with e_i_g_s=1?
>>
>>      
> You're right! Perhaps I should remove the e_i_g_s bit from the
> message. What do you think?
>    


Sure.  Better than the current message.

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2010-06-01 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 19:40 [PATCH][RESEND] Print a user-friendly message on failed vmentry Mohammed Gamal
2010-06-01  8:59 ` Avi Kivity
2010-06-01 10:55   ` Mohammed Gamal
2010-06-01 12:40     ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C04FFC4.7070304@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --cc=mtosatti@redhat.com \
    --cc=ryanh@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).