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: Fri, 30 Apr 2021 10:39:30 -0700	[thread overview]
Message-ID: <CALMp9eQZEiZ1_nOmyMA2G1Q5vB_vhm09fmB1Bc9VK8tJUUB4kA@mail.gmail.com> (raw)
In-Reply-To: <20210430143751.1693253-3-aaronlewis@google.com>

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?

With that minor fix.

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

  reply	other threads:[~2021-04-30 17:39 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 " 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 [this message]
2021-05-03 18:04     ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALMp9eQZEiZ1_nOmyMA2G1Q5vB_vhm09fmB1Bc9VK8tJUUB4kA@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 \
    --subject='Re: [PATCH v5 2/2] selftests: kvm: Allows userspace to handle emulation errors.' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).