public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: Michal Luczaj <mhal@rbox.co>, kvm <kvm@vger.kernel.org>,
	pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH] x86/emulator: Test POP-SS blocking
Date: Mon, 22 Aug 2022 18:37:16 +0000	[thread overview]
Message-ID: <YwPM3AkUS7IT+yWJ@google.com> (raw)
In-Reply-To: <87756239-CB76-4D9B-AB63-49B70C8CAFD3@gmail.com>

On Mon, Aug 22, 2022, Nadav Amit wrote:
> On Aug 22, 2022, at 8:42 AM, Sean Christopherson <seanjc@google.com> wrote:
> 
> > On Mon, Aug 22, 2022, Michal Luczaj wrote:
> >> On 8/22/22 00:06, Michal Luczaj wrote:
> >>> Note that doing this the ASM_TRY() way would require extending
> >>> setup_idt() (to handle #DB) and introducing another ASM_TRY() variant
> >>> (one without the initial `movl $0, %%gs:4`).
> >> 
> >> Replying to self as I was wrong regarding the need for another ASM_TRY() variant.
> >> Once setup_idt() is told to handle #DB,
> > 
> > Hmm, it might be a moot point for this patch (see below), but my vote is to have
> > setup_idt() wire up all known handlers to check_exception_table().  I don't see
> > any reason to skip some vectors.  Code with __ASM_TRY() will explode no matter what,
> > so it's not like it risks suppressing completely unexpected faults.
> 
> I would just like to point out that this whole FEP approach is not friendly
> for other hypervisors or bare-metal testings. While people might have mixed
> feelings about other hypervisors, the benefit of running the tests on
> bare-metal should be clear.

If people want to run KUT on other hypervisors that support a different FEP (KVM
stole it from Xen after all), then I have no objection to genericizing KVM_FEP
and making it a config option.

> Specifically in this test, it is rather simple to avoid using FEP.

I'm saying KUT should do both, i.e. run the same sequences with and without
forced emulation on the "critical" instructions.  That provides full coverage for
bare metal, and also provides coverage for both "fast" and "slow" emulation in
KVM (and other future hypervisors if other prefixes are ever supported).

  reply	other threads:[~2022-08-22 18:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 21:59 [PATCH] KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility Michal Luczaj
2022-08-21 22:06 ` [kvm-unit-tests PATCH] x86/emulator: Test POP-SS blocking Michal Luczaj
2022-08-22  2:40   ` Michal Luczaj
2022-08-22 15:42     ` Sean Christopherson
2022-08-22 18:30       ` Nadav Amit
2022-08-22 18:37         ` Sean Christopherson [this message]
2022-08-23  0:16       ` Michal Luczaj
2022-08-24 18:32         ` Sean Christopherson
2022-08-24 21:49           ` Michal Luczaj
2022-08-25 17:03             ` Sean Christopherson
2022-08-25 17:32               ` Michal Luczaj
2022-08-25 17:56                 ` Sean Christopherson
2022-08-24  0:20 ` [PATCH] KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility Sean Christopherson
2022-08-24 17:19   ` Paolo Bonzini
2022-08-30 21:41 ` 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=YwPM3AkUS7IT+yWJ@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=mhal@rbox.co \
    --cc=nadav.amit@gmail.com \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox