public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH] x86: Use "-cpu host" for PCID tests
Date: Wed, 5 Feb 2020 07:44:45 -0800	[thread overview]
Message-ID: <20200205154444.GE4877@linux.intel.com> (raw)
In-Reply-To: <150744a7-5be7-8ed6-9eea-cc9c1b46a425@redhat.com>

On Wed, Feb 05, 2020 at 04:26:40PM +0100, Paolo Bonzini wrote:
> On 04/02/20 20:48, Sean Christopherson wrote:
> > Use the host CPU model for the PCID tests to allow testing the various
> > combinations of PCID and INVPCID enabled/disabled without having to
> > manually change the kvm-unit-tests command line.  I.e. give users the
> > option of changing the command line *OR* running on a (virtual) CPU
> > with or without PCID and/or INVPCID.
> 
> I don't understand. :)

I was trying to test a change in the code that clears INVPCID in guest's
CPUID if PCID isn't supported.  To do that, I ran the PCID unit test in L1,
using L0 Qemu to hide PCID and/or INVPCID from L1 to iterate over the four
combinations of PCID and INVPCID being enabled/disabled.  But the test in
L1 never exercised INVPCID=y because unittest.cfg runs with the test with
"-cpu=qemu64,+pcid".

By using qemu64, the only way to test INVPCID=y is to manually run the test
a different "-cpu..." command.  The idea behind "-cpu=host" is to enable
running different combinations of the test in L1 by hiding features from L1
instead of by running the test with different commands.

In other words, if I create an L1 with PCID=y and INVPCID=y, I expect that
running the as-configured PCID unit tests would actually test PCID=Y and
INVPCID=y.

      reply	other threads:[~2020-02-05 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 19:48 [kvm-unit-tests PATCH] x86: Use "-cpu host" for PCID tests Sean Christopherson
2020-02-05 11:37 ` Vitaly Kuznetsov
2020-02-05 14:36   ` Sean Christopherson
2020-02-05 15:26 ` Paolo Bonzini
2020-02-05 15:44   ` Sean Christopherson [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=20200205154444.GE4877@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=kvm@vger.kernel.org \
    --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