kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jim Mattson <jmattson@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: David Edmondson <david.edmondson@oracle.com>,
	Sean Christopherson <seanjc@google.com>,
	kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH v5 2/2] selftests: kvm: Allows userspace to handle emulation errors.
Date: Mon, 3 May 2021 11:04:16 -0700	[thread overview]
Message-ID: <CALMp9eQXGV=HV+r4UFp+O-BWs3YFUD-7jHjbBaDLWPq2CdLNAQ@mail.gmail.com> (raw)
In-Reply-To: <CALMp9eQZEiZ1_nOmyMA2G1Q5vB_vhm09fmB1Bc9VK8tJUUB4kA@mail.gmail.com>

On Fri, Apr 30, 2021 at 10:39 AM Jim Mattson <jmattson@google.com> wrote:
>
> On Fri, Apr 30, 2021 at 7:38 AM Aaron Lewis <aaronlewis@google.com> wrote:
> >
> > This test exercises the feature KVM_CAP_EXIT_ON_EMULATION_FAILURE.  When
> > enabled, errors in the in-kernel instruction emulator are forwarded to
> > userspace with the instruction bytes stored in the exit struct for
> > KVM_EXIT_INTERNAL_ERROR.  So, when the guest attempts to emulate an
> > 'flds' instruction, which isn't able to be emulated in KVM, instead
> > of failing, KVM sends the instruction to userspace to handle.
> >
> > For this test to work properly the module parameter
> > 'allow_smaller_maxphyaddr' has to be set.
> >
> > Signed-off-by: Aaron Lewis <aaronlewis@google.com>
> > Change-Id: I23af1c0d4a3a3484dc15ddd928f3693a48c33e47
> > ---
> ...
> > +                       TEST_ASSERT(is_flds(insn_bytes, insn_size),
> > +                                   "Unexpected instruction.  Expected 'flds' (0xd9 /0)");
>
> Aren't we looking for 0xd9 /5?

My mistake. You are correct; we are looking for 0xd9 /0.

Reviewed-by: Jim Mattson <jmattson@google.com>

      reply	other threads:[~2021-05-03 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 14:37 [PATCH v5 0/2] fallback for emulation errors Aaron Lewis
2021-04-30 14:37 ` [PATCH v5 1/2] kvm: x86: Allow userspace to handle " Aaron Lewis
2021-05-05 12:34   ` David Edmondson
2021-05-07 14:27     ` Aaron Lewis
2021-05-10  9:37       ` David Edmondson
2021-04-30 14:37 ` [PATCH v5 2/2] selftests: kvm: Allows " Aaron Lewis
2021-04-30 17:39   ` Jim Mattson
2021-05-03 18:04     ` Jim Mattson [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='CALMp9eQXGV=HV+r4UFp+O-BWs3YFUD-7jHjbBaDLWPq2CdLNAQ@mail.gmail.com' \
    --to=jmattson@google.com \
    --cc=aaronlewis@google.com \
    --cc=david.edmondson@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).