All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yuan Yao <yuan.yao@linux.intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] KVM: selftests: Add MONITOR/MWAIT quirk test
Date: Thu, 9 Jun 2022 13:55:46 +0000	[thread overview]
Message-ID: <YqH74glDW88oZBzi@google.com> (raw)
In-Reply-To: <20220609063720.wf4famdgoucbglnq@yy-desk-7060>

On Thu, Jun 09, 2022, Yuan Yao wrote:
> On Wed, Jun 08, 2022 at 10:45:16PM +0000, Sean Christopherson wrote:
> > +static void guest_monitor_wait(int testcase)
> > +{
> > +	/*
> > +	 * If both MWAIT and its quirk are disabled, MONITOR/MWAIT should #UD,
> > +	 * in all other scenarios KVM should emulate them as nops.
> > +	 */
> > +	bool fault_wanted = (testcase & MWAIT_QUIRK_DISABLED) &&
> > +			    (testcase & MWAIT_DISABLED);
> > +	u8 vector;
> > +
> > +	GUEST_SYNC(testcase);
> > +
> > +	vector = kvm_asm_safe("monitor");
> > +	if (fault_wanted)
> > +		GUEST_ASSERT_2(vector == UD_VECTOR, testcase, vector);
> > +	else
> > +		GUEST_ASSERT_2(!vector, testcase, vector);
> > +
> > +	vector = kvm_asm_safe("monitor");
> 
> emmm... should one of the "monitor" be "mwait" ?

/facepalm

Thanks for catching my copy+paste fail!

  reply	other threads:[~2022-06-09 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 22:45 [PATCH 0/5] KVM: x86: Quirk "MWAIT never faults" behavior Sean Christopherson
2022-06-08 22:45 ` [PATCH 1/5] KVM: x86: Add a quirk for KVM's "MONITOR/MWAIT are NOPs!" behavior Sean Christopherson
2022-06-08 22:45 ` [PATCH 2/5] KVM: selftests: Add x86-64 support for exception fixup Sean Christopherson
2022-06-08 22:45 ` [PATCH 3/5] KVM: selftests: Mostly fix comically broken Hyper-V Features test Sean Christopherson
2022-06-08 22:45 ` [PATCH 4/5] KVM: selftests: Use exception fixup for #UD/#GP Hyper-V MSR/hcall tests Sean Christopherson
2022-06-08 22:45 ` [PATCH 5/5] KVM: selftests: Add MONITOR/MWAIT quirk test Sean Christopherson
2022-06-09  6:37   ` Yuan Yao
2022-06-09 13:55     ` Sean Christopherson [this message]
2022-06-20 15:00 ` [PATCH 0/5] KVM: x86: Quirk "MWAIT never faults" behavior Paolo Bonzini

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=YqH74glDW88oZBzi@google.com \
    --to=seanjc@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=yuan.yao@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.