All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lewis <aaronlewis@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: David Edmondson <david.edmondson@oracle.com>,
	Sean Christopherson <seanjc@google.com>,
	kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] kvm: x86: Allow userspace to handle emulation errors
Date: Thu, 22 Apr 2021 21:14:35 -0700	[thread overview]
Message-ID: <CAAAPnDH_EL3S5WqgLNWQOLruKeStemYtq9vAKVSfV6po3LNGxA@mail.gmail.com> (raw)
In-Reply-To: <CALMp9eSu9k57KvGCO6aDEFgkV-Vxrnr1j7CbiLYbtKYG1uwMZQ@mail.gmail.com>

On Thu, Apr 22, 2021 at 5:57 AM Jim Mattson <jmattson@google.com> wrote:
>
> On Wed, Apr 21, 2021 at 5:28 AM Aaron Lewis <aaronlewis@google.com> wrote:
> >
> > Add a fallback mechanism to the in-kernel instruction emulator that
> > allows userspace the opportunity to process an instruction the emulator
> > was unable to.  When the in-kernel instruction emulator fails to process
> > an instruction it will either inject a #UD into the guest or exit to
> > userspace with exit reason KVM_INTERNAL_ERROR.  This is because it does
> > not know how to proceed in an appropriate manner.  This feature lets
> > userspace get involved to see if it can figure out a better path
> > forward.
> >
> > Signed-off-by: Aaron Lewis <aaronlewis@google.com>
>
> The instruction bytes are a good start, but in many cases, they aren't
> sufficient context to decode the next instruction. Should we eagerly
> provide that information in this exit, or should we just let userspace
> gather it via subsequent ioctls if necessary?

Why is there a concern for the next instruction?  This patch is about
userspace helping with the current instruction being emulated.  I'm
not sure why we would be concerned about the next one.

  reply	other threads:[~2021-04-23  4:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 12:28 [PATCH v2 1/2] kvm: x86: Allow userspace to handle emulation errors Aaron Lewis
2021-04-21 12:28 ` [PATCH v2 2/2] selftests: kvm: Allows " Aaron Lewis
2021-04-21 14:03 ` [PATCH v2 1/2] kvm: x86: Allow " David Edmondson
2021-04-21 16:24   ` Aaron Lewis
2021-04-21 17:10     ` David Edmondson
2021-04-21 19:01       ` Aaron Lewis
2021-04-22  8:07         ` David Edmondson
2021-04-23 15:33           ` Sean Christopherson
2021-04-23 17:23             ` David Edmondson
2021-04-23 17:37               ` Sean Christopherson
2021-04-23 17:55                 ` David Edmondson
2021-04-23 17:57                   ` Jim Mattson
2021-04-23 18:01                     ` Jim Mattson
2021-04-23 18:43                       ` Aaron Lewis
2021-04-22 12:57 ` Jim Mattson
2021-04-23  4:14   ` Aaron Lewis [this message]
2021-04-23 16:43     ` Jim Mattson

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=CAAAPnDH_EL3S5WqgLNWQOLruKeStemYtq9vAKVSfV6po3LNGxA@mail.gmail.com \
    --to=aaronlewis@google.com \
    --cc=david.edmondson@oracle.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=seanjc@google.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.