From: "Michal Luczaj" <mhal@rbox.co>
To: "Nadav Amit" <nadav.amit@gmail.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"kvm" <kvm@vger.kernel.org>, "shuah" <shuah@kernel.org>,
"linux-kselftest" <linux-kselftest@vger.kernel.org>,
"Sean Christopherson" <seanjc@google.com>
Subject: Re: [kvm-unit-tests PATCH 2/4] x86: emulator.c cleanup: Use ASM_TRY for the UD_VECTOR cases
Date: Sat, 06 Aug 2022 13:08:06 +0200 (CEST) [thread overview]
Message-ID: <E1oKHf4-0001d6-6W@rmmprod05.runbox> (raw)
In-Reply-To: <CA0EBF68-648D-483F-B629-7C1B70D1E73C@gmail.com>
On Fri, 5 Aug 2022 19:00:12 -0700, Nadav Amit <nadav.amit@gmail.com> wrote:
> On Aug 5, 2022, at 12:59 PM, Sean Christopherson <seanjc@google.com> wrote:
> > On Fri, Aug 05, 2022, Michal Luczaj wrote:
> >> On Fri, 5 Aug 2022 13:42:40 +0200, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >>> The original reason was to test Linux using MOVBE even on non-Atom
> >>> machines, when MOVBE was only on Atoms. :)
> >>
> >> So the emulator's logic for MOVBE is meant to be tested only when the
> >> guest supports MOVBE while the host does not?
> >
> > Ah, I see what you're asking. No, it's perfectly legal to test MOVBE emulation
> > on hosts that support MOVBE, i.e. using FEP is allowed. But because KVM emulates
> > MOVBE on #UD and the KUT testcase is guaranteed to generate a #UD (barring a
> > hardware bug), there's no need to use FEP. And not using FEP is advantageous
> > because it avoids depending on an opt-in non-production module param.
>
> If history is discussed, the test was created long before FEP. Without FEP,
> the way to force the emulator to emulate an instruction was to set the
> instruction in memory that is not mapped to the guest. But, as Sean stated,
> this test always triggers #UD, so it was not necessary.
>
> The purpose of this test was to check a KVM fix for a bug that was found
> during fuzzing:
>
> https://lore.kernel.org/all/5475DC42.6000201@redhat.com/T/#m3a0da02d7c750c28816b08c43cf2ca03252b8bad
OK, I think I finally get it. Thank you, guys, for all the details.
Michal
next prev parent reply other threads:[~2022-08-06 11:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 13:48 [PATCH 1/2] KVM: x86: emulator: Fix illegal LEA handling Michal Luczaj
2022-07-29 13:48 ` [PATCH 2/2] KVM: selftests: x86: Test " Michal Luczaj
2022-07-29 16:53 ` Sean Christopherson
2022-07-31 20:43 ` Michal Luczaj
2022-07-31 20:46 ` [kvm-unit-tests PATCH v2] " Michal Luczaj
2022-08-01 16:44 ` Sean Christopherson
2022-08-02 23:07 ` Michal Luczaj
2022-08-02 23:41 ` Sean Christopherson
2022-08-03 17:21 ` Michal Luczaj
2022-08-03 17:25 ` [kvm-unit-tests PATCH 1/4] x86: emulator.c cleanup: Save and restore exception handlers Michal Luczaj
2022-08-03 17:25 ` [kvm-unit-tests PATCH 2/4] x86: emulator.c cleanup: Use ASM_TRY for the UD_VECTOR cases Michal Luczaj
2022-08-03 18:21 ` Sean Christopherson
2022-08-05 11:42 ` Paolo Bonzini
2022-08-05 18:55 ` Michal Luczaj
2022-08-05 19:59 ` Sean Christopherson
2022-08-06 2:00 ` Nadav Amit
2022-08-06 11:08 ` Michal Luczaj [this message]
2022-08-03 17:25 ` [kvm-unit-tests PATCH 3/4] x86: Test emulator's handling of LEA with /reg Michal Luczaj
2022-08-03 17:25 ` [kvm-unit-tests PATCH 4/4] x86: Extend ASM_TRY to handle #UD thrown by FEP-triggered emulator Michal Luczaj
2022-08-03 18:16 ` Sean Christopherson
2022-08-05 11:50 ` Paolo Bonzini
2022-07-29 16:41 ` [PATCH 1/2] KVM: x86: emulator: Fix illegal LEA handling Sean Christopherson
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=E1oKHf4-0001d6-6W@rmmprod05.runbox \
--to=mhal@rbox.co \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nadav.amit@gmail.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
/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