lkml.org 
[lkml]   [2022]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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!

\
 
 \ /
  Last update: 2022-06-09 15:57    [W:0.044 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site