From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [RFC PATCH] KVM: optimize apic interrupt delivery
Date: Tue, 11 Sep 2012 15:12:35 +0300 [thread overview]
Message-ID: <20120911121235.GL20907@redhat.com> (raw)
In-Reply-To: <504F2922.3050005@redhat.com>
On Tue, Sep 11, 2012 at 03:05:54PM +0300, Avi Kivity wrote:
> On 09/11/2012 12:57 PM, Gleb Natapov wrote:
>
> >> > If you get -ENOMEM when allocating a page without GFP_ATOMIC (or
> >> > GFP_NOIO etc) then the entire host is dead anyway. The same thing can
> >> > happen if the guest (or userspace) touches a yet-unallocated page, or if
> >> > the page fault path fails to allocate mmu pages, or any of a thousand
> >> > other allocations we have all over.
> >> Then it is just simpler to sigkill the guest right away. What's the
> >> point in returning error if you believe that userspace can't handle it
> >> and will likely not run long enough to even get to userspace due to
> >> memory shortage.
> >>
> > And although this is not the route I will go the question remains. How
> > do we return to the kernel after userspace exit in the middle of IO that
> > is handled by an in-kernel device. Looks like the kernel will expect
> > emulation result from userspace on next ioctl(RUN).
>
> Option 1 is to rewind everything to before the instruction. Option 2 is
> to document that errors are not recoverable.
>
This will make all error non recoverable since userspace has no way to
know that error happened during IO emulation. So we either rewind
everything to before the instruction or never return an error to userspace
during IO.
--
Gleb.
next prev parent reply other threads:[~2012-09-11 12:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 13:09 [RFC PATCH] KVM: optimize apic interrupt delivery Gleb Natapov
2012-09-10 14:44 ` Michael S. Tsirkin
2012-09-10 16:17 ` Gleb Natapov
2012-09-10 17:05 ` Gleb Natapov
2012-09-11 9:29 ` Avi Kivity
2012-09-11 9:35 ` Gleb Natapov
2012-09-11 9:41 ` Avi Kivity
2012-09-11 9:45 ` Gleb Natapov
2012-09-11 9:57 ` Gleb Natapov
2012-09-11 12:05 ` Avi Kivity
2012-09-11 12:12 ` Gleb Natapov [this message]
2012-09-11 12:04 ` Avi Kivity
2012-09-11 12:09 ` Gleb Natapov
2012-09-11 11:20 ` Gleb Natapov
2012-09-11 11:49 ` Gleb Natapov
2012-09-10 15:09 ` Avi Kivity
2012-09-10 15:35 ` Gleb Natapov
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=20120911121235.GL20907@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.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.