public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>,
	kvm-devel <kvm@vger.kernel.org>, Rik van Riel <riel@surriel.com>,
	Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Subject: Re: Handling vmentry failures in userspace
Date: Sun, 20 Jul 2008 15:31:18 +0300	[thread overview]
Message-ID: <48833016.4050103@qumranet.com> (raw)
In-Reply-To: <52d4a3890807200527u17b6d22qa1afaeb8133eaf43@mail.gmail.com>

Mohammed Gamal wrote:
> With the unpredictable behaviour of the current vmentry failure patch,
> I think this is caused by external interrupts from the host, and since
> this is hard to control I was thinking of handling vmentry failure in
> userspace. The way I am thinking of doing it is that once a vmentry
> fails because of an invalid guest state we delegate the emulation to
> userspace, and then we'd rely on QEMU's CPU emulation to emulate
> instructions until we return to VMX-friendly state.
>
> I don't have a strong grasp of the details on how the kernel- and
> user-space side interact, so I don't know if that'd really be
> possible? If it is, is it plausible to do it this way, or is it better
> to leave all handling within the kernel side?
>   

Userspace emulation doesn't work.  Some of the emulated devices are in 
the kernel; getting smp right in userspace is hard; and most importantly 
doing some of the cpu emulation in userspace means that the boundary 
between the kernel and userspace is blurred, making it difficult to 
write alternative userspaces.

Fixing the problems we have may be hard, but we need to do this right.

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


      reply	other threads:[~2008-07-20 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 12:27 Handling vmentry failures in userspace Mohammed Gamal
2008-07-20 12:31 ` 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=48833016.4050103@qumranet.com \
    --to=avi@qumranet.com \
    --cc=anthony@codemonkey.ws \
    --cc=guillaume.thouvenin@ext.bull.net \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --cc=riel@surriel.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