Re: [PATCH 5/5] KVM: selftests: Add MONITOR/MWAIT quirk test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux