From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH RFC] KVM: inject #UD if instruction emulation fails while vcpu is in cpl==3
Date: Thu, 6 May 2010 13:06:45 +0300 [thread overview]
Message-ID: <20100506100645.GB24787@redhat.com> (raw)
In-Reply-To: <4BE288CE.5050801@redhat.com>
On Thu, May 06, 2010 at 12:15:58PM +0300, Avi Kivity wrote:
> On 04/29/2010 02:58 PM, Gleb Natapov wrote:
> >Do not kill VM If instruction emulation fails while vcpu is in
> >userspace. Inject #UD instead in a hope that guest OS will kill offending
> >process. Emulation failure is still traced by ftrace point to help
> >analyze the problem.
>
> Still there's the risk here that a critical failure goes unnoticed.
> ftrace isn't on at all times.
>
Kvm_stat will still show that there was emulation failure, so if strange
application behaviour is reported kvm_stat output will have hints where
to look. Next step in analyzing the problem will be enabling emulator
tracing.
> We can probably inject a #UD unconditionally and exit to userspace.
> Userspace would then report the problem to the user and reenter the
> guest, which would then recover or not.
>
By "unconditionally" you mean even if guest is in kernel mode? There is
no point in trying to continue after that happens. Instead of getting
paused VM at exact place where problem happened and easily analyzable we
will get misbehaved VM with undefined state.
--
Gleb.
next prev parent reply other threads:[~2010-05-06 10:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 11:58 [PATCH RFC] KVM: inject #UD if instruction emulation fails while vcpu is in cpl==3 Gleb Natapov
2010-05-06 9:15 ` Avi Kivity
2010-05-06 10:06 ` Gleb Natapov [this message]
2010-05-06 10:13 ` Avi Kivity
2010-05-06 12:25 ` Gleb Natapov
2010-05-06 12:33 ` Avi Kivity
2010-05-06 12:41 ` Gleb Natapov
2010-05-06 12:48 ` Avi Kivity
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=20100506100645.GB24787@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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).