[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqH74glDW88oZBzi@google.com>
Date: Thu, 9 Jun 2022 13:55:46 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Yuan Yao <yuan.yao@...ux.intel.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] KVM: selftests: Add MONITOR/MWAIT quirk test
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!
Powered by blists - more mailing lists