All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCHv2] KVM: inject #UD if instruction emulation fails and exit to userspace
Date: Mon, 10 May 2010 20:33:37 +0300	[thread overview]
Message-ID: <20100510173337.GD4497@redhat.com> (raw)
In-Reply-To: <y2j52d4a3891005100906g1353b394h76ce675fe98f73bc@mail.gmail.com>

On Mon, May 10, 2010 at 07:06:05PM +0300, Mohammed Gamal wrote:
> On Mon, May 10, 2010 at 1:25 PM, Gleb Natapov <gleb@redhat.com> wrote:
> > On Mon, May 10, 2010 at 11:16:56AM +0300, Gleb Natapov wrote:
> >> Do not kill VM when instruction emulation fails. Inject #UD and report
> >> failure to userspace instead. Userspace may choose to reenter guest if
> >> vcpu is in userspace (cpl == 3) in which case guest OS will kill
> >> offending process and continue running.
> >>
> 
> I am curious to know what'd happen in case the vcpu is in kernel space
> (cpl == 0). Is that case handled?
> 
Currently no matter where emulation fails VM is stopped and cpu state is
printed on stderr. After that patch userspace may choose to continue VM
execution after emulation error (#UD will be injected into VM though). The
policy is in userspace, but I don't see the point to continue execution
after emulation failed in kernel. How kernel can recover from the #UD?

--
			Gleb.

  reply	other threads:[~2010-05-10 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10  8:16 [PATCHv2] KVM: inject #UD if instruction emulation fails and exit to userspace Gleb Natapov
2010-05-10 10:25 ` Gleb Natapov
2010-05-10 16:06   ` Mohammed Gamal
2010-05-10 17:33     ` Gleb Natapov [this message]
2010-05-11  2:09       ` Takuya Yoshikawa
2010-05-11 16:47 ` Marcelo Tosatti

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=20100510173337.GD4497@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.