All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
To: Gleb Natapov <gleb@redhat.com>
Cc: Mohammed Gamal <m.gamal005@gmail.com>,
	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: Tue, 11 May 2010 11:09:12 +0900	[thread overview]
Message-ID: <4BE8BC48.4070201@oss.ntt.co.jp> (raw)
In-Reply-To: <20100510173337.GD4497@redhat.com>

(2010/05/11 2:33), Gleb Natapov wrote:
> 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?

I don't see what is the recommended(possible) way of trouble shooting yet.

If the user is managing both the guest and the host, it's simple: no worth
reentering the guest. The user will just see the stderr.

But what about if the user can only see the guest?

In the case of non-virt, usually the user sees oops log or something and calls
to a support staff. Compared to that, if VM is silently stopped, what information
can the user see? In such a case, catching up the trouble and calling to a support
staff is host side management staff's job?

If you give us preferred way of trouble shooting of KVM, from the developer's point
of view, it will really help us to prepare for the future use of KVM.

   What we can do will depend on your development!
   And this is one of the reasons why I'm interested in the x86's emulation
   development. :-)

Thanks,
   Takuya


>
> --
> 			Gleb.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2010-05-11  2:05 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
2010-05-11  2:09       ` Takuya Yoshikawa [this message]
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=4BE8BC48.4070201@oss.ntt.co.jp \
    --to=yoshikawa.takuya@oss.ntt.co.jp \
    --cc=avi@redhat.com \
    --cc=gleb@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.